Click here to Skip to main content
15,851,131 members
Articles / Programming Languages / C++
Article

Amusing article comments

Rate me:
Please Sign up or sign in to vote.
4.93/5 (38 votes)
26 Jun 2001CPOL3 min read 393.5K   41   108
A collection of amusing comments found inside production code

Introduction

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.

Malcolm McMahon 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

Christian Graus

Here is a block of comments running between me and another developer here (Jono) over the course of a few months.

//Chunker File Format calls
/*******************************************************************/
//Jono's really cool stuff for sergei

//of course everything I write is *COOL*, but these chunks are worth mentioning...
/*******************************************************************/

// Some of us are more insecure than others, I guess...... 

// Damn your black heart Christian Graus....

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

//just ask jl if you can't understand that last line, I wrote it and I don't understand it.... 

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

// I am not an unreasonable person, but if anyone, and I mean ANYONE, ever has need to
// change the code below and/or put ifdefs into it, please, please, PLEASE ask me to do it
// or leave your name here. 

// If this code gets changed without a name being placed here, and the MRU or lastfilesaved 
// stops working as a result, I will compensate by killing everyone, in alphabetical order 
// of surname. Yes, Ben goes first, even though he doesn't touch the code. This is how
// irrational I am feeling on the subject.

J. Schacherl

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)."

Various

Favourite bad pointer values in hex:

  • 0xbaadf00d
  • 0xBeefBabe
  • 0xfeedface
  • 0xdeadc0de
  • 0xdeadbeef

Pavlos Touboulidis

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..."

Rick York

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 :

ICantBelieveIActuallyUsedAGoto

I laughed pretty hard when I saw this.

Greg Strauss:

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; 

Richard Cunday:

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

Dave Goodman:

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 
on you!

Anonymous contributions:

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"

RtroActiv

/**************************
This is a quick hack job
but since I'm leaving in
2 days... have fun.
***************************/

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder CodeProject
Canada Canada
Chris Maunder is the co-founder of CodeProject and ContentLab.com, and has been a prominent figure in the software development community for nearly 30 years. Hailing from Australia, Chris has a background in Mathematics, Astrophysics, Environmental Engineering and Defence Research. His programming endeavours span everything from FORTRAN on Super Computers, C++/MFC on Windows, through to to high-load .NET web applications and Python AI applications on everything from macOS to a Raspberry Pi. Chris is a full-stack developer who is as comfortable with SQL as he is with CSS.

In the late 1990s, he and his business partner David Cunningham recognized the need for a platform that would facilitate knowledge-sharing among developers, leading to the establishment of CodeProject.com in 1999. Chris's expertise in programming and his passion for fostering a collaborative environment have played a pivotal role in the success of CodeProject.com. Over the years, the website has grown into a vibrant community where programmers worldwide can connect, exchange ideas, and find solutions to coding challenges. Chris is a prolific contributor to the developer community through his articles and tutorials, and his latest passion project, CodeProject.AI.

In addition to his work with CodeProject.com, Chris co-founded ContentLab and DeveloperMedia, two projects focussed on helping companies make their Software Projects a success. Chris's roles included Product Development, Content Creation, Client Satisfaction and Systems Automation.

Comments and Discussions

 
Generalfictional comments from victor stone Pin
Zyxil27-Jun-01 5:51
Zyxil27-Jun-01 5:51 
GeneralCompiler Message Pin
Malcolm McMahon27-Jun-01 2:06
Malcolm McMahon27-Jun-01 2:06 
GeneralThis is an unedited reader contribution Pin
coder847227-Jun-01 1:37
coder847227-Jun-01 1:37 
GeneralRe: This is an unedited reader contribution Pin
Chris Maunder27-Jun-01 4:29
cofounderChris Maunder27-Jun-01 4:29 
GeneralRe: This is an unedited reader contribution Pin
[James Pullicino]28-Jun-01 4:46
[James Pullicino]28-Jun-01 4:46 
GeneralRe: This is an unedited reader contribution Pin
Chris Maunder28-Jun-01 4:54
cofounderChris Maunder28-Jun-01 4:54 
GeneralRe: This is an unedited reader contribution Pin
2-Jul-01 22:34
suss2-Jul-01 22:34 
GeneralMessageBox Pin
Skarrin27-Jun-01 0:51
Skarrin27-Jun-01 0:51 
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 Blush | :O so every now and then customers called our hotline and asked "WHO is this Eugen Eek! | :eek: and WHY should I call him?!?!"

A nice define:
#define THISISONLYDEFINEDHEREANDNOWHEREELSE 5

Line in a log file:
"Data successfully deleted (hopefully)."

Happy commenting Laugh | :laugh:
Jens
GeneralGenius at work Pin
Le Ridder Noir26-Jun-01 23:12
Le Ridder Noir26-Jun-01 23:12 
GeneralGenius at work again Pin
Le Ridder Noir26-Jun-01 23:23
Le Ridder Noir26-Jun-01 23:23 
GeneralFoo, it shall be so Pin
Paul Watson26-Jun-01 22:39
sitebuilderPaul Watson26-Jun-01 22:39 
QuestionRead the paper? Pin
Shankar Chandra Bose26-Jun-01 20:23
Shankar Chandra Bose26-Jun-01 20:23 
AnswerRe: Read the paper? Pin
Chris Maunder27-Jun-01 4:46
cofounderChris Maunder27-Jun-01 4:46 
GeneralFunny revision comment Pin
Michael Dunn26-Jun-01 16:04
sitebuilderMichael Dunn26-Jun-01 16:04 
GeneralA bad pointer in VC++ has the value of 0xbaadfood! Pin
Gleb Dolgich26-Jun-01 15:13
Gleb Dolgich26-Jun-01 15:13 
GeneralRe: A bad pointer in VC++ has the value of 0xbaadfood! Pin
Marc Brooks26-Jun-01 15:33
Marc Brooks26-Jun-01 15:33 
GeneralRe: A bad pointer in VC++ has the value of 0xbaadfood! Pin
Michael Dunn26-Jun-01 15:57
sitebuilderMichael Dunn26-Jun-01 15:57 
GeneralRe: A bad pointer in VC++ has the value of 0xbaadfood! Pin
Claudius Mokler27-Jun-01 2:14
Claudius Mokler27-Jun-01 2:14 
GeneralRe: A bad pointer in VC++ has the value of 0xbaadfood! Pin
Maximilien27-Jun-01 3:51
Maximilien27-Jun-01 3:51 
GeneralRe: A bad pointer in VC++ has the value of 0xbaadfood! Pin
Greg Strauss27-Jun-01 6:47
Greg Strauss27-Jun-01 6:47 
GeneralAn exchange of ideas.... Pin
Christian Graus26-Jun-01 14:02
protectorChristian Graus26-Jun-01 14:02 
GeneralMessage to crackers... Pin
Pavlos Touboulidis26-Jun-01 13:36
Pavlos Touboulidis26-Jun-01 13:36 
GeneralPass the electrodes Pin
26-Jun-01 8:36
suss26-Jun-01 8:36 
GeneralLabel in DefWindowProc() Pin
26-Jun-01 7:31
suss26-Jun-01 7:31 
GeneralVariable Naming Standards Pin
Greg Strauss26-Jun-01 6:59
Greg Strauss26-Jun-01 6:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.