joke code

Started by
13 comments, last by Servant of the Lord 11 years, 11 months ago
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;
Advertisement
Hmm? I don't get it. It looks like code I encounter on a daily basis...

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.

[quote name='fastcall22' timestamp='1334853299' post='4932860']
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.
[/quote]

Uh no...

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. sleep.png

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)


laugh.png
My favorite is still by far:

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


This one is a classic too:

#define break continue

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

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.

throw table_exception("(? ???)? ? ???");


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

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.

This topic is closed to new replies.

Advertisement