Barron of Blog Wife, Kids, and the Pursuit of Happiness

21Jun/070

Stupid Programmer

Bill Gates: Nerd StudI work on a computer for a living: in my current position I code Java, JavaScript, and SQL. The codebase in this project is very large, so many different groups across several different companies are constantly modifying something.

Usually the incoming code we see from these other coders is ok. But occasionally we see some astounding bad code that deserves to be put on a wall of shame.

I give you Exhibit A, a nice little snippet of JavaScript stupidity:
if ((document.Form1.theField.value == " ") ||
(document.Form1.theField.value == " ") ||
(document.Form1.theField.value == " ") ||
(document.Form1.theField.value == " ") ||
(document.Form1.theField.value == " ") ||
(document.Form1.theField.value == " ") ||
(document.Form1.theField.value == " ") ||
(document.Form1.theField.value == " ") ||
.... (continues for 30 more lines!)


Yikes! I sometimes make small mistakes or typos, but this... this is insane.

It's more than incompetent: the programmer should have their keyboard access permanently revoked. I wouldn't trust this person to write an e-mail without accidentally formating their hard drive.

Oh, and if you're wondering, the picture in this post is Bill Gates posing for a teenie magazine spread (back in the day).

Filed under: dev, geek, rant, work Leave a comment