We all put comments in code from time to time. But being a consultant means I get a chance to work with many code bases and see many funny/aggressive/upsetting comments in code. What was the most interesting comment you've seen so far?
Let's have a laugh!
The worst out of context one I have seen in a codebase was :
It was in relation to nested todo lists before anyone asks :).
Ohhhh, this is good one
So someone wrote a function called "rm_rf" which recursively went through and deleted all of the directories and files. The comment said something like "hmm, now why didnt I just use exec('rm -rf')" then a day later in another commit "I dunno but I probably shouldn't change it, who knows what might happen"
The other one (I know 2 for 1 special) was just "oh boy" and nothing else.
Classic
There is a classic SO thread with many, many fine examples:
stackoverflow.com/questions/184618...
and from my own hand in a recent app, at least I remembered the references:
I love a good doco in the code 😂
Not from my code, but when these discussions come up I always think of that one time a person wrote a code out of pure spite, with method names like
private void MakeSureNobodyAccidentallyGetsBittenByRichardsStupidity()
stackoverflow.com/a/184673
That's brutal 😱
// TEMP FIX MUST CHANGE BEFORE PROD - MMV 02/01/98
😂
I'll have to edit this post (if I remember to), but I recently read a comment embedded in a recovered file relating to Spotify. It was something along the lines of "at some point this function wasn't needed, but we've left it in because we don't know when it was removed"