DEV Community

James
James

Posted on

What Is The Worst Comment In Your Code?

Inspired by the thread Software developers of Reddit, what is the most shameful "fuck it, it works" piece of code you've ever written?, I wanted to ask what horrible/funny comments you have in your code.

In my main code base, 1000 lines in to a 2.5k line file, sits this beauty:

//================YOU ARE ENTERING HELL ON EARTH=======================
//======================THE PAIN STARTS HERE===========================
Enter fullscreen mode Exit fullscreen mode

I tried to refactor it once or twice, but I think I just got myself more jumbled as a result.

What signposts lie in the dark tunnels of your code to guide any unfortunate souls who had to venture that deep?

Oldest comments (15)

Collapse
 
chiangs profile image
Stephen Chiang • Edited
/* Why is it written like this? 
Now we're committed unless limitless
resources magically appear to afford
the refactor. Don't do this!
*/
Collapse
 
joppedc profile image
JoppeDC • Edited

I really loved this one, although its not from my project, rather from online :p
Exception up = new Exception("Something is really wrong.");
throw up; //ha ha

Collapse
 
alex_takitani profile image
Alex Takitani
# bleeeee bleeeeeee bleeeeeeeeeeeeee -> isso foi eu vomitando enquanto fazia esse codigo

which translates more or less to

# bleeeee bleeeeeee bleeeeeeeeeeeeee ->  this was me vomiting while coding this.
Collapse
 
owlgyle profile image
Owlgyle

//plz come back and clean this up

Collapse
 
vguarnaccia profile image
Vincent Guarnaccia • Edited

Somebody added two comments to code written by another team member:

// Yuck... --<name redacted>
// Double yuck... --<name redacted>
Collapse
 
y0mbo profile image
John Uhri • Edited
  // TODO: this works 99% of the time
Collapse
 
thomasrayner profile image
Thomas Rayner
// Will come back and fix this later

On a file that hasn't been touched in 3+ years. It's not very artistic or dramatic, but fffff....

Collapse
 
yorodm profile image
Yoandy Rodriguez Martinez
// To <Name redacted>: I will hunt you down and shoot you
// if you ever block an async call in this module again.
Enter fullscreen mode Exit fullscreen mode
Collapse
 
ferkungamaboobo profile image
Reid Thomas

In my big honkin WordPress plugin I built:

// USING $_GET IS $_KLUDGY_AS_FUQ

Collapse
 
sambenskin profile image
Sam Benskin

My favourite was this:

function sendSendmailMail

With the accompanying comment:

// Look, I don't even have time to name this function properly let alone write it