Funny source code/documentation/comments?
Background: my advanced data structures professor is in the annoying habit of giving us extra-credit questions in the form of fill-in-the-blanks from the voluminous C++ Standard. He claims that so far everyone our 27-person class has yet to produce a single correct answer, and that he was going to double the point value for each week that went by where no one got the answer correct. (I was speculating that we could, as a class, subvert this system by deliberately failing each question until the final quiz, and then cashing in a points bonanza. But then he capped the point limit at no more than the value of half the quiz. Bastard.)
Anyhow, this led me to check out a copy of the C++ (ISO 14882) standard from our library and perusing it in the hopes that the right phrase would stick. That's when I came across this limerick in section 14.7.3:
When writing a specialization,
Be careful about its location,
Else to make it compile
Will be such a trial
As to kindle its self-immolation.
I'm sure you guys have encountered similarly amusing snippets, documentation, or comment fragments. Any recent finds of noteworthiness?
Well, I'm always a fan of:
//what the hell does this do???
I found one in some stuff at work along the lines of
//Shit the bits
Missing an "f" gives the code a whole new meaning. We caught that one in our code inspection.[wink]
//what the hell does this do???
I found one in some stuff at work along the lines of
//Shit the bits
Missing an "f" gives the code a whole new meaning. We caught that one in our code inspection.[wink]
SDL_Surface* Screen; // Main Screen Turn On
This is the funniest comment I've ever put in my code, which demonstrates quite well how unfunny I really am.
This is the funniest comment I've ever put in my code, which demonstrates quite well how unfunny I really am.
In the linux source code there is a comment saying something along the lines of, "Fuck me gently with a chainsaw."
It's also amusing when you come across a huge block comment that describes why a line of code exists, and after reading it you're left utterly confused and still wondering why the line exists. Then you remove it, encounter problems, redebug the thing, add the line again with a new explanation, and a while later wonder why the line is there again.
Quote:Original post by Ainokea
In the linux source code there is a comment saying something along the lines of, "Fuck me gently with a chainsaw."
That's such a stupid saying, but it's used so often.
Mine are usually funny at the stupidity of them.
// Initialization Function
DWORD Initialize();
I remember going through some Xbox Live code for dealing with friend requests, and on detecting a new pending friend request there was the comment
// Someone wants to be our friend. Aww.
// Someone wants to be our friend. Aww.
I've come across an infinite loop that was commented:
//Until the cows come home...
along with a function called 'milk_the_cows'. (No this program had nothing to do with animals)
//Until the cows come home...
along with a function called 'milk_the_cows'. (No this program had nothing to do with animals)
Quote:Original post by ArchWizard
SDL_Surface* Screen; // Main Screen Turn On
This is the funniest comment I've ever put in my code, which demonstrates quite well how unfunny I really am.
I've done the equivalent. Actually, I had several lines of AYB commenting in a row for various subsystems. :)
Anyway. c2.com > k^2. Sorry.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement