Sunday, May 3, 2009

Confession of a formatting freak

Remember George Carlin's question, "Why is it that anyone who drives slower than you is an idiot, and anyone who drives faster than you is a maniac?"

Sigh. I feel like I'm being haunted by George today, as I try to keep perspective on the mass of so-called "instructional" code that is the basis for my homework project. That's not going so well, actually. Not the perspective part anyway.

And yes, yes, yes: I absolutely grok that your baby is always more beautiful than anyone else's baby. Come to think of it, I do feel rather maternal at the moment, wanting to glare down at the code's author, demanding, "Would it killlll you to use a little whitespace now and then?!?!"

But, in a sense, the fact that our coding styles are so poh-tay-toh, poh-tah-toh (okay, make that poh-tay-toh, parsnip) is a bona-fide mercy. To wit: The fact that I...errr..."tweak" the code to make it "mine" (e.g. Javadoc comments, multi-line if-statements, global variables flagged via"this-dot," setters-before-getters, and open-curly-brace-on-a-separate-line-darn-it-already, ad nauseum) means that I can't skim. I have to quote-unquote improve every single function of every single class, which slows me down enough that I have a passing chance understanding what's actually going on.

Which isn't the worst thing in the world. Because we all know that, no matter how good (or fetid) the legacy code is, knowing where the proverbial bodies are buried is at least half the battle, right?