JavaScript in Plain English

New JavaScript and Web Development content every day. Follow to join our 3.5M+ monthly readers.

Follow publication

Member-only story

51 Funny Code Comments That People Actually Wrote

Sanjay Priyadarshi
JavaScript in Plain English
5 min readDec 15, 2021

--

Photo by Jimmy Conover on Unsplash

Code comments can make you laugh.

When you are stuck with a bug and feel frustrated. These code comments can lighten your mood. Reading funny comments can help you reduce stress when reading other developers’ code.

Few people don’t like to write comments. They try to code in such a way that it is self-documenting. But they don’t realize that comments can be written to entertain themselves and make others laugh.

Here I have found some code comments that will make you laugh.

1.

// Sometimes I believe Complier Ignore all my Comments:(

2.

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

3.

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

4.

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

5.

// Autogenerated, do

--

--

Published in JavaScript in Plain English

New JavaScript and Web Development content every day. Follow to join our 3.5M+ monthly readers.

Written by Sanjay Priyadarshi

Join a Community of People Who Love Javascript, Programming and Technology — codertoentrepreneurs.substack.com

Write a response