There have been a number of threads in the Lounge about amusing comments found in code. I was thinking that it would be fun to have a page devoted to the most amusing comments found in production code.
Be warned that posting code and or comments from your company's code may breach confidentiality or copyright, so ensure you have permission to post the comment text before doing so.
Please add your amusing comments in the discussion thread below. Periodically I'll sweep through the comments and incorporate them into the article itself.
The Pick of the Bunch so far.
I'll always remember with affection the message from a compiler on an old mini (for a peculiar language of its own). Instead of No Errors it came up with the, much more realistic,
None of your errors have been found
Here is a block of comments running between me and another developer here (Jono) over the course of a few months.
I'm not sure how he knew it was me, but I nearly fell over laughing when I found his reply....
Another comment from Jono
And a block I wrote after having to fix the portion of the code that remembered if the file had been saved since modification for about the 100th time because other people made changes to fit things they were doing
On a previous project, a colleague inserted a messagebox for our beta testers to track down some rare error condition. It says "If this comes up, please call Eugen at phone xxxxx."
Unfortunately he forgot to remove it in release version so every now and then customers called our hotline and asked "WHO is this Eugen and WHY should I call him?!?!"
Line in a log file: "Data successfully deleted (hopefully)."
Favourite bad pointer values in hex:
There's an application that provides free internet access. One time, it hanged so I had to terminate (kill) it. It died ok, but it poped up a MessageBox saying:
Caption: "XXX.exe - ABNORMAL TERMINATION ERROR!!!"
Text: "XXX.exe was forced to terminate...Due to a Hacking Attempt or because of a serious error. If you DID NOT try to CRACK XXX.exe Please Notify XXX Support!!! Else Don't Bother..."
I saw one of my all time favorites years ago in Norton's Programming Windows book. It was in the default windows procedure, DefWindowProc. The author used a goto and the target label was :
I laughed pretty hard when I saw this.
I once had a manager who had fairly strict on is source code standards. He had even written perl scripts that would walk through source code to find breeches in the "standards".
Once of his pet peeves were variable names that were too long... so I came across some old C++ code with the following variable declaration:
int nThisVariableDoesntDoAnythingButIsOnlyHereToPissOffTheCodePolice = 0;
The strangest comment I ran across, back in my mainframe development days, was the answer to a screen prompted question which an operator would receive after submitting a batch job incorrectly.
The screen prompt displayed the following message:
What killed the monkey in "Raiders of the Lost Ark?"
The answer did not appear on the operator screen but in the source code comments.
Correct Answer - Bad Date
On an Alpha Micro computer system I once saw the following error message:
It is a definite no-no to run BITMAP as a user command. Your nose will grow, your
lawn will die, your hair will fall out, and your first-born will marry an aardvark. Shame
I was disassmebling some code one time when I came across a very amusing message:
"If you can read this then you are too damn inquisitive"
The Lifeboat C compiler on the Apple II would display the following message when there were too many errors:
I'm so confused! Check you source code"
Current passion project: CodeProject.AI Server
. Please join in!
Chris is the Co-founder of the popular code-sharing site CodeProject.com, the digital advertising agency DeveloperMedia.com and the content marketing agency ContentLab.IO.
He's been programming way too long and has been, in various guides, an astrophysicist, mechanic, mathematician, physicist, breeder of carnivorous plants, hydrologist, geomorphologist, defence intelligence researcher and then, when all that got a bit rough on the nerves, a serial entrepreneur.
Chris has programmed everything from FORTRAN on a CRAY to Python on a Pi, but generally leans on TypeScript, C#, and SQL for the front, middle and back bits of his applications. His current focus is on ensuring developers know enough about Artificial Intelligence to be dangerous.