Hacker News new | comments | show | ask | jobs | submit login
What is your best programmer joke? (hewgill.com)
73 points by pooriaazimi on Mar 2, 2013 | hide | past | web | favorite | 104 comments

Archivist here. The reason this page exists is it's part of an archive of deleted Stack Overflow content: http://meta.stackoverflow.com/questions/124850/unofficial-st...

The "programmer joke" and "programmer cartoon" questions were two of the most highly upvoted questions that have since been removed from the site because they aren't actually programming questions. I created this archive to attempt to preserve some of this early history of Stack Overflow.

Looks like it has been undeleted since I created the deleted question archive. The sands, they shift.

A programmer walks into a bar and orders 1.00000000001000000...897175 root beers. The bartender says, "I'll have to charge you extra; that's a root beer float". And the programmer says, "In that case, make it a double".

As someone who just recently tangled with floating point error, that was hilarious!

good laughs!

I got one to contribute.

Q: How do you obtain a random string?

A: Put a freshman compsci student in front of a vim terminal and tell him to save and quit.

"Oh, how I wish I could quit you!" First time VIM users

Definitely the right answer to gpg's "Please do some other work to give the OS a chance to collect more entropy!"

On the way to a sales call, a salesman, a project manager, and a programmer were kidnapped. When their employer refused to pay the ransom, the kidnappers granted each a last wish before killing them. The salesman said, "I still want to make the pitch I prepared for today. It's awesome and will only take an hour." The project manager said, "I still want to present my Powerpoint for this project. It's only 92 slides." The programmer said, "Kill me first."

Another version of that joke:

A mathematician, a scientist, and a dean were kidnapped. When their university refused to pay the ransom, the kipnappers announced that they would kill them all, but only after each got his last wish.

The mathematician said he had an elegant alternative proof to the four color theorem and would like to sketch it out. It would only take 1 hour.

The scientist wanted to show his proof that the universe is flat. It would only take 2 hours.

The dean said, "Kill me first."

And a Scandinavian version of this:

A Dane, a Swede and a Norwegian are sentenced to death. The Judge asks them if they have any last wishes.

The Dane says: "Eh, could I get a beer?"

The Norwegian says: "I want to make a speech about the injustice of this ruling!"

and the Swede says: "I want to be executed before the Norwegian."

The following anecdote about Steve Jobs is from [1]:

  I was sitting in Steve's office when Lynn Takahashi, Steve's assistant,
  announced Knuth's arrival. Steve bounced out of his chair,
  bounded over to the door and extended a welcoming hand.

  "It's a pleasure to meet you, Professor Knuth," Steve said.
  "I've read all of your books."

  "You're full of shit," Knuth responded.
[1] - http://www.folklore.org/StoryView.py?project=Macintosh&s...

There's a talk by Randall Munroe (xkcd) at google where this is debunked by Knuth himself. It also features him being asked questions about Python by Guido.


I know one about UDP, but it's ok, I don't know if you would get it.

I've heard this one phrased a bit differently:

I know a joke about UDP, but you might not get it..

I don't know if you would get it. I know one about UDP, but it's ok,

The final exam in my Networks class had a section with jokes and comics and you had to explain why they were funny. The following two were on it, among others:

The great thing about TCP jokes is you always get them.

A TCP packet walks into a bar and says, "I want a beer." The bartender asks, "You want a beer?" and the TCP packet says, "Yes, a beer."

I told this joke in front of an audience, in a one-man standup routine. It was titled "Multicast"

LOL. Is this a reference to the lack of error checking and ACK in UDP?

You didn't get it!


UDP packet walks into a bar. Bartender doesn't acknowledge him.

I know one about the GNOME text editor, but it's ok, you might not gedit.

This one is obviously better when telling someone in person...

love that one..

lold that one

I had a problem, so I thought I'd use Java. Now I have a ProblemFactory.

I believe the class you’re looking for is “ProblemFactoryManagerThreadLocalSingletonBeanAdapter”.

Three logicians walk into a bar...

Bartender: can I get you all a drink?

1st logician: maybe

2nd logician: maybe

3rd logician: yes

Q. What is the object oriented way of getting rich?

A. Inheritance

Multiple inheritance.

I particularly liked this one: http://www.projectcartoon.com/cartoon/1

"What the digg effect can do to your site."

That cartoon must be pretty old...

Hex color code jokes?

Dolphin gray: #eeeeee

Psycho killer gray: #fafafa

Eeeeee is the sound a dolphin makes. For the second one, please listen to Psycho Killer by The Talking Heads

At IBM, there was a project to figure out what made great programmers. They were going to give a psychological profile test to a group of their programmers. Unfortunately, they didn't have enough copies of the test. Luckily, the test came in two halves, so they just gave one half of the group the first half of the test, and the other half of the group the second half. After finishing the first section, and switching sections, the psychologist read the same directions as the first half, and then (expecting no response) asked "Any questions?", and was somewhat surprised when one of the best programmers in the group raised his hand. "Yes?"

"Are we supposed to use the same personality on this as we used on the first half?"

(From Gerald Weinberg's The Psychology of Computer Programming)

There are two hard things in Computer Science: cache invalidation, naming things, and off-by-one errors

If comics count, I think this one's pretty funny: http://www.explosm.net/comics/2083/

Apologies, but can someone explain this one to me?

    Q: Why don't jokes work in octal?
    A: Because 7 10 11.

The original joke goes like this:

    Why is 6 afraid of 7? 
    Because 7 8 [ate] 9.
In octal, this reads "Because 7 10 11", which doesn't work because our tendency is to read it as decimal, yielding "seven ten eleven".

Thanks! now it all makes sense :)

I like another variant of the joke (which would work in octal): Q: Why was 6 afraid of 7? A: Because 7 was a registered 6 offender

Quick octal explanation: In an octal system, each digit ranges from 0-7 (each digit in a binary system is either 0 or 1, or each digit in base 10 ranges from 0-9). Therefore, when you get to 8, you can't write 8; you have to use another digit and reset the first one back to zero, which gives you 10. 9 in base 10 is one higher than 8, so we just increment the first digit, which gives 11 in octal.

The original joke is: "Why is 6 afraid of 7? Because 7 8 9 (seven ate nine)." Obviously the original intent is lost when you use octal.

EDIT: Of course five of us decided to respond at the same time.

"Because seven ate (eight) nine" is the punch-line of another joke:

Why is the number six afraid?

It's a reference to the joke "why is six afraid of seven? ... because seven eight (ate) nine." I assume you get the octal part.

Greeting from TL.net.

Greetings to you too! :)

It's because that's 7 8 9 in octal

Now, you only need to get the '7 8 9' joke... Don't worry, I took a long time to get it.

Octal is base 8. Base 8(7,10,11) becomes Decimal(7,8,9).

7 8 9 is from the old joke where seven ate nine.

Did you hear about the computer programmer who died in the shower?

He was just following the instructions on the shampoo bottle: 'Lather, rinse, repeat.'

A programmers wife asks him to get some milk while he is out, she never sees him again.

Tom: Get me a sandwich. Joe: No. Tom: Sudo, get me a sandwich Joe: Okay.

One archangel to another:

Hey Gabe! Come over here... someone on earth has found a bug in your physics program.

Dear me, I thought I'd fixed that centuries ago.

Oh well, better late than never.

'tappity, clickety, tappity'. 'make; make deploy'

There, that'll do it. Another aeon, another bugfix.



I don't know if it qualifies as a joke, but I loved and learned from the Tao of Programming -- http://www.canonical.org/~kragen/tao-of-programming.html.

Too long to paste here, but it's stood the test of time.

A joke of the first order was told to a Scotchman, who was unable to see it.

The person (X) who told this joke told the story of how the joke was received to another Scotchman, thereby making a joke about a joke of the first order, and thus making a joke of the second order.

X remarked on this joke that no joke that no joke could penetrate the head of the Scotchman to whom the joke of the first order was told, even if it were fired into his head with a gun.

The Scotchman, after severe thought, replied: "But ye couldn't do that, ye know!"

X repeated the whole story, which constituted a joke of the third order, to a third Scotchman.

This last Scotchman again, after prolonged thought, replied; "He had ye there!" This whole story is a joke of the fourth order.

(from "The Philosophy of Mr. B-rtr-nd R-ss-ll", by Philip Jourdain)

No true Scotsman would do such things.

Scotsman not, er, what you said. I'm saving your life here!

Also, it's whisky (whiskey is the Irish variant), not scotch.

Just FYI.

Humor on Hacker News?

I thought I felt a disturbance in the source!

You can do humor on HN. It just has to be genuinely funny and original, and appropriate to the thread in question.


I loved the infocom reference!

And yes you're right, but people often complain about HN being a humorless void, when it simply isn't true.

A SQL query goes into a bar, walks over to a couple of tables, and asks, "Mind if I join you?"

One of the tables says, "Normally that would be OK, but we're only here for the view."

How do you tell an extraverted programmer from an introverted one?

An extraverted programmer stares at your shoes when talking to you.

The joke kind of loses something without the emphasis.

"An extraverted programmer stares at your shoes while talking to you."

Thanks. Corrected.

Here's my "April's Fool" joke on Stackoverflow:


I actually had to write a small API to make this compile.

Many of these are good, but why are so many of the quotes coming out as question marks?

A hacker walks into a bar. He sits at the counter for a few minutes and the bartender walks over.

He takes a look at the hacker and says "Ain't ya gonna have a drink?"

The hacker looks back almost offended "Don't you know, drinking is a sin!"

"ACK." Says the bartender, and he walks away.

Q: Why did the computer programmer show up to the Halloween party in a Santa suit?

A: OCT 31 = DEC 25

A programmer's wife gave her husband instructions for the grocery store: "Get a margarine, and if they have eggs get ten." He returns a while later, bringing ten margarines and saying: "They had eggs."

recursion, n. See "tail recursion".

tail recursion, n. See "tail recursion".

There are 3 types of people in the world, those that can count, and those that can't.

There is also the joke about someone finding a secret NASA lisp program. To prove it he sent the last 40 pages.

no there are 10 types of people does that can can count and those that can't, its a binary joke.

... those that understand binary and those that don't.

There are 10 types of people in the world. Those who understand ternary, those who don't, and those who though it was binary.

(Nice thing about this joke is that you can expand it to base-n)

There are 11 types of people in the world, those who understand unary and those who don't.

Writing code is like dealing with an Old Testament god. Lots of rules and no mercy.

Why programmers keep confusing Halloween with Christmas? Because Oct 31 == Dec 25.

Knock Knock.

Who's there? .



. .


. .


. .


. .


. .


. .


. .


. .


. .



This variation is better:

    - Knock Knock.
    - Who's there?
    [long pause]
    - Java

    - Knock Knock.
    - Who's there?
    - C

    - Knock Knock.
    - Assembly

- Forth - Knock Knock

Good one.

Once, Chuck Norris tried to code. The world went into a loop.

perl is an interesting language in that it is the only one that looks the same before and after RSA encryption.

Compiler? I don't even know her!

recursive: (λ damn. damn (damn)) (λ damn. damn (damn))

to be or not to be = ff

(2b OR NOT 2b)

Here is another version

question= ( to ) ? be : ! be;


if ((boy | girl)|Marriage){boy.freewill = false;} else if (boy != (boy | girl)) {boy.drinks = true;} else if (boy == girl){gay = true;}

two foos walk into a bar...

10 foos walk a bar ;)

When reading/reviewing a particularly bad piece of code in front of the person who wrote it, say:

If your language had true garbage collection, the compiler would have deleted this program upon execution.

When you have the attention of more than 3 passionate guru programmers, ask:

"Does the curley brace go on the first line of the for loop or on the next line?"

Laugh at any opinion given, calling them "silly".

Programmer asks for some advice on what data structure to best map his family tree:

2nd Programmer says: For you I would suggest a "directed acyclic graph".

But that's the right answer! How many distinct ancestors do you think you have 40 generations ago? We're all inbred by the pigeon-hole principle.

When Chuck Norris throws an exception, it’s across the room.

Any test for equality on ChuckNorris fails. He has no equals.

Chuck Norris invented programming. Why do you think it began with punch cards?

Chuck Norris never gets thread contention; threads cooperate if they want to live.

If Norris doesn't like your site, he duck-punches your Javascript until it works.

I attempted to kill -9 Chuck Norris and my keyboard shocked me for my impudence.

Chuck Norris can write Haskell... in assembler.

Two Programmers are walking along the sidewalk when both simultaneously spot a hundred dollar bill on the ground between them. They begin a lively discussion of the nature of the problem, what is right? What is moral, what is just? What would people of various religions say? Should we split it? Does might make right? They spend hours discussing the fascinating problem and what should be done about it. They finally decide to settle things like the enlightened manner appropriate for civilized beings. A game a rock paper scissors. While performing the game, a Religious figure runs up, grabs the money, waves around a knife and disappears back into the crowd.

Not programmer per se but the best one ever using "walks into a bar":

We don't allow faster-than-light neutrinos in here, says the bartender.

A neutrino walks into a bar.

Working on a coding project, one programmer asks the other who wrote up these project specifications?

Other programmer says: I can't tell you where the specs were designed, but be careful, the paper is still hot.

My program won't compile, I think I've lost one of my bits, can you help me find it? I think I dropped it on the carpet over there, it may have rolled under the desk.

While pair programming: "There!! It compiles!"..... SHIP IT!

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact