25 Sep 2009
Recently I went to a wedding which had a casino theme. To keep the guests entertained they gave every guest
$100 from the Bank Of Fun to spend on the roulette and black jack tables. I decided to play roulette and I
knew that the best way to maximise my chances of winning was to bet only on odd or even and to double my bet
whenever I lost. At one point I was 2.6x up on my initial stake, but unfortunately, as you’d expect, I
eventually lost the lot.
I want to see what I could have done to increase my peak winnings, and to try my best to leave the table with
a positive cash flow. To do this we’ll simulate a roulette table using Python and try out various betting
strategies. The Roulette wheel that was used at the Wedding was an American wheel and featured the numbers 1
to 36 as well as 0 and 00. Betting on odd or even will win if a number 1 to 36 comes up and it is odd or even.
0 or 00 will lose you your money. If you win your stake is doubled. This means that by betting on odd or even
you stand a 47% chance of winning.
Read More...
02 Jul 2009
I’ve been developing a website in my spare time. Because I want to add plenty of
social features it makes sense to let users login using Facebook Connect. The Facebook platform is by far the
most successful social platform with many developers having created applications and websites that use it. I
expected that the experience for developers would be a good one. Unfortunately, I was disappointed.
Facebook makes it easy to register an application and provide links to libraries that wrap their API and make
it easy to get started. What Facebook don’t provide however is a downloadable version of their API to test
with. Facebook have made some effort to support test
users, but you have to open ports in your
firewall and use your real facebook account to test with. Testing a new user signing up for your app is really
quite a chore. Automating this sort of test is essentially impossible.
In an ideal world Facebook would produce a downloadable program that you can use to automatically user,
programmatically log in users and generally automatically test all the parts of your code. The danger is that
they’d have to give you a downloadable copy of their website code. Google App Engine give a similar
downloadable environment, and you can’t say that Google don’t have a load of code that they don’t want to give
away!
The Facebook API is pretty simple to get started with, and with in a couple of minutes you’ll have the code
written to log a user in. Checking that it all works though, is a much tougher challenge…
Read More...
18 Jun 2009
As an amateur photographer I upload all my photographs to Flickr.
Most of the them are mediocre, but
one or
two are good enough that I
think they can stand along side the photos from more professional users of Flickr.
For the same reason that I blog, I put my photos on Flickr because I feel that I have something useful or
interesting to offer and to interact with new and interesting people. My blog gets between twenty and thirty
visits a day - not much, but roughly the same as the number of visit I get to my photos on Flickr. The
difference is that I only have twenty posts on my blog, whereas I have 2,000 photos on Flickr!
Plenty has been written about search engine optimisation for blogs, but not much has been written about SEO
for Flickr. The majority of my photos have five or so tags, a title and are geotagged. Flickr does allow you
to write a description and this would increase the about of text thereby giving search engines much more to go
on. The key to gaining exposure on Flickr though, is to appear on Explore.
Read More...
11 Jun 2009
It was with some trepidation that I listened in to this Monday’s Apple developer event, the WWDC keynote
address. I have 16GB iPhone 3G, a current top-of-the-range model. With all speculation before the event it was
clear that Apple were going to release a new model. But what were they going to include? Were they going to
include the kitchen sink as some had been suggesting?
Fortunately, as the change in name would suggest, the new iPhone 3GS is an evolution rather than a revolution.
Apple claim it has twice the magic which should equate to much faster application loading and probably better
games too. In reality it’ll mean twice the cpu speed or twice the memory, or more likely both. It appears that
the biggest change is that the iPhone 3GS contains a new graphics chip which gives it seven times the graphics
throughput, Seven times!
The extra disk space that comes with a 32GB 3GS is nice, but is unlikely to be a reason to pay the extra for a
3GS. The same with voice dialling. The new phone does contain a compress, which will certainly make using the
mapping application easier, and will allow for some really nice apps. When Google change Google Earth to us
the compress it’ll be really nice to use.
I’m not going to pay the extra to upgrade before my contract is up, but I’ll certainly be a bit jealous of
those with a new 3GS.
Read More...
01 Jun 2009
On Friday I download a fun little puzzle game for my iPhone,
FlightControl.
The premise of the game is that you’re running air traffic approach control for a small airport and you need
to arrange for the two types of passenger jets, light aircraft and helicopters to land in the appropriate
places without crashing into each other. A simple concept with even simpler controls. You tap on the plane you
want to direct and then drag the plane to the runway. It will then follow the path you dragged out. It’s
incredibly easy to use and really lets you focus on the goal of stopping those planes from crashing.
The graphics and sounds are excellent. The game has a great cartoon feel and although the menu and ui are
minimal it has a very consistent look that clearly didn’t happen by accident. The map and airport look good
and there are plans to add more airports to the game which I hope will be done to a similarly high standard.
The game starts off very easy to let you get the feel for the controls but the difficulty level ramps up
pretty quickly and you’ll soon have to deal with five or more planes at once. When you’ve got two planes
flying at different speeds trying to land on the same runway your brain will start to melt, but in a good way.
Read More...