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===========================
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?
Top comments (15)
which translates more or less to
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
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".
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.
My favourite was this:
With the accompanying comment:
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!