How To Write Unmaintainable Code – still my favourite
Waiting for a colleague to come in for a meeting, i decided to quickly read up on one of my most favourite white papers out there today.
Namely, how to write unmaintainable code…even though it was written a long time ago, i’m still enjoying the pun and the solid hilarious read.
Luckily, nobody i work with has ever gone to this extent in order to keep their jobs.
To foil the maintenance programmer, you have to understand how he thinks. He has your giant program. He has no time to read it all, much less understand it. He wants to rapidly find the place to make his change, make it and get out and have no unexpected side effects from the change.
Quidquid latine dictum sit, altum sonatur.
- Whatever is said in Latin sounds profound.
He views your code through a toilet paper tube. He can only see a tiny piece of your program at a time. You want to make sure he can never get at the big picture from doing that. You want to make it as hard as possible for him to find the code he is looking for. But even more important, you want to make it as awkward as possible for him to safely ignore anything.
Programmers are lulled into complacency by conventions. By every once in a while, by subtly violating convention, you force him to read every line of your code with a magnifying glass.
You might get the idea that every language feature makes code unmaintainable -- not so, only if properly misused.
Here’s the full read: How To Write Unmaintainable Code
How can you just not love it?