Best comments found in the source code ever.

Coding always involves comments. For a programmer, it becomes difficult for him to understand the code which he has written a year ago. So comments always came to rescue.  Since programming language doesn’t impose any restrictions on the comments( how even it can) Programmers often try to put some humor into the code.

As reading code can always be boring, some good comments can make someone;s day. Yes, comments that are insignificant in the execution of a program but are a very delight to the eyes of the coder who codes it.

As reading code can always be boring, some good comments can make someone’s day. Yes, comments that are insignificant in the execution of a program but are a very delight to the eyes of the coder who codes it.

So what about having some sarcasm in your code. Doesn’t it make the story a little more interesting? Yes, comments that are insignificant in the execution of a program but are a very delight to the eyes of the coder who codes it.

Comments are insignificant in the execution of a program but are a very delight to the eyes of the coder who codes it. So here is the list of some of the best comments found in the source code:

1. 

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

2. 

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

3. 

// Autogenerated, do not edit. All changes will be undone.

4.

// sometimes I believe compiler ignores all my comments.

5.

  1. //
  2. // Dear maintainer:
  3. //
  4. // Once you are done trying to ‘optimise’ this routine,
  5. // and have realised what a terrible mistake that was,
  6. // please increment the following counter as a warning
  7. // to the next guy:
  8. //
  9. // total_hours_wasted_here = 42
  10. //

6. 

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

7.

  1. Catch (Exception e) {
  2. //who cares?
  3. }

8. 

  1. /*
  2. * You may think you know what the following code does.
  3. * But you don’t. Trust me.
  4. * Fiddle with it, and you’ll spend many a sleepless
  5. * night cursing the moment you thought you’d be clever
  6. * enough to “optimise” the code below.
  7. * Now close this file and go play with something else.
  8. */

9.

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

10.

// If this comment is removed the program will blow up

So, these were some best comments found in the source code. Do share! 

  • Add Your Comment