zeldor.biz

Linux, programming and more

Copyright © 2023
Log in

Top funny source code comments

October 31, 2010 by Igor Drobot Leave a Comment

Some funny comments from different codes found around the net:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
/*
 * OK; before you read the following code know what I am trying to do.
 * I needed to get the list of child catagories from the root node so that
 * the root node didn't appear in the selection box. But for some stupid
 * fucking reason the stupid fucking DBA wont let me access the items using
 * indices and I instead have to use their stupid fucking Iterator
 * implementation. So there.
 */
$firstList = $this->getRootNode()->getChildren();
foreach ($firstList as $node)
{
    $nodes = $node->getChildren();
    break;                // wtf?
}

/* * OK; before you read the following code know what I am trying to do. * I needed to get the list of child catagories from the root node so that * the root node didn't appear in the selection box. But for some stupid * fucking reason the stupid fucking DBA wont let me access the items using * indices and I instead have to use their stupid fucking Iterator * implementation. So there. */ $firstList = $this->getRootNode()->getChildren(); foreach ($firstList as $node) { $nodes = $node->getChildren(); break; // wtf? }

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

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

1
//hack for ie browser (assuming that ie is a browser)

//hack for ie browser (assuming that ie is a browser)

1
2
3
4
5
6
7
8
/**
* 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.
*/

/** * 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. */

1
2
3
4
5
6
7
8
9
10
// 
// 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
//

// // 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 //

1
// TODO: Fix this. Fix what?

// TODO: Fix this. Fix what?

1
2
3
// no comments for you
// it was hard to write
// so it should be hard to read

// no comments for you // it was hard to write // so it should be hard to read

1
// I will give you two of my seventy-two virgins if you can fix this.

// I will give you two of my seventy-two virgins if you can fix this.

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

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

1
2
// I am not responsible of this code.
// They made me write it, against my will.

// I am not responsible of this code. // They made me write it, against my will.

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

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

1
double penetration; // ouch

double penetration; // ouch

1
# To understand recursion, see the bottom of this file.

# To understand recursion, see the bottom of this file.

at the buttom of files:

1
# To understand recursion, see the top of this file.

# To understand recursion, see the top of this file.

1
//I am not sure why this works but it fixes the problem.

//I am not sure why this works but it fixes the problem.

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

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

1
2
3
4
5
6
7
/*
 * You may think you know what the following code does.
 * But you dont. Trust me
 * Fiddle with me, and youll spend many a sleppless
 * night cursing the moment you thought you be clever 
 * enough to "optimize" the code below.
 * Now close this file and go play with something else.

/* * You may think you know what the following code does. * But you dont. Trust me * Fiddle with me, and youll spend many a sleppless * night cursing the moment you thought you be clever * enough to "optimize" the code below. * Now close this file and go play with something else.

1
// drunk, fix later

// drunk, fix later

1
// Magic. Do not touch.

// Magic. Do not touch.

1
2
3
// I dedicate all this code, all my work, to my wife, Darlene, who will
// have to support me and our three children and the dog once it gets
// released into the public

// I dedicate all this code, all my work, to my wife, Darlene, who will // have to support me and our three children and the dog once it gets // released into the public

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

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

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

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

Filed Under: Fun, Linux Tagged With: Funny code

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *