Archive for June, 2007

Bad Code – First in a Series

Bad code. It’s out there. Sometimes you can correct it – other times you cannot. I would like to share a one liner I came across the other day. Unfortunately I could not change it since it was in a file that I was not working on.


int x = 4;
String num = x + "";

Argh! Why not use Integer’s static toString method?


int x = 4;
String num = Integer.toString(x);

Top shelf of a bookshelf

I always find it interesting when I look at what someone has placed on the top of their bookshelf. I’m not sure why. There could be an in-depth psychological reason on why we put the books we have on the top shelf as apposed to other shelves. If there is I don’t know it. I like to think that the material people like rises to the top.

On my shelf I have:

  • The Master and Commander Series (20 books) by Patrick O’Brian

  • Guns, Germs and Steel by Jared Diamond.
  • The Lord of the Rings Trilogy by JRR Tolkien
  • The National Dream and The Last Spike by Pierre Berton
  • Rebel Faye by B. & J.C. Hendee
  • Pragmatic Unit Testing by Andrew Hunt and David Thomas
  • Leading a Software Development Team by Richard Whitehead
  • Interface Oriented Design by Ken Pugh
  • Agile Retrospectives by Esther Derby and Diana Larsen
  • A manual for my camcorder
  • World of Warcraft Game Manual

I guess this sampling would say I enjoy fiction more than any other genre, and I have a strong interest in computers. What does your shelf say about you?