Page 1 of 1

Top funny source code comments

Posted: Tue Sep 21, 2010 10:20 am
by sirwilliam

Re: Top funny source code comments

Posted: Tue Sep 21, 2010 11:21 am
by Sabre
Some of my favorites from there:

Code: Select all

// if i ever see this again i'm going to start bringing guns to work

/**
* For the brave souls who get this far: You are the chosen ones,
* the valiant knights of programming who toil away, without rest,
* fixing our most awful code. To you, true saviors, kings of men,
* I say this: never gonna give you up, never gonna let you down,
* never gonna run around and desert you. Never gonna make you cry,
* never gonna say goodbye. Never gonna tell a lie and hurt you.
*/

// 
// Dear maintainer:
// 
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
// 
// total_hours_wasted_here = 16
//

options.BatchSize = 300; //Madness? THIS IS SPARTA!

//Dear future me. Please forgive me.
//I can't even begin to express how sorry I am.

double penetration; // ouch

//somedev1 - 6/7/02 Adding temporary tracking of Logic screen
//somedev2 - 5/22/07 Temporary my ass

Exception up = new Exception("Something is really wrong.");
throw up; //ha ha

//When I wrote this, only God and I understood that I was doing
//Now, God only knows

/**
 * Always returns true.
 */
public boolean isAvailable() {
    return false;
}

#define TRUE FALSE //Happy debugging suckers

/* You are not meant to understand this */

// I don't know why I need this, but it stops the people being upside-down
x = -x;

mov si, pCard      ; captain?
I've seen a ton (and written a couple) in code every from the BSD Kernel to bash scripts... It's like geocaching, only with less exercise :) Funny story here. More examples here.

Re: Top funny source code comments

Posted: Tue Sep 21, 2010 12:36 pm
by complacent
some of those are really, really funny. :lol:

Re: Top funny source code comments

Posted: Wed Sep 22, 2010 1:31 am
by schvin
good ones :)

Re: Top funny source code comments

Posted: Wed Sep 22, 2010 9:30 am
by complacent

Code: Select all

// Replaces with spaces the braces in cases where braces in places cause stasis
   $str = str_replace(array("\{","\}")," ",$str);
^ is very clever.


and

Code: Select all

doRun.run();  // ... "a doo run run".
is probably the funniest biggie smalls reference i've ever seen.

Re: Top funny source code comments

Posted: Wed Sep 22, 2010 9:41 am
by sirwilliam
complacent wrote:

Code: Select all

doRun.run();  // ... "a doo run run".
is probably the funniest biggie smalls reference i've ever seen.
^^you sure that wasn't a Shawn Cassidy reference?

Image

I am pretty sure my sister had a crush on him. :lol: