### Java Puzzlers. Be Afraid of the Dark.

 Apparently, Joshua Block and Neal Gafter started the "Java Puzzlers" idea at Oracle Open World 2001. I wish I was there.Subsequently, they've turned it into a book, and a website.If you program in Java, you must read this book. It covers the kind of traps in your code you wouldn't even imagine could be there.I can guarantee you have written at least one of these issues into your code. And QA never caught it. And it is out in the wild RIGHT NOW. Arrgh!!These days, I think (and hope) that most professional developers are relatively atuned to coding security issues and the rise of opinionated testing methodologies (Unit testing, TDD, BDD etc).
But this book is a real eye-opener to the range of issues that you wouldn't even think worthy of a unit test case.
public static boolean isOdd(int i) {  return i % 2 == 1;}
Seems like a reasonable test for odd numbers? Except it is wrong a quarter of the time.

And that is just puzzle #1.

The book takes you through issues with strings, loops, classes, libraries, all the way to puzzle #95, where you learn why you shouldn't program like your brother.

Get a flavour from this presentation on Scribd from JavaOne 2007...

### Java Puzzlers

 Apparently, Joshua Block and Neal Gafter started the "Java Puzzlers" idea at Oracle Open World 2001. I wish I was there.Subsequently, they've turned it into a book, and a website.If you program in Java, this is truly a must-read book.More on my tech blog.

### Lessons in Re-branding: My Aquarium and SpeedDate's Agressive Acquisition Strategy

The My Aquarium Facebook application will soon become .. a dating app??? WTF!

At first I thought it must be a joke, or someone hacked the developer's facebook account.

But amazingly, it seems for real. SpeedDate have apparently been acquiring quite a number of Facebook applications, and My Aquarium is just one of the latest.

I don't know what on earth they are thinking though. Do they seriously expect to just buy users like this? Isn't there a fundamental demographic and motivational mismatch between users of a cute aquarium app and the dating crowd (except by pure coincidence)?

Rather than endearing people to SpeedDate, I'd expect the reaction is more like this:

Get the hell of my Facebook page. First you buy up and kill off one of my apps, then you expect me to use your totally unrelated app? Get real!

Kind of like if Microsoft came along and bought up Adobe then sent an email to all Photoshop users saying they must all upgrade to Excel. Can you imagine the consumer revolt that would cause?

I don't know anything about SpeedDate, but this behaviour just makes me want to see them fail big time. Not a good PR position to be in...

### Zero Day Exploit

 I picked out Rob Shein's Zero Day Exploit: Countdown to Darkness (Cyber-Fiction) at the library simply because it stuck out as an obvious "computer book" in the fiction section. I thought it had been mis-shelved and so it caught my eye.I finished reading it because ... well, it is simply so bad as to have a kind of Ed Wood "B-movie" allure.It is a pity, because the idea has promise: a fictionalised cyber-security thriller that can almost double as a vulnerability assessment and computer forensics text because of the detail it includes.Unfortunately, the book would be better titled Zero Day FAIL!In terms of the computer security technicalities, it is really light weight, making only cursory reference to just a few of the most routine security issues and tools, and describing a methodology that is far from leading practice. The author's main characters are meant to be save-the-world "white hat" geniuses, but they come across as bumbling script-kiddie amateurs. Stuck debugging a program because they mis-spelt "main"? Forgot there might be a firewall in place? Found a vulnerability on the first attempt by sending a stream of É, "because it is a character know to cause buffer overflows". Sheesh!
As a novel, I don't think I've ever read a book so in need of a good editor than this. Just about every aspect needs work or a complete re-write: character development; dialogue; story arc; climax and resolution.

And did I mention the plot? It goes from sublime to the ridiculous, and then just peters away..

Mind you, even well-known authors can fall into the "sublime to the ridiculous" plot trap. Take Eric Van Lustbader for example, writing Robert Ludlum's (TM) The Bourne Sanction. Whereas Ludlum was a true master at pulling together incredibly complex and outlandish plots while never for a moment losing the credulity of his audience, Van Lustbader always seems to miss the mark by a little. And as a reader, once you start questioning the realism of characters' behaviour and the uncanny role of coincidences, then the magic of the story is quickly extinguished and the author has lost you.

I mention The Bourne Sanction for one further reason: like Zero Day Exploit, it features terrorists attempting to distroy the petroleum distribution infrastructure of the US. And the one thing that Rob Shein should feel happy about is that his scenario for how this could be done is way more credible than what Van Lustbader cooked up for The Bourne Sanction (which made me think Van Lustbader was probably script-consulting on Speed 2 at the time)

So was Zero Day Exploit mis-shelved? You bet. They missed the bin by a mile!