• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Unusual Code Comments

I've often seen:

Code:
// increment x
x++;

It's from people who believe that writing comments are what makes good code.

Not quite as blatant as yours, but a favourite of mine is

Code:
// Open the connection to the database
dbConnection.Open();
 
A long time ago in a land far away...

Code:
        MOVL    R9, R0                               ; STATUS, R0
        RET                                          ; ONLY HERE FOR THE BEER

The standard was a comment for every line, so even RET got one.
 
Code:
// Kick IE to force repaint
element.className = element.className;

Probably a candidate for "Weirdest workaround" as well :rolleyes:
 

Advertisers

Back
Top