Intelligent Design theory of code
by Josh Staiger
After much deep thought, I've come to the conclusion that I'm not very smart. I'm forced to write good code because I'm not smart enough to write bad code.
Trying to read bad code makes my head hurt to the point where I want to stick a fork in my eye. The 1000 line method bodies...the layers and layers of nested loops and branches...the non-locally declared variables...non-descriptive names... I marvel at the intellectual heft necessary to make it all work. Genius. If only I could be half as smart as those who write this kind of code.
Or have I made a jump in logic somewhere?
Comments
Woah! That's amazing, because I've come to the same conclusion independently! I mean, not that you're not smart, but that I'm not smart because there's just no way I could write some of the code that I see daily. Sometimes I just marvel at that stuff and I wonder how it ever came to be. What masterstroke of a human state-machine-for-brains could've possibly conceptualized this? My only guess is that their code is actually more evolutionary in nature than mine, and I'm actually spotting some sort of local maxima on the quality terrain. Perhaps it started from random keywords, names, and assignments, then through the magical process of test'n'code it came to become a more organic and complexly structured ecosystem than I could ever envision (let alone understand).
As an aside, I think you're really smart--even if you don't get that code. Maybe that's just because I have some narcisistic notion of intelligence, placing favor on individuals who share my own characteristics? Nah. We're smart.
LOL. Bad day at the office reading other ppls code?
As a horrible programmer, I can tell you how it works...luck! Nothing at all to do with intelligence, except maybe the lack of intelligence.
Ooo. I live that stuff, too. Make sure to check out http://thedailywtf.com/ to see what drives forks through everyone elses eyes...