About Me

My photo
I'm a colonist who has declared war on machines and intend to conquer them some day. You'll often find me deep in the trenches fighting off bugs and ugly defects in code. When I'm not tappity-tapping at my WMD (also, known as keyboard), you'll find me chatting with friends, reading comics or playing a PC game.

Thursday, February 2, 2012

Lazy Programming

I am a slightly lazy programmer. There I said it! This doesn't necessarily mean that it's a bad thing to be lazy... Lazy programmers try to avoid doing grunt work. They are the ones who will write that tiny tool or that simple script just so they can get out of having to do a repetitive task. Those same utilities will end up being used by others and will in the long run boost productivity!

"So, is it good to be lazy?" - one might ask. The answer is - "It entirely depends...". You see, a lazy programmer can also be that fellow most people find uncooperative in a team. He might want to spend two whole days (at crunch time!) writing a script that would save him a few hours of continuous grunt work. If a lazy programmer is forced into a position where automating a task is quite infeasible, then BEWARE! The programmer will now unleash the beast within - moaning, groaning and cursing all the way through to task completion. Another area where lazy programmers don't fit in, is when they are called upon to debug someone else's code. Most programmers hate this part of the job but lazy programmers hate it even more! They will naturally point out flaws in the code architecture (ritually quoting design patterns that should have been used).

However, there is one very important thing that lazy programmers love to do! Lazy programmers love to design code. Give them a chance to do so and they will build you a very flexible and generic system (covering lots and lots of use-cases). The same system could be taken and simply "plugged" into other projects with similar requirements! Lazy programmers also tend to write very elegant code with fewer bugs by virtue of the fact that they encourage re-usability.

At the end of the day, Lazy programmers are bad soldiers but good Generals. Are you a lazy programmer? Let me know what you think constitutes a lazy programmer in the comments.

Happy (lazy) coding!

(Above comic, courtesy of http://xkcd.com)

1 comment:

Sarath C said...

Count me in as lazy programmer :)

I have seen people who creates simple small tools to make other people lazy! but most of these repertive task, I'd do with right tools which are already available rather than reinventing the wheel :)

Finally I believe "I want the world to use my code" not just peers :)