Jump to content

  • Log In with Google      Sign In   
  • Create Account


joke code


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
14 replies to this topic

#1 JohnnyCode   Members   -  Reputation: 95

Posted 19 April 2012 - 10:32 AM

Besides normal classic jokes, there is a funny thing that only we programers can laugh at. Here are two code jokes I made up:

try{
obj.Run(x);
catch
{
obj.Run(x);
}

and this

if (x==5)
x=5;


Sponsor:

#2 fastcall22   Crossbones+   -  Reputation: 2981

Posted 19 April 2012 - 10:34 AM

Hmm? I don't get it. It looks like code I encounter on a daily basis...

#3 way2lazy2care   Members   -  Reputation: 778

Posted 20 April 2012 - 08:41 AM

Hmm? I don't get it. It looks like code I encounter on a daily basis...

It's like making holocaust jokes in front of holocaust survivors.

#4 irreversible   Crossbones+   -  Reputation: 1094

Posted 21 April 2012 - 05:14 PM


Hmm? I don't get it. It looks like code I encounter on a daily basis...

It's like making holocaust jokes in front of holocaust survivors.


Uh no...

#5 Servant of the Lord   Crossbones+   -  Reputation: 14874

Posted 21 April 2012 - 07:01 PM

It's like making holocaust jokes in front of holocaust survivors.

3rd post, and Godwin's law takes effect already. And it's a thread about programming. Posted Image

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.

[Fly with me on Twitter] [Google+] [My broken website]

All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.                                                                                                                                                       [Need free cloud storage? I personally like DropBox]

Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal


#6 Servant of the Lord   Crossbones+   -  Reputation: 14874

Posted 21 April 2012 - 07:04 PM

Besides normal classic jokes, there is a funny thing that only we programers can laugh at. Here are two code jokes I made up:

try{
obj.Run(x);
catch
{
obj.Run(x);
}

That, depending on what the function call does, may actually be valid code (though it may not be smart code, it is valid and might be intentional). Unlike your second example, it actually has an effect on the code.

I thought this thread was about things like this:
#define NULL 0xFFFFFFF
#define true false
#define if(x) if(!(x))
#define while(x) if(x)

Posted Image

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.

[Fly with me on Twitter] [Google+] [My broken website]

All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.                                                                                                                                                       [Need free cloud storage? I personally like DropBox]

Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal


#7 Bacterius   Crossbones+   -  Reputation: 7009

Posted 21 April 2012 - 09:27 PM

My favorite is still by far:

#define false random()%2
#define true random()%2

This one is a classic too:

#define break continue

"The best comment is a deleted comment."


#8 Ravyne   Crossbones+   -  Reputation: 5670

Posted 21 April 2012 - 11:06 PM

My favorite is "while(1);"... placed on any random line, about 80 tabs out.

For bonus points, include a comment mocking the intended victim, preferably one calling into question the ethics of his mother around farm animals.

#9 FableFox   Members   -  Reputation: 445

Posted 21 April 2012 - 11:08 PM

My favorite is still by far:

#define false random()%2
#define true random()%2

This one is a classic too:

#define break continue


oh my god, don't tell me you secretly put that into someone code.. oh.. the debugging...
Fable Fox is Stronger <--- Fable Fox is Stronger Project

#10 FableFox   Members   -  Reputation: 445

Posted 21 April 2012 - 11:09 PM

My favorite is "while(1);"... placed on any random line, about 80 tabs out.

For bonus points, include a comment mocking the intended victim, preferably one calling into question the ethics of his mother around farm animals.


this one is less useful, I think there is a breakpoint or something that you can stop and the editor will show the location of the code.
Fable Fox is Stronger <--- Fable Fox is Stronger Project

#11 Ravyne   Crossbones+   -  Reputation: 5670

Posted 21 April 2012 - 11:11 PM


My favorite is "while(1);"... placed on any random line, about 80 tabs out.

For bonus points, include a comment mocking the intended victim, preferably one calling into question the ethics of his mother around farm animals.


this one is less useful, I think there is a breakpoint or something that you can stop and the editor will show the location of the code.


Depends on whether your intent is to drive them mad, or to deliver a more vicious payload :)

#12 Promit   Moderators   -  Reputation: 4672

Posted 21 April 2012 - 11:26 PM

Guys, don't go into comedy.

#13 Sik_the_hedgehog   Crossbones+   -  Reputation: 1411

Posted 22 April 2012 - 01:32 AM

oh my god, don't tell me you secretly put that into someone code.. oh.. the debugging...

I've seen worse examples:
// In the middle of a giant header nobody wants to
// look into but that's included about everywhere
#define if(x) if((x) && (rand() & 0x7FFF) != 0x1234)
Good luck debugging that.
Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.

#14 Wan   Members   -  Reputation: 1365

Posted 22 April 2012 - 10:01 AM

Hmm? I don't get it. It looks like code I encounter on a daily basis...

And you're the only programmer on the team!

(I challenge you all to make a worse joke)

#15 Servant of the Lord   Crossbones+   -  Reputation: 14874

Posted 22 April 2012 - 10:31 AM


Hmm? I don't get it. It looks like code I encounter on a daily basis...

And you're the only programmer on the team!

(I challenge you all to make a worse joke)


Altered fastcall22 post
It looks like code I encounter on a daily basis... And I was the lead developer for Windows NT.


It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.

[Fly with me on Twitter] [Google+] [My broken website]

All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.                                                                                                                                                       [Need free cloud storage? I personally like DropBox]

Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS