PDA

Pogčedajte punu verziju : How To Write Unmaintainable Code


oliver
13. 12. 2005., 05:37
Kontao sam da ovo stavim u "Programiranje", ali definitvno nije za taj podforum :)

How to write unmainteinable code (http://thc.org/root/phun/unmaintain.html)

Moji favoriti :) :cool:
* Lie in the comments: You don't have to actively lie, just fail to keep comments as up to date with the code.
* Document How Not Why: Document only the details of what a program does, not what it is attempting to accomplish. That way, if there is a bug, the fixer will have no clue what the code should be doing.
* Randomly capitalize the first letter of a syllable in the middle of a word.
* Use foreign language dictionaries as a source for variable names. For example, use the German punkt for point. Maintenance coders, without your firm grasp of German, will enjoy the multicultural experience of deciphering the meaning.
* Never use i for the innermost loop variable. Use anything but. Use i liberally for any other purpose especially for non-int variables. Similarly use n as a loop index.
* Long Similar Variable Names
* Nest as deeply as you can.