Skip to content

Top funny source code comments

by Vinícius Krolow on setembro 14th, 2010
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?
}

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

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

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

1
// TODO: Fix this. Fix what?

1
2
3
// 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.

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

1
2
// 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.

1
double penetration; // ouch

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

At the bottom file:

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

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

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.

1
// drunk, fix later

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

1
2
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

Some more here

127 Comments
  1. Zehra Nasif permalink

    Funny comments at censorzilla –Mozilla source code comments
    http://www.jwz.org/doc/censorzilla.html

    // BULLSHIT ALERT: Get out if I can’t call GetSharedLibrary.

  2. Haha nice work..I’m sure we can relate to some of these

  3. Great job, i only wish they’re were more, and i checked the “more” link also.

  4. LOOOOOL
    this is sooo funny
    We developers are really poor

  5. Mikael permalink

    /*
    * [...] Note that 120 sec is defined in the protocol as the maximum
    * possible RTT. I guess we’ll have to use something other than TCP
    * to talk to the University of Mars.
    * PAWS allows us longer timeouts and large windows, so once implemented
    * ftp to mars will work nicely.
    */
    – from /usr/src/linux/net/inet/tcp.c, concerning RTT [round trip time]

  6. Craig permalink

    @Java Programming
    “LOOOOOL, this is sooo funny, We developers are really poor”

    You’re trying so desperately hard to appear to be a developer aren’t you? Try to learn the English language before you learn a programming language.

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

    This happens with me all the time!

  8. I love your blog post. It is very good.

  9. raythered permalink

    @Craig stop being such a troll, not all developers speek English, and from what I have seen even those that do have bloody awful English skills.

  10. Thanks For This Blog, was added to my bookmarks.

  11. sakthivadivel permalink

    Excellent ! is my comment for comments……………………

  12. hi add this comment

  13. ManiKumar permalink

    This Web page is terrible,must be block.

  14. Serwis posiada darmowe fotografie i filmy z serii warszawa anonse. Galerie erotyczne przeznaczone jedynie dla widzow doroslych. Codzienna aktualizacja materialow. Zobacz juz dzis!

  15. Élysson Mendes Rezende permalink

    hehehehe very fuuny =p

  16. Hello everyone!

    I’ve recently spotted fantastic

    kostka granitowa

  17. Scott permalink

    I made this while attempting to create a pagination script. It certainly works, but it’s the messiest thing I have EVER coded, BY FAR.

    //////////////////////////////////////////////////////

    $pgs=mysql_num_rows(mysql_query(“SELECT * FROM `posts`”))/$GLOBALS['pagination_break'];
    for ($p=1;$p<$pgs+1;$p+=1) {
    //Honestly this is the dirtiest peice of code I have every written. Don't even look at it, you'll burn your eyes, scorch your retinas,
    //your eyelids will peel off slowly, and you will a sudden urge to come and hunt me down with a tazer strapped to a fire axe. For the
    //safety of both me and you, and the cop that will end up ripping you off of my dead, sorry body, please do NOT look at the below if
    //statement, for it is a WET (coding term for repetitive) monstrosity. Thank you.
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //Basically what it does it stop all the paginated pages from showing up as the numbers at all, and only shows the ones at most 3 away
    //from the current page.
    if ($cur_page==$p+1|$cur_page==$p+2|$cur_page==$p+3|$cur_page==$p-1|$cur_page==$p-2|$cur_page==$p-3|$cur_page==$p) {
    if($cur_page==$p){echo "$p“;}else{echo “$p“;}
    echo “ ”;
    }
    }

    /////////////////////////////////////////////////////////

  18. Along with almost everything which appears to be developing throughout this subject material, your points of view are actually somewhat radical. On the other hand, I beg your pardon, because I can not subscribe to your whole theory, all be it radical none the less. It looks to everybody that your opinions are actually not entirely validated and in simple fact you are yourself not even completely confident of your assertion. In any event I did appreciate examining it.

  19. cheap 这个文章太棒了。
    The post is very good.

    OrderThe post is very good.
    这个文章太棒了。

    这个文章太棒了。
    The post is very good.

    review
    The post is very good.
    这个文章太棒了。

    for free
    The post is very good.
    这个文章太棒了。

    free trial
    The post is very good.
    这个文章太棒了。

  20. I You TV it`s http://www.i-you.tv/ online web camera for free live web cam show with best web cam girls.

  21. ROFL!!!!
    brilliant post immidietly got boomarked!

  22. Aw, this is an incredibly nice post. In idea I would like to put in writing like that also – spending time and actual energy to create a really good write-up

  23. Wonderful goods from you, man. Top funny source code comments | cObaia.net I’ve understand your stuff previous to and you’re just extremely wonderful. I really like what you’ve acquired here, certainly like what you’re stating and the way in which you say it. You make it enjoyable and you still take care of to keep it sensible. I cant wait to read much more from you. This is really a great Top funny source code comments | cObaia.net informations.

  24. sdfsfd

  25. Web design NJ company.Search engine optimization. Internet advertising agency. Development and promotion of websites in New Jersey. website design nj

  26. Fun, fun, fun!! =)

  27. Richard S. (Charleston SC) permalink

    //4-Anon
    function two_plus_two_equals_eight(with_a_mirror)
    {
    if (two_plus_two_equals_eight) {
    return happiness
    } else {
    return with_a_mirror
    }
    }

  28. ha ha.. very funny

  29. Greetings. I love your website.

Trackbacks & Pingbacks

  1. Twitted by divoxx
  2. Twitted by thiagoarrais
  3. Twitted by gstiebler
  4. Twitted by yankooliveira
  5. Twitted by daltonmatos
  6. Twitted by msbrogli
  7. Twitted by jaakkokallio
  8. Top funny source code comments - Cristian’s blog
  9. Top funny source code comments | cObaia.net « Netcrema – creme de la social news via digg + delicious + stumpleupon + reddit
  10. Actualités | Les commentaires de codes informatiques les plus drôles | Tranquilou
  11. === popurls.com === popular today
  12. Les commentaires en programmation
  13. Top funny source code comments | cObaia.net : Popular Links : eConsultant
  14. Najzabawniejsze komentarze żródła - develway.pl
  15. De la joie Dans Ton Commentaire … | The Geek Bar
  16. it’s raining « fauve fibres
  17. Funniest Source Code Comments @DebraUlrich #Amplify #RecoveryRelief « The Recovery Relief Blog
  18. Los mejores comentarios de código de programadores | Pisito en Madrid
  19. bancuri super tari - Page 47
  20. Top funny source code comments « deconectat
  21. I commenti più divertenti dei programmatori
  22. Nexse Portal » Per farci due risate
  23. Comentarios de código graciosos | cObaia.net « HiperEidon
  24. pinboard October 2, 2010 — arghh.net
  25. IнTересные ссылки №9 (2010-10-08) | IнTересности
  26. Komentaras
  27. Quando si programma troppo… | DoppiaVu’s Blog
  28. blaufasan » source code comments
  29. Geeks with humor • Onderweg Blog
  30. Lessons of the Code Monkey
  31. Best of StumbleUpon #1 | Rambling On About Shit
  32. » for a lazy Sunday afternoon Alina
  33. Top funny source code comments | Lean Labs
  34. Funny source code comments « Karen Torres
  35. webKnjaZ » Смішні комментарі в коді (переклад)
  36. Koda yorum nasil yazilmali « @author cagri kilit
  37. Os 10 melhores comentários em código « Marcio Belo
  38. Comentarii de prin cod culese de la alții | Blog i-Consult
  39. Flogiston » More linux snippets
  40. Most funny source code comments « Digitale Dummy
  41. Most funny source code comments « Digitale Dummy
  42. The World In Links [5/2-5/15] - Nicholas Kreidberg | Nicholas Kreidberg
  43. Basi di programmazione #11: Commenti | techNoDin.org
  44. Funny Source Code Comments
  45. Funny Source Code Comments
  46. diversao

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS