Havoc's Blog

this blog contains blog posts

Month: January, 2011

Boolean parameters are wrong

Today’s simple way to improve your code. Say you’re reading a program and you see some lines like this: new ArrayBlockingQueue(10, false); box.pack_start(child, false, true); You don’t know what the booleans mean. Say you’re reading it and you see this: new ArrayBlockingQueue(10, Policy.FAIR); box.pack_start(child, Packing.FILL); Which is better? There’s only one time that a boolean […]

Nice photo

Asheville, Off the Tech Hub Grid

Software developers often find themselves considering a short list of west coast “tech hub” cities when they think about where to live. As Richard Florida points out, “the world is flat” theories are at least partially wrong; industries tend to concentrate in certain cities, where people can find each other, hire talent, network, and launch […]