Program As If Your Maintenance Programmer Were Not a Barely-Competent Monkey – O’Reilly ONLamp Blog

Program As If Your Maintenance Programmer Were Not a Barely-Competent Monkey – O’Reilly ONLamp Blog:


Programming cannot be run on the convoy system, with the program code written to address the most ignorant, uneducated programmer. I think you have to assume that the next maintenance programmer will be competent….

This cuts both ways. I’ve spent hours deciphering “efficient” perl where it turns out there was a use of an implied $_ that made the damn stuff read like APL, unless you were (a) the original author or (b) Larry Wall. Programming assuming the next person to open up the hood is an idiot is bad, but so is assuming they’ve written the books we all us for references….

On the other hand, I’ve been spending the last couple of weeks detangling some code that was written by, well, people who were out of their depth. The most common phrase being uttered out of my office right now is “man, that would have gotten me flunked in first semester computer science classes”. I’d love to have some code written assuming I was an idiot — it might have comments. and default clauses in their case statements. ohwell.

I use the same philosophy in my coding that I use in my home remodelling: do it so that the person who comes after you isn’t saying the same things about you as you are about the person who did it the last time… Because who knows, maybe they’ll have a blog and willing to name names…

You might also want to read:

  1. administration and deferred maintenance… I’m spending some time this weekend catching up on some administrative things and deferred maintenance. Most of it is things nobody will notice, but a...
  2. Blog ...
  3. Yosemite Blog » Blog Archive » Late Night Rockfall Rattles Curry Village Yosemite Blog » Blog Archive » Late Night Rockfall Rattles Curry Village: “A small rockfall occurred at 2:53 am on Saturday, June 9 behind Curry...
  4. Say Good-Bye to Scott Mellanby – Sports Blog | NHL Blog – The FanHouse Say Good-Bye to Scott Mellanby – Sports Blog | NHL Blog – The FanHouse: Scott Mellanby, a folk hero to many Florida Panthers fans, and...
  5. The Future of Communities Blog » Blog Archive » Planning for Incivility – Why your online community needs moderators The Future of Communities Blog » Blog Archive » Planning for Incivility – Why your online community needs moderators: We know from our experience that...

  • chromatic

    I don’t mean that you should optimize your code for illegibility, but that there’s no good reason to avoid normal and useful idioms and patterns because novices might not understand them at a glance.
    Novices shouldn’t be maintaining code that matters, at least without supervision.