Showing posts with label dgtournament. Show all posts
Showing posts with label dgtournament. Show all posts

Thursday, May 31, 2012

DG Tournament open for Euro 2012

Just a quick note to say I entered the matches of UEFA Euro 2012 in DG Tournament now, so you can bet on the games again (don't forget to add this tournament to Your Profile first after you login).

A new banner is on his way... To be honest, I didn't think of opening it up again for this tournament as Belgium isn't qualified, but obviously other countries did qualify ;-) and it sounds people looked forward to play again (looking at the messages I received).
And yes, I must admit, even when your own country doesn't play, it's more fun to predict a score with friends first and than watch the game.

Time goes so fast... It's already 6 years ago I created the initial site to bet on the WorldCup 2006!
If you want to read some more history on DG Tournament you can do that here. I didn't do any updates to the app this year. I did think of putting this app on the Oracle Public Cloud or make a mobile version of it to showcase the power of APEX 4.2 (and JQuery Mobile), but as those didn't go live yet, and I currently don't have that much spare time, I decided against it.

I didn't really foresee prices like I did before... it's all about honour this time!

If you are using Oracle Application Express, and you are in the top 3 ranked people, I'm happy to give away an Export Oracle Application Express books.

That the best may win!

Saturday, June 26, 2010

WC2010 - DGTournament - Next Round

So far the World Cup 2010 was a bit unpredicted. Teams like France and Italy I expected to go through, but they didn't. That it's difficult to predict the right autcome of a football game is reflected in the stats at DG Tournament.

The next round is starting now, so don't forget to do your bets again!

Saturday, June 12, 2010

WC2010 - DGTournament - hot

Looking at the statistics you just know something happened yesterday... Yes! The World Cup 2010 started... it looks like people are competitive and care about their ranking ;-)


Three people betted the correct score of the first two games!
This is the top 3 so far at DG Tournament, all with equal points:
- Marco Gralike
- Szabolcs Horai
-
Thomas Tomm

Concerning my bets... I almost had it right, but France didn't score and Mexico scored against... so 0 points. Hopefully my next bets are a bit better :-)

Friday, June 11, 2010

WC2010 - DGTournament - Prices to win

I've the pleasure to announce we have some prices to win after all ;-)
You find the prices on the Rankings page of DG Tournament.


Today the World Cup 2010 starts, so if you didn't bet yet, you have a few hours left!
Registering on DG Tournament stays open (it has been open for over the last 4 years), so if you missed the first matches, you can still try to catch up with the others.

At the end I'm happy I enabled the World Cup 2010 football on DG Tournament, as it's way more exciting now ;-) I even bought the EA Sports game of the World Cup 2010! Not sure when I've time to play, but I already played it once in the weekend, and it's a very nice game.


Good luck to everybody! And that the best may win!

Tuesday, June 08, 2010

DG Tournament update (4): Interactive Calendar

I just added the posibility to view the calendar of the World Cup 2010 in different ways.


I created an Interactive Report, so you are able to do anything you want.
E.g. you can search for your favorite team, see the games per group etc.

I try to listen to what you are all saying ... I think I implemented all features now which where asked before, so if you have new ones ... ;-)

One thing on my todo is to get the Map working again and representing up-to-date data. A couple of years ago I integrated Google Map v2, but today there's already a v3, so I would like to get that in there instead.

Sunday, June 06, 2010

DG Tournament update (3): Groups and Prices

I changed the Profile page in DG Tournament, so you can add a Group against your name.


I also changed the Bet Rank page so the group, location and country is included now.
You can also search on your group or break on it with the interactive rank page.


If you want to give something to the winner, you can sponsor the bets and in exchange you get your logo/name/link on the rankings page. It's all for fun, but with some prices we boost the adrenaline even a bit more ;-)

If you didn't do your bets yet, do it today as there are only 5 days left! 170 people already did...

Thursday, June 03, 2010

APEX app as SaaS

As I blogged yesterday, I was working on making DG Tournament SaaS.
That is completed now :-)

Let's say ODTUG would like to offer all the conference people the ability to follow the World Cup 2010 in a fun way. So they see the scores, they can bet on the games and communicate with each other.


So what are the options for me to provide them with such a service:

  • I could create a packaged application from an adapted version of DG Tournament and send to them so they put it on their server.
  • I could copy the database schema and APEX app into a new schema and workspace and host it for them.
  • I could keep using only one version of DG Tournament, but let it behave differently depending a parameter (url, key, ...).
They have all advantages and disadvantages, but my preference would be the last option. It would basically mean I provide DG Tournament as a Service (SaaS = Software as a Service).

The biggest advantages I see in this case are:
  • only one version of the app to maintain (bug fixing, performance optimizations etc)
  • only one time I need to fill in the scores
  • minimal time to provide this service to another company (no copy of tables, apps etc. just a new record in the database)
So I changed DG Tournament that if somebody would be interested in this service, they could:
  • have custom look (banner on top)
  • if they click on the banner they go to your homepage
  • if you login as an admin you can adapt the text of the homepage, so you could for ex. talk about the price for the winner
  • the rankings and shoutbox are for your users alone, so nobody else will see what your people say and you have your own ranking
I put the example online here so you can see it in action!

Wednesday, June 02, 2010

DG Tournament update (2)

I just updated DG Tournament with a calendar as that was one of the requests.

The calendar is a nice example of a JQuery plugin. We use the same plugin on our Sumneva website to show our APEX Training calendar.


If you had to do this in APEX 4.0, you would probably use the new build-in calendar or write a plugin to create this calendar.

I put some more new enhancements in the app to make it more user-friendly. E.g. preselect the current tournament when registering and trying to predict the country you are from.

Some people asked for a "group" functionality... So far I told to use the location to provide a grouping. I didn't put in a real group field yet, but thought about it some more.
As one of the purposes of this application is to showcase what you can do with APEX, I went a step further! So I made some first steps to make the application "SaaS".
Basically it would allow me to give companies or persons the possibility to provide their customers and friends a site like DG Tournament, but with their look and feel.
I'll blog about that tomorrow probably, but if you are interested in something like that, drop me a mail.

Only 9 days left to the World Cup 2010!

Monday, May 31, 2010

DG Tournament update (1)

I just updated the DG Tournament application with a new look. The colors are a bit fresher now.
What do you think? Better? Worse?

I'm reviewing the app and making changes along the line to make it more ready for APEX 4.0.
If I had to redo this site in APEX 4 I would change a lot of things, just like I had to do when I switched from 2 to 3. It's amazing what you had to do before and now (or soon) everything is declarative. E.g. I had my own package for showing a shuttle! That is native from 3.x... I also made use of the APEXLib framework to show more userfriendly errors and have enhanced tabular forms.
A lot of these things changed over time. It was a long time ago I looked at the site, but it's kinda fun to review your own app again. At my presentation at ODTUG this year about my experiences going from APEX 3.x to 4.0 I might even use this site as an example for the demos.

I've some more changes to come in an updated version of DG Tournament, but here is already the new look of the site ...


I would like to thank my lovely wife for creating a new banner (top image) for me.

Thursday, May 27, 2010

DGTournament ready for World Cup 2010: betting on games

It wasn't my initial intention to do so, but after having a lot of people asking for enabling the World Cup 2010 on DG Tournament I finally did it.

Four years ago I developed this application (in APEX). With Euro 2008 I made some changes, but from then on I didn't really touch it anymore. Four years is a long time and I saw that some services I used (e.g. to get the location based on the IP) got changed. I didn't completely update the app yet, but the bulk should work now.


I plan to do some more updates in the next days, but go already to the site and start registering yourself. If you already played before on the site, you can just login with those credentials.
If you find some bugs or want to give some feedback, please do so. Now there's still time to make the site better.

Would it be more fun if I include betting for (small) money? I like to keep the site free so everybody can use it, but maybe it's nice to give you the possibility to bet for e.g. 2 euro. Everybody who bets for money can win "the pot". I'm not sure what it means in terms of rights...

Have fun...

Wednesday, June 11, 2008

Holland won, who predicted that? Look at this chart

When I was looking at the game Netherlands - Italy at the Euro 2008 championship I couldn't believe my eyes. The Netherlands won with 3-0.

Some people are betting on the game in DG Tournament and I wondered how many people bet that score! Instead of looking at all bets in a report I decided to create a chart.


In my presentations at the Oracle conferences (ODTUG, IOUG, OOW, UKOUG, ...) and on our Oracle APEX training days I often say that a picture tells more than 1000 words. So the proof is in this Statistics page again. Tell me, what do you find easier, going through the report or just looking at the chart?

In the chart you see all games and a bar which represent the betting of the game: Wrong, Good (means you knew who won) or Exact (you bet the exact score).
For the match Netherlands-Italy NOBODY predicted that score! It's easier to see it in the bar, there's no green and the red bar is the highest among the other games.

Some people asked me how to create a drill-down chart in APEX. The above example is a drill-down one. You can click on the bar and the Interactive Report and the pie chart will show only the details of that game. What you have to do to get it working is: create an hidden item and in the link of your chart you link the hidden item with the value (primary key). In the query of the "child" chart and report you add that hidden item in the where clause. Whenever you submit the page, the hidden item gets filled and the report filtered.

Tuesday, June 10, 2008

Show your visitors (based on IP) in Google Maps

During the weekend I extend DG Tournament with a Google Map of the participants of the Euro 2008 tournament. Although most people put in their profile the country they live in, it's nice to see where they logged in from.


Click on Map in DG Tournament to see it in action.

In Google Maps you can specify a place based on a street or based on coordinates. There's no standard way of showing somebody based on his IP. So I searched a long time for such a service. Most of the services are payable (and expensive), but I found one site which provides you with this service for free: http://api.hostip.info. If you just want to see yourself, you can also use this service: http://freeipservices.com.

Warning

Catching the IP of a visitor of your site is not easy and not fully proof. You've different techniques depending in which environment you're and what your server can provide.
It would have been nice if you could do it from javascript, but I don't think it's possible.

Implementation

First thing to do is to include the Google Maps code in your html page. Google has a very good API and documentation how to do that. Just click on an example you like, view page source and copy the javascript code to your own page. An onload event in the body let the code run when you open the page. This step will give you already the map.

Second thing to do is to add an icon on the map with the location of the IP. With the website I mentioned above you can transform your IP address into a longitude and latitude (or also called coordinates). I always try to use webservices, some kind of rss or just something that returns me xml which makes it easy for me to integrate in my Oracle and APEX environment. In the World Cup 2006 application I used webservices, in the APEX Blog Aggregator I used rss. The query to get the data for my blog for ex. looks like this:

SELECT EXTRACTVALUE (VALUE (t), 'entry/title/text()', 'xmlns="http://www.w3.org/2005/Atom"' ) AS title
FROM TABLE (XMLSEQUENCE (EXTRACT (HTTPURITYPE ('http://dgielis.blogspot.com/feeds/posts/full?max-results=10' ).getxml (), '/feed/entry', 'xmlns="http://www.w3.org/2005/Atom"' ) ) ) t
I now wanted to do the same with the HostIp site, but that site returned xml with namespaces! It was a real nightmare to track down how to get the data out of that. As it was already a long time over midnight and having searched forever and having asked some friends I decided to do it the easy way: read the whole xml into a clob and do some replace and regexp_substr combination to get the data I needed. The solution was not fast and I didn't like I didn't know how to do the xml interpretation with namespaces as I was sure it was possible as I had seen it somewhere before. On Sunday I had a conversation with Mr XML, Marco Gralike and asked him the question. Of course after no time he gave me the correct SELECT to understand the namespace. He already blogged about it, so I'm not going to do that anymore.

But on Monday when I came in the office and talked with John Scott about it, he said: "Oh you didn't know that? I blogged about it before with my Google Calendar integration!"
Then you think: Doh! Why didn't I found it?
The answer: Because he used images and not text, so google didn't know it. When I looked at his post, I saw I even commented on it! So it must have been there I saw it ;-)

And in the post was exactly what happened with me: "If you ever find yourself having problems extracting data from your XML document, then always double check that the namespace isn’t the cause of your problems, forgetting to use the correct namespace can easily chew up hours of head-scratching and banging your head on the table."

So basically if you've your longitude and latitude you can give it to the javascript of the Google Maps code and it will create an icon on the map.

Integrating Google Maps, your IP and location is fairly easy if you know how it all works ;-)

Thursday, June 05, 2008

Using Interactive APEX Report in a Fun way

You don't know Interactive Reports in Oracle Application Express yet? You miss something.
From APEX 3.1 onwards there's a killer feature included in APEX: Interactive Reports.

You can turn a boring report into an interactive one, where you can play with the data, do sums, averages, highlighting rows based on a condition, search and sort in an intuitive way and a lot more.

I didn't think about using it in DG Tournament until my brother asked me if he could have a special Bet ranking. He wanted to have a rank where he could see only his friends or the people playing in his group. I told him it was already possible by using the location field (which I also wrote in my FAQ).

It made me thinking... I also wanted to see in one view how I'm doing with the rank compared to my family or the people in Belgium or everybody. Another feature I wanted to have was to go back in time. When a game is played I adapt the score and the betting gets calculated, but wouldn't it be interesting to see what your rank was before the latest game and now?
Wouldn't it be nice if we could just save all these reports so next time when you login you can see it again?


All that and a lot more (for ex. highlighting) is now included in DG Tournament! And the good thing about it, DG Tournament is completely written in APEX, so it did take me almost no time to implement this new feature! I believe this is the first time the Interactive Reports make a use in a fun way, as this application is completely for fun ;-)

I wonder if non-APEX and non-technical people understand this feature. If you used the interactive report in DG Tournament, put a comment on this blog if it was difficult to use or if you found it fairly simple.

Wednesday, June 04, 2008

For the European people at ODTUG

Are you a football fan and don't want to miss anything about the Euro 2008?
But as a true Oracle believer you also go to ODTUG Kaleidoscope in New Orleans?

The timezones are different! So it's very hard to know what time they play the game.

Here's the date and time of New Orleans:



Here's the date and time of Austria and Switzerland (= also my timezone):



You still have to work out the difference in time? Don't worry, in DG Tournament I gave everybody the option to change the Timezone they are in. I created a special ODTUG entry, if you select it, the date and times will change in the New Orleans timezone.


Don't forget to bed on the games! It's all fun. If you had problems or don't know how to do it, I wrote a little FAQ for DG Tournament.

Oh... if you're worried where to see the games in the States... This is the reply of the hotel we're staying in: "Yes, we can get the European Championship Football Game. However, please keep in mind that the NBA Championship and College Baseball World Series will also be on – we can work around the events."

I hope the time difference plays in our favor. I asked to play the games of especially the 17th: Netherlands - Romania and France - Italy. They should be really good matches!

Tuesday, June 03, 2008

Euro 2008 betting - not possible? (DG Tournament FAQ)

I got some questions about DG Tournament more often. So here's a little FAQ.

Question 1 - I forgot my password, can you reset it?

You can reset your password yourself. Go to the Login screen and click on the link next to Forgot login info

You'll get another screen where you can put in your email address OR username. A new password will be generated for you and send to you by mail. You should be able to login with that password.

Please, change the password once you're logged in, in Your Profile.

Question 2 - I can't bet on the games as I don't see the games!

This is due to the fact you didn't select (subscribed) to the tournament.
After logging into the application, go to Your Profile and move UEFA Euro 2008 to the right side by clicking on UEFA Euro 2008 and hit the > button. It should appear like on the screen.
After that click on the Update Subscription button.
If you go to Your Bets, you should see a screen where you can enter your predictions of the scores.

Question 3 - I want to have a ranking for my company, school, friends. Is that possible?

Yes. You can see the people from one location by searching for it in the Bet Rank screen.
If for ex. all employees of Oracle Belgium want to see who's the winner of their group (Oracle Belgium company) they can put into location, in their profile for ex. Oracle Belgium.
During the tournament they can see the ranking of Oracle Belgium by giving that into the Search field.


If you want to play against your friends for ex. you can type a unique name in the location field.
For ex. "the shooters, BE". If you search for that you get a ranking only for them.

Tuesday, May 27, 2008

Have fun with Euro 2008 and bet

If you're a football enthusiast like me, June 7 will be marked in your agenda!
The start of the EURO 2008 tournament is coming closer. My country (Belgium) is not making part of the participating teams. I find it also a pity that England won't be there as I'm a huge fan of David Beckham. Some people don't like him, but have a look at this video from this weekend!



Although my favorite teams won't play, Euro 2008 will still be worth to follow! One of the matches I really look forward to is the Netherlands against Italy.

Do you remember the World Cup 2006? At that time I created an APEX application to keep track of the scores. It got extended so you could also bet on the games and that was so much more fun. Some people asked me to do it again in for Euro 2008, so here we are. A few weeks before the start of the tournament, I'm happy to say DG Tournament is open for you to play again!


I think it's an excellent chance to bet with your colleagues, family, friends or enemies ;-) You can bet on the games for free, it's just for fun. As this application was also created to promote Oracle Application Express, we give the person who wins the bet a free ticket for our European Apex Training Days in September in the Netherlands. But as the application is also open for others we also give you the choice for an iPod Shuffle.

If there are other people or companies wanting to sponsor, feel free to write me a mail or add a comment on this post. The initial goal is to have a lot of fun again, but if we can win something it's always nice too.

Good luck!