How To Write Unmaintainable Code
Insist on carrying outright orthogonal information in your Hungarian warts. Consider this real world example « a_crszkvc30LastNameCol ». It took a team of maintenance engineers nearly 3 days to figure out that this whopper variable name described a const, reference, function argument that was holding information from a database column of type Varchar[30] named « LastName » which was part of the table’s primary key. When properly combined with the principle that « all variables should be public » this technique has the power to render thousands of lines of source code obsolete instantly!
J’aime aussi beaucoup :
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!