What Is The Worst Comment In Your Code?

James on January 22, 2019

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 ... [Read Full]
markdown guide
# 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.

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

/* Why is it written like this? 
Now we're committed unless limitless
resources magically appear to afford
the refactor. Don't do this!
// hack, don't want to think about this

EDIT: Never mind, found a better one, for when I was refactoring a ps1 script written four years ago by another team:

# NOTE TO FUTURE DEVELOPERS: If you're wondering where things like
# "Set-OnlineCASMailbox" are defined, it comes from the import-pssession
# call on the Exchange/Lync/etc sessions. The names
# of the commands are changed by the -prefix argument.
# I have no idea why this is even a thing you can do in Powershell,
# but I'm not changing it. --Derek
  // TODO: this works 99% of the time
// To <Name redacted>: I will hunt you down and shoot you
// if you ever block an async call in this module again.

Years ago I remember being humored by the only comment in a very long Perl script; there were hundreds of lines with no comments at all, and about 2/3 of the way down the file there was a command which output some spaces to the screen with a comment on the end of the line "spaces".

print("        ");    // Spaces

I believe my reaction was something like: really out of all the things you write a comment for it is the most obvious thing in the whole file? I showed some of my colleagues at the time and we all had a good laugh about it.


It's a classic I never thought I'd get to see in real life, but a couple of weeks back I found this gem.

// limit is 70
const limit = 50
// TODO: This test is finicky; ignore its fails

I had this on a handful of tests that would randomly be like Expected 'long-ass string of content' but got '' though I think I fixed it today, so woo deleting todos!


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
      Bad code warning :(
      [6 line explanation of why I wrote the code]


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

// Yuck... --<name redacted>
// Double yuck... --<name redacted>
// 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....


Anything with


in it


//plz come back and clean this up


In my big honkin WordPress plugin I built:


code of conduct - report abuse