Wednesday, January 18, 2006

Ponder This

There are few books in the sphere of computing that are a must read, and for most that list is rather debatable. To me, there are 3-4, some only apply to java developers. The first, and one of the more debatable ones is The Mythical Man Month by Fred Brooks. The second is vaguely java specific, and that is Effective Java by Joshua Bloch. I say vaguely because many of the lessons taught in Effective Java are not Java specific, but use the Java language to demonstrate. There are many other books that could be number 3-4 and I'm not going to commit to them now, only say that there are books I haven't read that I probably should, and books I have read, that should be read by everyone else.

New to my book list, maybe not the essential list, but definitely on a list is Java puzzlers by Joshua Bloch and Neal Gafter. This books isn't essential because it deals with some of the more esoteric points of the Java language specification. Some of them are horrible mind bending nitty gritty points that should you ever stumble upon one in the form of a bug in your program, you may pull your hair out in frustration trying to fix the problem. I don't mean to say that the book is pointless, far from it. Instead of using it to trouble shoot a problem you may have, it gives you guidelines and stratagems to avoid the ugly problems.

The format of the book is what makes it great. Each issue is presented to you as a puzzle, they either give you a piece of code, and ask you what it will do, or give you a piece of code and ask you for the initial conditions that will make it break. In both cases it pushes you to discover a corner of the language specification you never imagined, and shows you how you can avoid a problem with it. From endless loops, to bizarre print outs, to miss-evaluated expressions, the book covers all sorts of oddities that you couldn't imagine. The book is a fun read, and worth while, sometimes it leaves you pondering a problem in disbelief. At which point you leap to the nearest java compiler to run the code in question only to have the book vindicate itself with bizarre behavior.

So the book is worth reading, if you are into that sort of thing. Many of the puzzles (at least in principle) work (or don't work as the case may be) in .Net, you just have to tweak them a little.

Finally the link of this post goes to IBM's Ponder This. Truly this is the play ground of nerds. Each problem is enough to tie your brain in a knot, and the little score board of "who solved it" gives you the kick in the backside needed to ponder deeply the hidden mathematics of it all. It is a site I was just directed to by Trevor but I will be adding it to my list of links to look in on from time to time. With that I leave you for the time being.

Ponder away
Post a Comment