PDA

View Full Version : Funny Programming Website



MethodMan
09-13-2002, 10:52 PM
A friend of mine showed me this website, How to Write Unmaintainable Code, it looks really funny although I have only read a bit of it.



Single Letter Variable Names: If you call your variables a, b, c, then it will be impossible to search for instances of them using a simple text editor. Further, nobody will be able to guess what they are for. If anyone even hints at breaking the tradition honoured since FØRTRAN of using i, j, and k for indexing variables, namely replacing them with ii, jj and kk, warn them about what the Spanish Inquisition did to heretics.


I found this part really funny!

http://mindprod.com/unmain.html

face_master
09-13-2002, 10:59 PM
LOL! I found this part funny:
Recycle Your Variables: Wherever scope rules permit, reuse existing unrelated variable names. Similarly, use the same temporary variable for two unrelated purposes (purporting to save stack slots). For a fiendish variant, morph the variable, for example, assign a value to a variable at the top of a very long method, and then somewhere in the middle, change the meaning of the variable in a subtle way, such as converting it from a 0-based coordinate to a 1-based coordinate. Be certain not to document this change in meaning.