Archive for the 'programming' Category

Don’t touch my braces!

Friday, February 24th, 2006

No, it’s not that my pants will fall down if you do, but my Java code might get a bit less intelligible.

Ed Burnette blogs on a nasty little “feature” of Eclipse. First, a little background

Java, C, and C++ share a little syntactic quirk that has bitten all developers on the rear from time to time. Take a look at this code:

if (condition)
doSomething();
doSomethingElse();

The “doSomethingElse();” code will always be executed regardless of the value of the condition because only the “doSomething();” statement is considered part of the “if”.

This has bitten me on more than one occasion on source code that has been checked into our repository and edited by multiple people, causing the indentation to get screwed up (eg tabs and spaces). Especially when you’re scanning code you’re not familiar with, indentation is a key indication of code blocks and nesting.

(more…)

“So I can extract all your knowledge…”

Friday, February 10th, 2006

I was just jokingly informed by my ten year old stepson that he intends to build “some kind of mind reading device, so I can extract all your knowledge about computers and rule the world!”

Hmmm, evil genius in training. After discussing whether we should inform his mother of his plans for world domination, he informed me that the reason *I* did not rule the world was because I don’t have a “master plan for world domination.” apparently, HE does. :-o

(more…)