Last week I bought a new phone, a Nokia 6300. It has many features not present on my aging Siemens one, most importantly the ability to run Java applications.

With the ever-increasing demand for consumer electronics to be packed with features not traditionally associated with the appliance in question (e.g. a clock on a microwave, a camera on a phone, or a spoiler on a Skoda), the accepted way of deciding which to buy has shifted somewhat. A few years ago it was "I want one with features X, Y and Z, so I'll read the manufacturer's description". Now it's "I want one whose plethora of unwanted misfeatures doesn't make the phone crash at random resulting in its untimely death involving a high-velocity impact with the nearest wall, so I'll read some user reviews".

I'm pleased to say that, in accordance with what my bare minimum research determined was the prevailing opinion, the 6300 succeeds at being a phone. It hasn't crashed or done anything else you wouldn't expect a phone to do. That said, I do have one minor criticism. After a few minutes of inactivity, the screen switches off completely. This is, of course, a useful power-saving feature, but when you see the phone in this state, you're inclined to ask "is it just in power-save mode, or has it decided to switch itself off, as my other one used to do occasionally?" Besides this evidence of Nokia being rather out of touch with today's expectation that modern phones shouldn't work properly, they've done a good job.

Anyway, Java. I've always respected the platform. I especially like the idea of a language that compiles to a platform-independent representation which can then run, in principle, on any suitably-configured computer (or phone, or anything else1). Then there's the language itself; the rules on what you can and can't do are simply but comprehensively defined and designed and structured as well as you could expect (at least, better than C++), and the same can be said for the standard libraries. Granted, it lacks performance compared to some other platforms, but that, as we software developers are fond of saying, is an implementation issue. However, at university, where Java was the main language we were taught, for some reason I often disliked actually having to write things in it.

Now, I fully acknowledge this is more my problem than Java's, so I wrote a simple program. There's the "Hello World" one in the image above, and then I made this implementation of the board game Reversi.

My program losing at Reversi

Why Reversi? Because it's reasonably easy to code and to write a simple AI for.

So if for whatever reason you want to play Reversi on your phone, here's the .jar file. And here's the source, if anyone wants it. I compiled and packaged it with Sun's very useful Java Wireless Toolkit.

1 I say "anything" - obviously there are reasonable minimum expectations of the hardware. Don't expect to be able to run a fully-featured financial data aggregator on, say, a potato.