28 Funny Code Comments Every Developer Should Read

They say:

“If you need comments to explain your code, the code is not showing its intend good enough.

But then,

If code, good or otherwise, didn’t need comments, the syntax for adding comments wouldn’t exist. Think about it.”

We have surfed the internet and hand-picked a few best code comments that the developers have written in their codes.

Read them and have fun…

# To understand recursion, see the bottom of this file
. (at the end of the code...)
# To understand recursion, see the top of this file

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

/* You are not meant to understand this */

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

chris wagner

Chris Wagner Says:
“As a programmer, I often end up struggling with codes that seem to work on my local machine but not on the webserver.

Issues can be related to the server – it can be a wrong configuration or simply server going down.

If you are looking to reliable server, with excellent support and great uptime, checkout GreenGreeks.

They are Geeks just like us & really green on the environment.”

# This is becoz you messed with me the other day
if current_admin.name == "#{my_x_employer}"
sleep(1000 * 3600)

// Drunk, fix later.

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

// Magic. Do not touch.

int getRandomNumber()
Return 4; // chosen by fair dice roll.
// guaranteed to be random.

// This code sucks, you know it and I know it. Move on and call me an idiot later.

Well, if you don’t want to end up messing your project and code, you should do Project Management and Code Management.

Backlog can definitely help you in this.

// I have to find a better job

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

last = first /* Biblical reference */

// I can't divide it with zero, so I have to divide it with something very similar result = number/0.00000000000001

#TODO: Figure out what I’m doing here and comment accordingly.

// If you are reading this, that means you have been put in charge of my previous project. I am sorry, so sorry for you. Godspeed.

// If this code is still being used when it stops working, then
// you have my permission to shoot me. Oh, you won't be able
// to - I'll be dead...

// If this code works, it was written by Paul DiLascia. If not, I don’t know who wrote it.

long time; /* know C */

// Once upon a time, two `array_map` calls were sitting there,
// but for some reasons, they triggered `E_WARNING`
// time to time (because of PHP bug [55416]
// (https://bugs.php.net/bug.php?id=55416).
// Now, they are gone.

//3.4 JeK My manager promised me a lap dance if I can fix this release
//3.5 JeK Still waiting for that dance from my manager
//3.6 JeK My manager got changed, the new manager is hairy, don’t want the dance anymore
//3.7 Jek Got that dance, yuck!

/* Ah ah ah! You'll never understand why this one works. */

//Mr. Compiler, please do not read this.

//open lid
//take shit
//close lid

//This was clearly written under duress.

// This code worked before, but my cat decided to take a trip across my keyboard...

// I wrote this while drunk, I don’t know what it does, but if you remove it the program breaks.


Hence proved, even the PROGRAMMERS can be humorous at times and jokes can be made on coding too.

After all, it is monotonous and for working on codes all day, you need to stay motivated. Why not have fun while doing this and enjoy coding?

These were just a few of them. If you have in mind any other funny comments (or have read it somewhere) that a coder can use, feel free to leave a reply and share it with us.

Let’s have fun together!

Write for us

Are you an enthusiastic tech-lover who keeps up with everything that moves in the trends? Or do you know computers inside out & can tell what makes it tick just by the look of it?

Well, we’ve been looking for you!

HostingPill is looking for Content Writers who have the skills to synthesise complex tech jargon into layman’s tongue and present it in an interesting article format.