-
Silly Jokes
Hi everyone,
I'm a huge fan of silly code snippets, made up and real ones. Here are some of my favorites:
Code:
int getRandomNumber()
{
return 4; // carefully chosen by rolling a dice
}
Code:
#define moin main
int moin(int argc, char *argv[]) {
// ...
}
If your German is a bit rusty, the last one probably needs some explanation: "moin" is generally accepted as short for "Guten Morgen"/"Hallo", which means "Good Morning"/"Hello" in English.
What else have you got?
Greets,
Philip
-
Trust people who name operating systems after horned beasts: How the way people code "Hello World" varies
My fav's were the "seasoned hacker" and "guru hacker"...!
Which is the same place I found "C+-: The first subject-oriented programming language". Hahaha...
ps. the only people who say "Good Morning"/"Hello" in English now-a-days are the same schizoid meglomaniacs who say "See You Later"/"Good Bye"/(pause)/"Farewell" and then throw in some Italian and Portuguese just to be sure.
-
-
Does this describe anyone near you?
Code:
struct freelancer {
short temper;
long lunch;
double money;
void *work;
char unstable;
};
More here
http://www.gnu.org/fun/jokes/declarations.html
-
one that I used in a program a while back:
Code:
#define hello int
#define world main
/* some other defines... */
hello world(hello World,hellO* WorlD he1L0) {...
-
Quote:
Originally Posted by
jEssYcAt
one that I used in a
program a while back:
Code:
#define hello int
#define world main
/* some other defines... */
hello world(hello World,hellO* WorlD he1L0) {...
I like it!, even I have no idea how that code can create that output! :D
-
Quote:
Code:
/* some other defines... */
Nice understatement!
Here's some more silly stuff:
Code:
/* YOUR KUNG-FU IS OLD AND NOW YOU MUST DIE!! */
exit(0);
From a Makefile:
Code:
love:
@echo not war.
And the famous comment from Unix Sixth Edition source code:
Code:
/* You are not expected to understand this */
More funny stuff can be found on Dennis Ritchie's homepage.
And for some profound insight on the quality of Linux source code, try the following:
Code:
grep -R "[Ff]uck" /usr/src/linux/
Greets,
Philip