Funny programming pictures, jokes & quotes

Discussion about everything. New games, 3d math, development tips...
Post Reply
kazymjir
Posts: 727
Joined: Sat Feb 20, 2010 4:05 pm
Location: Munich, Bayern

Post by kazymjir »

Some interesting comments:
/*
* OK; before you read the following code know what I am trying to do.
* I needed to get the list of child catagories from the root node so that
* the root node didn't appear in the selection box. But for some stupid
* funking reason the stupid funking DBA wont let me access the items using
* indices and I instead have to use their stupid funking Iterator
* implementation. So there.
*/
$firstList = $this->getRootNode()->getChildren();
foreach ($firstList as $node)
{
$nodes = $node->getChildren();
break; // wtf?
}
// if i ever see this again i'm going to start bringing guns to work
/**
* For the brave souls who get this far: You are the chosen ones,
* the valiant knights of programming who toil away, without rest,
* fixing our most awful code. To you, true saviors, kings of men,
* I say this: never gonna give you up, never gonna let you down,
* never gonna run around and desert you. Never gonna make you cry,
* never gonna say goodbye. Never gonna tell a lie and hurt you.
*/
//
// Dear maintainer:
//
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
//
// total_hours_wasted_here = 16
//
// I will give you two of my seventy-two virgins if you can fix this.
//Dear future me. Please forgive me.
//I can't even begin to express how sorry I am.
options.BatchSize = 300; //Madness? THIS IS SPARTA!
double penetration; // ouch
/*
* You may think you know what the following code does.
* But you dont. Trust me
* Fiddle with me, and youll spend many a sleppless
* night cursing the moment you thought you be clever
* enough to "optimize" the code below.
* Now close this file and go play with something else.
*/
// Magic. Do not touch.
//When I wrote this, only God and I understood that I was doing
//Now, God only knows
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

Code: Select all

// I am not responsible of this code.
// They made me write it, against my will.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

aek AND greenya Made my day :lol:
Working on game: Marrbles (Currently stopped).
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

Yeah, keep the comments going... :lol:
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
kazymjir
Posts: 727
Joined: Sat Feb 20, 2010 4:05 pm
Location: Munich, Bayern

Post by kazymjir »

Ok, so here is rest of my collection :D
// sometimes I believe compiler ignores all my comments
return 1; # returns 1
// I'm sorry.
// Replaces with spaces the braces in cases where braces in places cause stasis
$str = str_replace(array("\{","\}")," ",$str);
long long ago; /* in a galaxy far far away */
// I am not sure if we need this, but too scared to delete.
// I have to find a better job
// hack for ie browser (assuming that ie is a browser)
ICantBelieveImUsingAGoto:
} catch (PartInitException pie) {
// Mmm... pie
// The ratio of a circle's circumference to its diameter. Remember to change
// this to 3.0 if you move to a site in Indiana.

#define Pi 3.1415927
About comment above: In Indiana they really assumed Pi as 3.0
// If this code works, it was written by Paul DiLascia. If not, I don't know who wrote it
/*

** The author disclaims copyright to this source code. In place of
** a legal notice, here is a blessing:
**
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely, never taking more than you give.

*/
About comment above:It's from sqlite sources
/* NOT FIT FOR HUMAN CONSUMPTION */
// (c) 2000 Applied Magic, Inc.
// Unauthorized use punishable by torture, mutilation, and vivisection.
//Haleluya i can go home!
// This will save us ~0.5 sec for every user and please the machine spirits.
// need a coffee to fix this.
// The root of all evil ... umm classes

About 10 years ago I was working at image processing, scanning microscope video frames to detect cell movement. I was working at a particulary intricated function and decided to go out and have a drink with friends. When I came back home I worked a little bit but not too much because I was drunk. The morning after I found a 10-line completely messed-up function with the following comment (obviously written by my other self):

/* Ah ah ah! You'll never understand why this one works. */

The strangest part was that it even worked.
Adler1337
Posts: 471
Joined: Sat Aug 09, 2008 6:10 pm
Location: In your base.

Post by Adler1337 »

// The ratio of a circle's circumference to its diameter. Remember to change
// this to 3.0 if you move to a site in Indiana.

#define Pi 3.1415927

About comment above: In Indiana they really assumed Pi as 3.0
I live in Indiana and never heard that. Weird. Lol I guess I should start changing my code.
multum in parvo
kazymjir
Posts: 727
Joined: Sat Feb 20, 2010 4:05 pm
Location: Munich, Bayern

Post by kazymjir »

Adler1337 wrote:
// The ratio of a circle's circumference to its diameter. Remember to change
// this to 3.0 if you move to a site in Indiana.

#define Pi 3.1415927

About comment above: In Indiana they really assumed Pi as 3.0
I live in Indiana and never heard that. Weird. Lol I guess I should start changing my code.

http://www.snopes.com/religion/pi.asp
Looks that i got cheated :D
I wonder how many people still think the same way about Pi=3.0 in Indiana :D
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

@aek: thank you. You saved my day. I gotta add some of these comments at work. When I started laughing my girlfriend sitting next to me asked why, so I read some of the comments, and I guess she now *finally* thinks I'm crazy.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
kazymjir
Posts: 727
Joined: Sat Feb 20, 2010 4:05 pm
Location: Munich, Bayern

Post by kazymjir »

Image
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post by ent1ty »

using namespace std; //so sue me!
#define true false //Happy debugging suckers!
//Adam's comment
/*
* I know this isn't a very efficient algorithm, but I ran out of time. Also,
I enjoy reinventing the wheel. So there!
*/
and http://i29.tinypic.com/10gidzr.jpg
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

Code: Select all

int totalNewFeatures = 3;
int totalWorkingNewFeatures = 0;

AddRandomDriver();
MessageBox("Driver incopatibility error!");

//printf("Welcome to Windows 2000.");
//printf("Welcome to Windows XP.");
printf("Welcome to Windows Vista.");
EPIC! :lol:
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

I wonder whats new on win7 :lol:
Working on game: Marrbles (Currently stopped).
kazymjir
Posts: 727
Joined: Sat Feb 20, 2010 4:05 pm
Location: Munich, Bayern

Post by kazymjir »

Saying that Java is good because it works on all platforms is like saying anal sex is good because it works on all genders.
stefbuet
Competition winner
Posts: 495
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

Post by stefbuet »

I don't known if it's really funny, but I didn't want to forgot what I was doing last time on my code, so I wrote this :

Code: Select all

for(unsigned int i=0; i<lights.size(); i++) {
         
    if(lights[i]->shadowCastingEnabled()) {
             
        std::cout<<"Hello! This is where the shadow map & comparaison is done per light..."<<std::endl;
        //but now I'm tired so I might go to bed.                              
                                               
     }//end if light cast shadows
 }//end for each light
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

serengeor wrote:
I wonder whats new on win7 :lol:
in win7 they implemented a feature called quadrupleCheckUserLicense() :lol: and also BSOD_2() :lol:
Post Reply