Introduction

If builders built buildings the way programmers write programs, then the first woodpecker that came along would destroy civilization.

~ Gerald Weinberg ( age: 84 ) Weinberg’s Second Law

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

~ Napoléon Bonaparte ( age: 51 )

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. The easiest way to navigate is to hit the next page button at the bottom left of each page.

Copyright

I would like to remind you this essay is copyrighted material. It is illegal to repost it without permission. I will usually give you that permission if you translate the essay into another language and if you provide a link back to the English-language original. I do this for three reasons.

That way any change I make to the essay is instantly reflected in any English-language copy anyone reads. That way the formatting and images are preserved. Pirated copies usually screw up the formatting. Google ad revenue from this essay is the main source of income from the website. It pays to keep me on the air.

Please report any copyright violations.