What's the silliest or funniest code comment you have either come across or written yourself?

I would share some of my own, but I can't seem to figure out how to display a list of all code comments across my project in PHPStorm.

Recommended Answers

All 6 Replies

I had a PL/1 professor (worst ever) who had to write a pile of 360/Assembler code. It was a requirement that he document every line of code. There was no requirement that the comments be useful, or even polite so you ended up with a line of code followed by the comment

SAVE THE GOD DAMN M****RF***ING REGISTERS

He wasn't around long.

Every line of code? Ugh. I think that in a teaching environment, comments should have a 1-to-1 relationship with your pseudocode.

// Prompt for a series of numbers
[...]
// Calculate the mean, median, and mode
[...]
// Print the average of the numbers
[...]

// should not get here

Not a silly comment, but an unfortunate one. We discovered that a colleague had accidentally pasted the contents of a rather contentious email into the JavaDoc of a Java class. He reckons he must have been scrolling down a file with a wheel mouse and clicked the wheel without realising to paste the contents of his clipboard into the code. It was very unfortunate that it hit a comment so didn't cause a compilation failure. That email is in the commit history forever now.

One time we also had to spend a day or so removing all expletives from code comments because the bosses didn't think it was professional.

Oopsies!! :-P

// should not get here

That's a bit of a common one though. I have a bunch of // Sanitization check scattered about.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.