🔒 Locked
Intresting comments.
Advertisement
Original Post
Ive been cleaning up my sourcefile archives today and stumbled upon comments that are more or less comedy. A few examples from stuff written by myself or others in various projects.
(some from sourceforge, with alot of programmers)
"Undefine to disable internal datatypes. Nothing will work if you do however."
"Change this line again and I will stab you. // Troja (after 3h debug session)"
"Set to 0 for intresting results."
"UPDATE 99-01-14 : Added this comment."
"Not sure what this does, but it works"
"Added to support .xsa files. / Daz"
"We are not supporting .xsa - Riddler"
"Commented, since we dont support .xsa. Uncomment to support .xsa files / Daz"
Any more comical ones?
I found this one funny. In gl_rmain.c in the Quake 2 source:
#if 0 // commented out until H3D pays us the money they owe us
GL_DrawStereoPattern();
#endif
#if 0 // commented out until H3D pays us the money they owe us
GL_DrawStereoPattern();
#endif
// TODO: Write program
After some old rendering code for my first cube drawing program:
//HOT CUBE ON CUBE ACTION!
//It''s cubes gone wild!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"If people are good only because they fear punishment and hope for reward, then we are a sorry lot indeed." - Albert Einstein
//HOT CUBE ON CUBE ACTION!
//It''s cubes gone wild!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"If people are good only because they fear punishment and hope for reward, then we are a sorry lot indeed." - Albert Einstein
From various source of mine
//I wrote this at 3AM, If its not working its not my fault
//This is completely wrong, but it seems to work
//Might work, test at your own risk
//Doesn''t actually do anything
//thisiswhathappenswhenyouoverdoseoncaffine
--------------------------
Those who dance are considered insane by those who cannot hear the music.
Focus On: 3-D Models
//I wrote this at 3AM, If its not working its not my fault
//This is completely wrong, but it seems to work
//Might work, test at your own risk
//Doesn''t actually do anything
//thisiswhathappenswhenyouoverdoseoncaffine
--------------------------
Those who dance are considered insane by those who cannot hear the music.
Focus On: 3-D Models
I have things like this throughout my Input class:
if (mouse) delete mouse; //Deletes the mouse
return Mouse->Unacquire(); //Unacquire the mouse
return Keyboard->Acquire(); //Attempting to acquire the keyboard
etc.
Qui fut tout, et qui ne fut rien
Invader''s Realm
if (mouse) delete mouse; //Deletes the mouse
return Mouse->Unacquire(); //Unacquire the mouse
return Keyboard->Acquire(); //Attempting to acquire the keyboard
etc.
Qui fut tout, et qui ne fut rien
Invader''s Realm
On a particularly nasty little piece of satellite calibration code, I put the following comment:
// If you want to mess with the following, e-mail or call me first. If you don''t, and you break it, and then call or e-mail me, I will laugh at you, and hang up.
I''ve also been known to do the following:
// Touch and die.
// Touch at your own risk.
I once found a couple of lines of comment in some legacy code. The gist of it was:
// I''m sorry. We were out of time and money and they made me kluge it like this. I am so very, very, very sorry.
Needless to say, the following code made more sense after reading that.
-fel
// If you want to mess with the following, e-mail or call me first. If you don''t, and you break it, and then call or e-mail me, I will laugh at you, and hang up.
I''ve also been known to do the following:
// Touch and die.
// Touch at your own risk.
I once found a couple of lines of comment in some legacy code. The gist of it was:
// I''m sorry. We were out of time and money and they made me kluge it like this. I am so very, very, very sorry.
Needless to say, the following code made more sense after reading that.
-fel
Lots of folks don''t really understand the point of comments. A comment is not meant to be a hand-holding guide to the code, it is supposed to help understand the code. The vast majority of smart-ass comments and even humorous ones that folks post about most likely did indeed make the following code more understandable. 
I have put many comments into my code that were odd...
//Find out later why this works cause it shouldn''t
/*This comment is only here because
* the tard of an instructor requires
* comment blocks at the beggining of
* EVERY function no matter how trivial
*/
/*This woulda been hella easier to use
* a StringTokenizer but since the teacher
* does not garauntee the data to come in
* the proper format, we gotta parse it
* by hand...
*/
That last one was a pain, all out programs were submitted to a webserver that ran a series of batch tests on them. We were always told what format the data was, but the data fed to us was not always in the proper format. We had to deal with crappy data without resorting to "Bad data, try again..."
God was my co-pilot but we crashed in the mountains and I had to eat him...
I have put many comments into my code that were odd...
//Find out later why this works cause it shouldn''t
/*This comment is only here because
* the tard of an instructor requires
* comment blocks at the beggining of
* EVERY function no matter how trivial
*/
/*This woulda been hella easier to use
* a StringTokenizer but since the teacher
* does not garauntee the data to come in
* the proper format, we gotta parse it
* by hand...
*/
That last one was a pain, all out programs were submitted to a webserver that ran a series of batch tests on them. We were always told what format the data was, but the data fed to us was not always in the proper format. We had to deal with crappy data without resorting to "Bad data, try again..."
God was my co-pilot but we crashed in the mountains and I had to eat him...
bool yesno=0;
if(yesno==1)
{
}
else if(yesno==2)
{
}
else
{
cout << "This never should have happened.\n"; // no shit!
}
Resist everyone
Talk on RavForum(tm)
if(yesno==1)
{
}
else if(yesno==2)
{
}
else
{
cout << "This never should have happened.\n"; // no shit!
}
Resist everyone
Talk on RavForum(tm)
I saw in some other guy''s code something to this extent:
#define WHEN_PIGS_FLY if (1 == 2)
...
WHEN_PIGS_FLY
{
//there was some stuff here
}
Qui fut tout, et qui ne fut rien
Invader''s Realm
#define WHEN_PIGS_FLY if (1 == 2)
...
WHEN_PIGS_FLY
{
//there was some stuff here
}
Qui fut tout, et qui ne fut rien
Invader''s Realm
// START HEREafter a long break, don''t you need something to remind you where you were?
// THIS IS WHERE THE FREAKING BUG!ah...the neverending bugs
// NEED OPTIMIZATION!!!the code is badly implemented, but it still works, and i am really tired to think about it any longer. with this comment, perhaps sometime later i can go back and fix it.
/*
***************************************************
* Filename : main.cpp *
* Description : main file, everything is here. *
***************************************************
*/
a stupid introductory comment and I used to do.
return 0;
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement
