What I Do When I’m Bored

April 26th, 2007 by James Carr

I whipped this up in about 30 minutes using flickr’s developer API and some PHP. Added Lightbox2 javascript library for effect.

I forgot how fun PHP can be for quick and dirty things like this.

TDD’ing Blackjack: Iteration 1 complete

June 24th, 2006 by James Carr

This afternoon I decided to try out the Blackjack TDD exercise again in php, and decided to go ahead and write a quick and simplistic interface to it, and put it up on my website to play around with. It was a fun waste of two hours, but what I’m happy about is that I have something to play with, although it’s broken in some ways. You can’t split. You can refresh the page and hit even after the game has completed. But the basics do work.

It’s actually been a fun little project… I’m thinking of spending the afternoon tomorrow extracting some rules out of it (and creating some) and implementing a rule processor to alow games with different rule sets (i.e. dealer must hit on soft 17, spanish 21 rules, etc). I’ll probably also implement a betting system and the capability to split hands and double down. Adding the capability for multiple players might be a fun addition to add in the near future as well.

Anyhow, for those who are interested, you can play with it here.