This is the first article on a three part series about the virtues of a programer.
Laziness in this sense goes a good bit beyond phisical laziness. I’ll demonstrate with a short story that sumizes the point.
Back in undergrad one of the unix/c course assignements was writing a program able to solve hanoi towers. The point of the exercise was learning about signals and probably IPC. I forget.
As I walked by the row of vt220s my classmates were particularly busy coding 3 page functions choke full of switch/case and if/else structures. I couldn’t help being amazed at how industrious and hard working they were. And i mean that in the worst possible way.
I got home and stared at the ceiling for about 5 minutes (undergrad!), grabed the keyboard, coded about 7 lines and it worked on the first build. Let’s face it, it’s pretty hard to mess up just 7 lines.
When i went in the next day a good deal of my colleagues were elbow deep debuging a few hundred lines of spagetty code. They got there by being hard working and the wrong kind of lazy which is comonly called being an idiot.
Presented with a task they jumped right into it cause thinking is hard and they much prefered 2 or 3 hours of mind numbing coding. Also, spewing out klocs made them fell productive and geting work done.
I, on the other hand, would rather listen to a celine dion record than spend those 2 hours coding that drivel. So I Iazied out and changed the problem from solving hanoi towers to what’s the smallest amount of code that can solve hanoi towers.
At the other side of the process i ended up with a couple of for loops and a decision matrix. Got a boundry condition wrong ? Debug 5 lines. Piece going left instead of left ? Put the right decision in the matrix. How can you even consider unrolling the loops manually ? Crazy talk!
However, let’s see this from the manager point of view.
First pass: buttoned down developer working hard, weird developer chating on messenger.
Second pass: buttoned down developer still working hard, weird developer appears to be sleeping.
Third pass: buttoned down developer still working hard, other guy gone.
Next morning: buttoned down developer still working hard (debuging his own mistakes), other guy not there.
And that’s why most companies suck.