How To Write Unmaintainable Code

CMP home Java Glossary home Menu no menu Last updated 2003-10-17 by Roedy Green ©1997-2003 Canadian Mind Products.
You are here : home : Java Glossary : unmaintainable code.


Never ascribe to malice, that which can be explained by incompetence.


This essay has been like rock candy, seed the string with sugar, soak in sugar water, soon it grew out of control.

In the interests of creating employment opportunities in the Java programming field, I am passing on these tips from the masters on how to write code that is so difficult to maintain, that the people who come after you will take years to make even the simplest changes. Further, if you follow all these rules religiously, you will even guarantee yourself a lifetime of employment, since no one but you has a hope in hell of maintaining the code. Then again, if you followed all these rules religiously, even you wouldn't be able to maintain the code!

You don't want to overdo this. Your code should not look hopelessly unmaintainable, just be that way. Otherwise it stands the risk of being rewritten or refactored.

This giant essay has been split into sections to make it faster to load.

General Principles
Program Design
Coding Obfuscation
Choice Of Language
Dealing With Others
Roll Your Own
Tricks In Offbeat Languages
Miscellaneous Techniques
The Shoemaker Has No Shoes
Operation Termite
book_coverAntiPatterns: Refactoring Software, Architectures, and Projects in Crisis
William J. Brown, Raphael C. Malveau, Hays W. "Skip" McCormick, Thomas J. Mowbray
This is an amusing book that looks at what goes wrong in software development. Barnes and Noble chapters
The Interface Hall Of Shame.
You can get an updated copy of this page from