https://www.se.rit.edu/~tabeec/RIT_441/ ... 20Code.pdf
Me la sono letta ieri pomeriggio e poi ieri sera una seconda volta, vista l'eccellenza dell'opera

Si tratta di una raccolta di "regole" da seguire per evitare che colleghi o reviewers possano mettere il naso nei vostri codici sorgente (o perlomeno capirci qualcosa).
Si parte da quelle di facile implementazione e che piú che disturbare un po' non fanno:
Reuse Names
Wherever the rules of the language permit, give classes, constructors, methods, member variables, parameters and local variables the same names. For extrapoints, reuse local variable names inside {} blocks. The goal is to force the maintenance programmer to carefully examine the scope of every instance. In particular, in Java, make ordinary methods masquerade as constructors.
Ci sono anche consigli sull'architettura di programmi OOP:
Dummy Interfaces
Write an empty interface called something like "WrittenByMe", and make all of your classes implement it. Then, write wrapper classes for any ofJava'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!
Non mancano gli esempi di costrutti eleganti e/o esotici:
Jude the Obscure
Always look for the most obscure way to do common tasks. For example, instead of using arrays to convert an integer to the corresponding string, use code like this:
- Codice: Seleziona tutto
char *p;
switch (n)
{
case 1:
p = "one";
if (0)
case 2:
p = "two";
if (0)
case 3:
p = "three";
printf("%s", p);
break;
}
Buona lettura e buon divertimento

Boiler