PDA

View Full Version : OT: How to Write Unmaintainable Code


ultragaijin
04-15-2002, 02:24 AM
This is only for UBER-GEEKS... Don't click (http://mindprod.com/unmain.html) unless you find this funny:

Theme and Variations: Instead of using a parameter to a single method, create as many separate methods as you can. For example instead of setAlignment(int alignment) where alignment is an enumerated constant, for left, right, center, create three methods: setLeftAlignment, setRightAlignment, and setCenterAlignment. Of course, for the full effect, you must clone the common logic to make it hard to keep in sync.

This is also a good way to ensure you don't get fired.

cstaylor
04-30-2002, 11:53 PM
... between dumbass coding like that and everyone's obsession with XML as the Rosetta stone of file formats, we're lucky the Internet is still in one piece. 8O

ultragaijin
05-01-2002, 02:36 AM
Speaking of XML :wink:, you can syndicate our main site news using this backend.php (http://www.fuckedgaijin.com/backend.php) file.

http://www.fuckedgaijin.com/backend.php