Programming Humor

Here are some of my favorite programming jokes. They are not original 😉

“Java is to JavaScript what Car is to Carpet”

Who is the Better Programmer?

Jesus and Satan have an argument as to who is the better programmer. This goes on for a few hours until they come to an agreement to hold a contest, with God as the Judge. They set themselves before their computers and begin. They type furiously, lines of code streaming up the screen, for several hours straight.

Seconds before the end of the competition, a bolt of lightning strikes, taking out the electricity. Moments later, the power is restored, and God announces that the contest is over. He asks Satan to show what he has come up with.

Satan is visibly upset and cries, “I have nothing, I lost it all when the power went out.”

“Very well, then, ” says God, “let us see if Jesus fared any better.”

Jesus enters a command, and the screen comes to life in vivid display, the voices of an angelic choir pours forth from the speakers.

Satan is astonished. He stutters, “B-b-but how?! I lost everything, yet Jesus’ program is Intact! How did he do it?”

God Chuckles, “Everybody knows…Jesus Saves.”

“Walking on water and developing software from a specification are easy if both are frozen.” -Edward V Berard

C More or Less

New Subject Oriented Programming Language

C+- (pronounced “C more or less”)

Unlike C++, C+- is a subject oriented language. Each C+- class instance,
known as a subject, holds hidden members, known as prejudices or
undeclared preferences, which are impervious to outside messages, as well
as public members known as boasts or claims. The following C operators
are overridden as shown:

>     better than
<     worse than 
>>    much better
<<    forget it
!     not on your life
==    comparable, other things being equal

C+- is a strongly typed language based on stereotyping and self-righteous
logic. The Boolean variables TRUE and FALSE (known as constants in less
realistic languages) are supplemented with CREDIBLE and DUBIOUS, which
are fuzzier than Zadeh’s traditional fuzzy categories. All Booleans can
be declared with the modifiers strong and weak. Weak implication is said
to “preserve deniability” and was added at the request of the D.O.D. to
ensure compatability with future versions of Ada. Well-formed falsehoods
(WFFs) are assignment-compatible with all booleans. What-if and why-not
interactions are aided by the special conditional evenifnot X then Y.

C+- supports information hiding and, among friend classes only, rumor
sharing. Borrowing from the Eiffel lexicon, non-friend classes can be
killed by arranging contracts. Note that friendships are intransitive,
volatile, and non-Abelian.

Single and multiple inheritance mechanisms are implemented with random
mutations. Disinheritance rules are covered by a complex probate
protocol. In addition to base, derived, virtual, and abstract classes,
C+- supports gut classes. In certain locales, polygamous derivations and
bastard classes are permitted. Elsewhere, loose coupling between classes
is illegal, so the marriage and divorce operators may be needed:

marriage (MParent1, FParent1);
//child classes can now be derived
sclass MySclass: public MParent1, FParent1
{ // define MySclass

sclass YourSclass: public MParent1, FParent2
// illegitimate

divorce (MParent1, FParent1);

marriage (MParent1, FParent2);
sclass YourSclass: public MParent1, FParent2
{ // OK now

Operator precedence rules can be suspended with the directive #pragma
, known as the “Do what I mean” pragma. ANSIfication will be firmly
resisted. C+-‘s slogan is “Be Your Own Standard.”

Totally Gridbag

I saw this animation at a programming conference, humorously approaching the challenges in working with some of the layout managers in Java. It does have a couple swear words in it, so if you are easily offended, or your boss is going to look at you funny if they hear this coming out of your computer speakers on your lunch break, don’t say I didn’t warn you ;-).

Quotes & One-Liners

  • “To understand recursion, you must first understand recursion.”
  • “There are only 10 types of people in the world: Those who understand binary, and those who don’t.”
  • “Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live.” –Martin Golding
  • “Good judgement comes from experience, and experience comes from bad judgement.” -Fred Brooks
  • “If there’s one thing worse than a program that doesn’t work when it should, it’s a program that does work when it shouldn’t.” – Bob Archer
  • “The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” -Tom Cargill
  • “Java is to JavaScript what Car is to Carpet”
  • “Everyone knows that debugging is twice as hard as writing a program in the first place. So if you’re as clever as you can be when you write it, how will you ever debug it?” -Brian Kernighan
  • “Testing can only prove the presence of bugs, not their absence.” -Edsger W. Dijkstra
  • “The paradox of software testing: In theory, testing software for correctness is impossible. In practice, it is given to freshmen because it’s the least demanding task available”
  • “Manually managing blocks of memory in C is like juggling bars of soap in a prison shower: It’s all fun and games until you forget about one of them.”
  • “Walking on water and developing software from a specification are easy if both are frozen.” -Edward V Berard
  • “It should be noted that no ethically-trained software engineer would ever consent to write a DestroyBaghdad procedure. Basic professional ethics would instead require him to write a DestroyCity procedure, to which Baghdad could be given as a parameter.” -Nathaniel S Borenstein
  • “Debugging is anticipated with distaste, performed with reluctance, and bragged about forever.” -Dan Kaminsky
  • “The most exciting phrase to hear in science, the one that heralds new discoveries, is not ‘Eureka!’ but ‘That’s funny…'” -Isaac Asimov
  • “The difference between theory and practice is smaller in theory than in practice.”

You Know Your Game is in Trouble When…

  • …when one of your engineers asks, “Is that an explosion or a tree?”.
  • …when the CPU count is higher than the polygon count.
  • …when you remove your debug code, and it runs slower, then stops.
  • …when the tanks float in midair, move sideways, then disappear.
  • …when you find sprintf(buf, NULL); in your boss’ code…
  • …when after a year and a half of development, your still arguing about which language you should be writing it in…
  • …when you see float temp; //<---DONT TAKE THIS OUT!!!!
  • …and while debugging, you notice that ‘temp’ is never assigned a value, and the memory is never even accessed…
  • …and you proceed to remove ‘temp’ anyway, and suddenly the code refuses to compile…
  • …so you put the offending variable back in, but it still won’t compile until you put the COMMENT back in too.
  • …when two terrain blocks fill up all available memory.
  • …when your management will cheerfully spend thousands of dollars to drag you across the country to work an emergency integration effort but won’t let you spend $50 on a new reference book….
  • …when a friend says the graphics are perfect…for radio…
  • …when a beta tester confuses the pre-pre-alpha version with the latest build…and prefers the former…
  • …when running your game doubles as an easy way to reboot your computer…
  • …when the copyright take up more disk space than the code…
  • …when you spend more time debugging the debug code than actually coding…
  • …when your co-programmer is scared to take out an #ifdef MACAROON because he can’t remember what it does anymore.