Breaking Blackjack

A few days ago. my roommate Patrick bought a copy of 21.  After a watching peeked our interest, we started playing blackjack at home and then went to the Horseshoe Casino last night.  Patrick managed to make around $80 and I walked out with exactly the same amount of money I walked in with.

Today, I started working on developing a simulation to test various strategies.  After a full day of development, I have the basic framework working, and it is able to run a simple simulation based on basic strategy from Wikipedia.

The program is written in Java, and the first source tarball is attached to this post.  To run the simulation, build and run PlayerVsDealer.java.

blackjack-r5.tar.gz

Update: Fixed a pretty major bug that was causing the decks to not be shuffled.  It works much nicer now.  Also, the win percentage is up closer to 48% now.

blackjack-r6.tar.gz

See this post for a more recent build.

Review: Logitech Illuminated Keyboard

Yesterday, the keyboard in my Logitech MX3100 desktop stopped working, and after half an hour of trying to get it to work again, I decided it was time to replace it.  After poking around online I found the Logitech Illuminated Keyboard, which was just released a few days ago, and I headed over to Best Buy to pick one up.

At 9.3mm thick, the keyboard is incredibly thin.  It uses laptop style keys and, true to its name, the keys are backlit.  Unlike other backlit keyboards I’ve seen, however, it’s still very easy to read the keys even when the backlight is turned off.

Another nice thing about this particular keyboard is that Logitech didn’t decide to mess with the location of the backslash/pipe key, which a couple of models I looked at did (by using a large Enter key, then moving the backslash/pipe to the left of the backspace).

The Illuminated Keyboard doesn’t have a lot of unnecessary keys like my MX3100 did.  There are a couple of media shortcut keys at the top of the keyboard, but that’s it.  For comparison, the MX3100 had a few programmable keys, keys for launching Office and several other applications, a volume knob, zoom & scroll wheels, etc.  The result is that the new keyboard fits much better on my desk that the previous one, and I now have plenty of room to put my mouse and mousepad alongside it in the keyboard tray.

Summary:

Retail Price: $79.99

Pros: Laptop style keys, incredibly thin, well designed backlight.

Cons: Pricey for a keyboard, but as a programmer a good keyboard is essential.

G1 or wait?

With the G1 coming out in less than two weeks, I’m tempted to jump carriers to T-Mobile in order to pick one up. However, Sprint will apparently be releasing their Android phone “early next year.” With my phone on it’s last legs, I really need to get a new one soon, and I don’t know if I can hold out long enough for Sprint’s Android. T-Mobile’s network is also kind of spotty (and no 3G coverage in Louisville at all) while I’ve never had an issue with Sprint’s network.

Gah.

Android Development

I recently got the Android SDK set up and I’ve begun working on my inital Android project.  I’m not going to go into any details until I have something to show, but I’m hoping to have a good chunk of it written by the time the G1 releases in a couple weeks.

The Android SDK is really nice, and the documentation is excellent.  The only thing that took me a little while to figure out was how to add an addition GUI file.  For the record, if you add an xml file to the res/layout, Android will build it automatically.

I’ve also gotten Eclipse set up nicely, with Android and SVN integration.  I just wish Ubuntu would get newer versions of Eclipse in the repositories so I don’t have to keep installing it manually.