Do you have this kind of comments in your source code?

  sonic0002        2016-08-01 10:25:14       47,025        14    

Writing runnable code is the essential skill of a programmer, writing understandable comment is also a skill a programmer should acquire. There is some famous saying that bad comment is worth than no comment. Usually your code will be maintained by other people, if you provide them some difficult to understand or misguided comments, this will be nightmare to them. While at some other time, programmers may put some funny comments in their codes which may make others laugh. Today we share some comments which are full of humor.

1. Send some warning to maintainer

// 

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

//

 

2. Mercy on the next maintainer

// When I wrote this, only God and I understood what I was doing

// Now, God only knows

 

3. Complaint about compiler

// sometimes I believe compiler ignores all my comments

 

4. Acknowledgement to his/her family

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

 

5. Better to do it later in this case

// drunk, fix later

 

6. Not convinced by himself/herself

// Magic. Do not touch.

 

7. Small trick

#define TRUE FALSE

// Happy debugging suckers

 

8. Good story teller

long long ago; /* in a galaxy far far away */

 

9. Miss in sync

/**

 * Always returns true.

 */

public boolean isAvailable() {

    return false;

}

 

10. There is really some problem

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

 

11. Only God knows

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

 

12. Comment comment

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

 

13. Recursion explained

// To understand recursion, see the bottom of this file
At bottom of the file
// To understand recursion, see the top of this file

 

14. Double penetration

double penetration; // ouch

 

15. Feel sorry now

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

 

16. Get away from the blame

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

 

17. IE is the victim

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

 

18. Famous TODO

// TODO : Fix this. Fix what?

Did you write this kind of comments in your source code before?  

HUMOR  COMMENT 

       

  RELATED


  14 COMMENTS


LapsedUnitarian [Reply]@ 2013-09-05 11:33:19

Back in the day when I was an IBM 370 BAL programmer (that's IBM 370 Assembler language for all you kiddies out there (and future computational aarcheologists ) the only acceptable comment was an 800 number and an hourly rate.

einstein [Reply]@ 2013-09-06 00:19:09

Why it return false at the end?

NightCat [Reply]@ 2013-09-06 00:54:39

This explains the statement bad comment is worse than no comment

BigFish [Reply]@ 2013-09-06 02:54:25

They really made me laugh.

Kazex [Reply]@ 2013-09-06 04:05:21
en??
li [Reply]@ 2013-09-06 08:55:02
this comment is just for fun!
hebomb2d [Reply]@ 2013-09-06 09:51:47

double kill

dennis [Reply]@ 2013-09-07 08:34:23

haha kidding

shawn` [Reply]@ 2013-09-09 20:34:06

haha..awesome!

kongxx [Reply]@ 2013-09-10 20:47:55

haha

4ttty [Reply]@ 2013-09-12 19:50:54

funny

gaia [Reply]@ 2013-09-15 05:28:36

The last one is so cute

EricLi [Reply]@ 2013-09-15 09:44:28

cool

fer [Reply]@ 2016-08-01 14:05:21

it made me laugh a lot, so true



  RANDOM FUN

When PM says we can meet the deadline