Monday, January 25, 2010

Day 15

Its amazing what men can do. Its simply astounding to look at a website, see that it works and has all these neat features and nic-nacs... and then you look at the code and your brain drips away into a coma. These days, with Rails and all, its pretty easy to whip up a website, add some nice features, and show someone else your code without them vomiting. In fact, they might actually be able to add on to your code without leading to code rot. I think, however, it is the true test of man to be able to write an absolutely heaping... smoldering mass of what only a maladjusted juvenile from the pits of a decaying Sparta could call code, and then to be able to add features to it. Its kind of like going down a mile of slip and slide made of sand paper and coated with boiling oil saturated with salt... it takes some serious balls.

I saw this pile of code today. I swear when Micah opened the file a small chunk of my soul escaped into the null ether. Written primarily in PHP, coated in some HTML, and lathered with hidden chunks of JavaScript, this project was pretty nasty.

To begin I did some wikiearch (its like research... but with wiki's) and I discovered that PHP is quite similar to Java or C++ in syntax, but is more of a dynamic language. So unconcerned with my ability to decipher the meaning of some jolly PHP files, I joined up with Micah to look at the code.
Normally when I see experienced programmers look at a new batch of code, even if it is pretty cryptic, I see little flares or sparks in their eyes as they catch something familiar and gain a greater understanding of the code's intent. Sometimes I even see smirks as a connections are formed and the big picture sets in. Micah's face was solid, unflinching, and deeply determined to find any meaning in the code.

It's times like these that make me really appreciate knowing about this whole Agile - Craftsmanship world. All I could picture, as we attempted to decrypt the code, was a team of men trying to change the color of a single item of text on a page and as a result were pulling out gobs of rapidly graying hair, screaming and yelling in the ancient spirit of the blame game, and a pilling up the corpses of the developers before them.

This is why I will now vow that:
- I, Justin Martin, shall never, for any reason beholding, relinquish or let degrade my standards of code, and hereby choose to do unto my code that which I wish others would do unto me"

Perhaps a bit much... but just like a pendulum, when you swing far to one side you can't help but swing far back to the other.


3 comments:

  1. Sounds like you're in the wrong business, have you considered writing novels? :)
    Prose aside, it is a much greater effort to do quality work on a ball-of-mud code base, than on a cleaner one (this is the "Broken window" the pragmatic programmers were talking about).
    Hope you win the fight!

    ReplyDelete
  2. Interesting posts, but the blue and black is killing my eyes, dude. Yikes. Take it as a free usability bug report. Your code could work perfectly, and be elegant and all that, but if it's annoying to the end user, forget it.

    ReplyDelete
  3. Aviv - Heh, the way to win this fight is to just replace the entire building with all its broken windows. Thanks James Wilson!

    Jon - Appreciate the frankness. I originally used white on black, but heard that was a pain on the eyes. Blue on black seemed to work for me, but clearly was inadequate.

    ReplyDelete