How to Write Unmaintainable Code

When I first began working with programmers, I never quite understood why they never liked taking over or maintaining an existing project that was coded by someone else. I used to think, “Code is code; it shouldn’t be so hard to figure out, right?” But then I started doing a little of my own programming and realized that: 1) there are a million different ways to design a system and 2) there are a million more different ways to document it.

Of course, I never thought they wrote code so they would intentionally be irreplaceable. Until I read How to Write Unmaintainable Code by Roedy Green.

One terrific excerpt:

Bedazzling Names

Choose variable names with irrelevant emotional connotation. e.g.:

marypoppins = (superman + starship) / god;

This confuses the reader because they have difficulty disassociating the emotional connotations of the words from the logic they’re trying to think about.

Oh, in case you were wondering, yes, he’s kidding (another Canadian with a sense of humor).

Both comments and trackbacks are currently closed