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.
There's a fascinating contest afoot since 1996 called "The Obfuscated Perl Contest." The idea is to write the most needlessly complex Perl program your evil little mind can think up. According to the Wikipedia page, there are four categories which tend to limit the size of the programs to just…