Most amusing I've seen was Java code that was rather over zealous about DRY and no-string-literals in code (i.e. all strings had to be define as constants).
public final static String COLON = ":";
public final static String SLASH = "/";
public final static String DOT = ".";
public final static String COM = "com";
[Apologies if this contains any Java syntax errors, I pretty much stopped using Java soon after this experience]
Also I've just realised that I'm really glad Java doesn't have a standard pre-processor - truly evil things would then have been possible <shudder>
This resulted in code like:
based on lots of definitions like: [Apologies if this contains any Java syntax errors, I pretty much stopped using Java soon after this experience]Also I've just realised that I'm really glad Java doesn't have a standard pre-processor - truly evil things would then have been possible <shudder>