How to Write Unmaintainable Code

By Deane Barker on January 29, 2003

This is a classic of the geek-sphere. “How to Write Unmaintainable Code” is a humorous look at how to write code that will utterly destroy any attempt to change, fix, or maintain it. Some of it is downright evil:

“Let’s start off with probably the most fiendish technique ever devised: Compile the code to an executable. If it works, then just make one or two small little changes in the source code…in each module. But don’t bother recompiling these. You can do that later when you have more time, and when there’s time for debugging. When the hapless maintenance programmer years later makes a change and the code no longer works, she will erroneously assume it must be something she recently changed. You will send her off on a wild goose chase that will keep her busy for weeks.”

Man, that’s just wrong.