How to write unmantainable code - The Kama Sutra
Date: 12/02/05
(Code WTF) Keywords: html
This technique has the added advantage of driving any users or documenters of the package to distraction as well as the maintenance programmers. Create a dozen overloaded variants of the same method that differ in only the most minute detail.
I think it was Oscar Wilde who observed that positions 47 and 115 of the Kama Sutra were the same except in 115 the woman had her fingers crossed.
Users of the package then have to carefully peruse the long list of methods to figure out just which variant to use. The technique also balloons the documentation and thus ensures it will more likely be out of date. If the boss asks why you are doing this, explain it is solely for the convenience of the users.
Again for the full effect, clone any common logic and sit back and wait for it the copies to gradually get out of sync.
Боянец, хотя почитать через год все-таки интересно, полная версия - http://thc.org/root/phun/unmaintain.html
Source: http://community.livejournal.com/code_wtf/19552.html