How to Write Unmaintainable Code

If you're a developer and looking for a good lauch, you must check out this article, How to Write Unmaintainable Code. I'm going to include my favorites here:

1. Creative Misspelling

If you must use descriptive variable and function names, misspell them. By misspelling in some function and variable names, and spelling it correctly in others (such as SetPintleOpening SetPintalClosing) we effectively negate the use of grep or IDE search techniques.

2. Accented Letters

Use accented characters on variable names, e.g.:

typedef struct { int i; } ínt;

where the second ínt's í is actually i-acute. With only a simple text editor, it's nearly impossible to distinguish the slant of the accent mark.

3. Names from Mathematics

Choose variable names that masquerade as mathematical operators, e.g.:

openParen = ( slash + asterix ) / equals;

4. 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.

There's too many great ones, head over and read it!
Comments are closed

My Apps

Dark Skies Astrophotography Journal Vol 1 Explore The Moon
Mars Explorer Moons of Jupiter Messier Object Explorer
Brew Finder Earthquake Explorer Venus Explorer  

My Worldmap

Month List