-
1. Re: How to Write Unmaintainable Code
juha Aug 24, 2002 8:01 AM (in response to juha)Ahh, reminds me of the infamous Catalogue entity in J2EE training.
Creative Miss-spelling
If you must use descriptive variable and function names, misspell them. By misspelling in some function and variable names, and spelling it correctly in others (such as SetPintleOpening SetPintalClosing) we effectively negate the use of grep or IDE search techniques. It works amazingly well. Add an international flavor by spelling tory or tori in different theatres/theaters. -
2. Re: How to Write Unmaintainable Code
juha Aug 24, 2002 8:05 AM (in response to juha)My favorite:
Mix Languages
Randomly intersperse two languages (human or computer). If your boss insists you use his language, tell him you can organise your thoughts better in your own language, or, if that does not work, allege linguistic discrimination and threaten to sue your employers for a vast sum. -
3. Re: How to Write Unmaintainable Code
joelvogt Aug 25, 2002 9:22 PM (in response to juha)I like this one
Dummy Interfaces: Write an empty interface called something like "WrittenByMe", and make all of your classes implement it. Then, write wrapper classes for any of Java's built-in classes that you use. The idea is to make sure that every single object in your program implements this interface. Finally, write all methods so that both their arguments and return types are WrittenByMe. This makes it nearly impossible to figure out what some methods do, and introduces all sorts of entertaining casting requirements. For a further extension, have each team member have his/her own personal interface (e.g., WrittenByJoe); any class worked on by a programmer gets to implement his/her interface. You can then arbitrary refer to objects by any one of a large number of meaningless interfaces! -
4. Re: How to Write Unmaintainable Code
hbaxmann Sep 5, 2002 5:23 PM (in response to juha)... and you are able this way to _really_use_ cvs versioning and logging features in conjunction with xdoclet to dive deeper and deeper ...
-
5. Re: How to Write Unmaintainable Code
phykell Sep 6, 2002 6:14 AM (in response to juha)My favourite is never to use your own name on your code. Always use the name of the last programmer that left the company. That way, they can never find who actually wrote the code! :)