Mike is currently…

hanging out in Calgary

Pragmatic Version Control Using Subversion

[ subversion book ]

obligatory book plug

[ syndicate ]

rss 2.0 feed for boy meets world

[ contact ]

drop me a line

[ about ]

this is mike mason's weblog

[ eskimoman.net ]

original web pages



Google

Mon, 11 Aug 2003

This is an archived blog post. I've switched to using WordPress as my blogging software and have not migrated all my old posts. I believe strongly in not letting an old link die, so this page continues to work. Please do visit mikemason.ca/blog to read newer posts.

Laziness Is A Virtue

Good programmers are lazy. According to Larry Wall, creator of the Perl programming language, the three virtues of programming are laziness, impatience and hubris (in that order). I’d agree with the first two, I’m not yet cocky enough to think the code I write is the best it could be. You often see examples of laziness and impatience in the things that differentiate good programmers from mediocre ones.

Good programmers use a decent IDE like IntelliJ Idea or Eclipse, learning all the shortcut keys and hardly ever touching the mouse. Mediocre programmers might use an IDE if it’s forced on them, but don’t know their way around they keyboard, sometimes not even knowing standard Windows mechanisms for highlighting text, cutting and pasting.

Good programmers do something more than once, and figure out a way to do it faster the next time. If they estimate it’ll take longer to build a tool than to do the thing manually (obviously this depends on the number of times they think they’ll use the tool) it’s not worth the investment and they grit their teeth and get on with it. This goes for one-shot tools like a fancy find and replace which needs a bit of scripting – Perl or Ruby to the rescue. Mediocre programmers are often happy to do the same thing over and over, even when it’s pretty dull.

Good programmers realise the answer to most questions is “the computer can tell you”. Much of the time when someone asks a question, it’ll be the kind of question already asked by someone else, or at least the same class of question. This means there’s a tool, a menu option, or a piece of technology that tells you the answer – you just have to put a little effort into asking the question the right way. Performance questions are often the ones where mediocre programmers (or worse, mediocre “heads of development” or “lead programmers” or “architects”) assume they know all about the way a system works and jump right into reengineering bits of it. The computer knows which bits are slow – using a profiling tool is the right way of asking the question, and you’ll get real answers.

Rather than laziness, perhaps the wish to avoid doing boring things is what makes a difference between those who are good or great at something, and those who aren’t. Successful professionals like to share their knowledge and techniques, because it is not just proprietary information that makes them successful. Unfortunately, I’ve often seen mediocre people carefully guarding their knowledge because they think it makes their job safer, and because they don’t want to push the limits of their abilities. Figuring out how to spend more time doing interesting, fun stuff is what most people enjoy about their jobs – I certainly enjoy being lazy and getting the machine to do the hard work. I’m still working on the hubris thing though…

Posted 17:17, 11 Aug 2003.  

August
Mon Tue Wed Thu Fri Sat Sun
       
11

[ tim bacon ]

musings of an xp coach

[ ian bourke ]

enhancing core competencies since 1976

[ martin fowler ]

a cross between a blog and a wiki

[ alan francis ]

agile != good

[ paul hammant ]

part of the problem…

[ darren hobbs ]

the blog formerly known as pushing the envelope

[ mike roberts ]

on life and technology

[ chris stevenson ]

skizz-biz

[ joe walnes ]

joe's new jelly

[ rob baillie ]

oracle

Powered by Blosxom

Registered plugins: SmartyPants, antispam, bloglinks (v0.2), calendar (v0+6i), pluginfo (v1.0), and userstatus (v0.1)
This work is licensed under a Creative Commons License.