Hacker News new | comments | show | ask | jobs | submit login
What is your best programmer joke? (stackoverflow.com)
107 points by gregchapple 930 days ago | hide | past | web | 111 comments | favorite

A TCP packet walks into a bar, and says to the barman "Hello, I'd like a beer."

The barman replies "Hello, you'd like a beer?"

"Yes," replies the TCP packet, "I'd like a beer."

I'd tell you my UDP packet joke, but I'm not sure you'd get it.

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

A neutrino walks into a bar."

(read on /. years ago IIRC)

My delivery is: "I like telling UDP jokes because I don't care if you don't get them" then immediately walk away.

badumm-tish! Lol

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

I often use "There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors."

I prefer "There are 3 hard problems in computer science: cache invalidation and naming things."

My favorite on this vein is: "There are 10 types of people in the world: those who understand binary and those who don't."

I like this variation:

  There are 10 type of people in the world:
  Those who understand binary
  Those who don't
  And those who count from zero


There are 10 types of people in the world: those who understand binary, those who don't, and those who didn't expect this joke to be in base three.

I prefer, "There are 10 types of people in the world: those who understand hexadecimal and F the rest."

I know an accounting joke:

An engineer and an accountant are on a train when they pass between two fields of sheep.

"Boy, there are a lot of sheep in those fields." says the engineer.

"There are 1,005" says the accountant.

"How do you know?"

"Well, there are about 1,000 in that field, and there are 5 in the other one."

The thing about this joke is that the accountant is (kinda) right. Suppose they pass one field with about 1000 sheep and lots and lots of fields with ~5 sheep. Someone who thinks "about 1000" + 5 = "about 1000" is going to get a very wrong answer, and someone who thinks "about 1000" + 5 = "about 1005" is going to do much better.

This is also why, when combining floating-point values of different widths, it is better to say single + double -> double than single + double -> single, and why the concept of "significant figures" as commonly taught in schools is dangerous.

An accountant has her purse stolen. The first thing she does is make a debit entry in the appropriate account in the thieves' ledger.

My favorite was originally about the DEC minicomputer Field Services organization, known as "field circuses":

  Q: How can you recognize a field circus engineer
     with a flat tire?
  A: He's changing one tire at a time to see which one
     is flat.

  Q: How can you recognize a field circus engineer
     who is out of gas?
  A: He's changing one tire at a time to see which one
     is flat.

  Q: How can you tell it's *your* field circus engineer?
  A: The spare is flat, too. [1]

That particular organization may be long gone, but you can definitely spot the behavior. E.g., when calling front-line tech support and being asked to reboot and reinstall things that clearly don't matter.

[1] The Jargon File is full of little gems like this. http://zvon.org/comp/r/ref-Jargon_file.html#Terms~field_circ...

An mechanical engineer, physicist, and computer programmer are in a car driving down a steep mountain when the brakes fail. The careens around bends picking up speed until they finally reach the bottom and the car rolls to a stop.

The engineer hops out of the car and begins inspecting the brakes for the source of the failure. The physicist grabs a pad of paper and starts calculating the maximum angular momentum and friction coefficients.

The computer programmer looks at the car, then at the mountain and says, "let's push it up to the top and see if it happens again."

Some programmers prefer to intermingle functional code with imperative code, while others do not: they believe in the separation of Church and state.

Why don't communists make good Java programmers?

The class system has dissolved and the state controls everything.

Oh god! From the enterprise code I've seen, American large companies must be hotbeds of communism!

And now that I think about it, enterprise systems may be fully realized soviet states. There are long queues for often meager returns, there are a large number of factories that produce mysterious junk, security policies are both incomprehensible and harsh, and to get anything done, you have to know somebody.

This is pretty accurate, actually, and has been studied by economists, for whom this was a huge problem: If the free market is supposed to be so great, then why are firms not organized as markets internally? In fact, why do they exist in the first place? In a sense, the existence of firms is evidence that a free market is not the best organizing principle for everything.

You may want to start here: http://en.wikipedia.org/wiki/Theory_of_the_firm

My personal theory is that this is mainly about the primate dominance dynamic. Markets really do work better, but too many people would rather be the alpha monkey to care about little things like organizational effectiveness.

Of course, to bring this back on topic, as a software guy I'm inclined to think it's a hardware problem.

Since you're referring to the Wikipedia page, you are probably aware that there is a reasonable economic answer related to transaction costs and asymmetric information:

"Instead, for Coase the main reason to establish a firm is to avoid some of the transaction costs of using the price mechanism. These include discovering relevant prices (which can be reduced but not eliminated by purchasing this information through specialists), as well as the costs of negotiating and writing enforceable contracts for each transaction (which can be large if there is uncertainty). Moreover, contracts in an uncertain world will necessarily be incomplete and have to be frequently re-negotiated. The costs of haggling about division of surplus, particularly if there is asymmetric information and asset specificity, may be considerable."

They're also planned economies and run by politbyro.

Isn't state controlling everything normal for Java? Now if you tried to write OCaml...

How long does it take for a dyslexic programmer to get this joke?

Logn time

This article from devhumor: http://devhumor.com/193/

The assembly panel is very funny.

  >If you're happy and you know it, missing quote
  missing quote
  Not a verb

  >If you're happy and you know it, then your face will surely show it, If you're happy and you know it, syntax error
  syntax error

At a place where I used to work, someone had a car with one of those Virginia "Internet C@pital" license plates. The design has changed over the years, but this one put the @ in a big blue dot right in the lower center of the license plate. Sadly, I can't find a pic of this person's plate, or even that style of plate, anymore.

The license number was "CAR JPG".

I SO wish I had a pic to prove this.

Not sure if this is the one you are talking about, but a cursory image search on Google led me to this image in a Flickr set: http://www.flickr.com/photos/mrbee2828/92718344/

I don't see the '@' anywhere which leads me to believe this may be a fake/photoshop. Still, quite interesting... :)


In your picture it would be covered by the license plate frame.

That's not the design I remember -like I said, it has changed- but it does look like a similar vehicle. Maybe they got a new license plate?

Internet Catpital? Like, for lolcats?

Before I click, just a quick bet with myself this excellent question has been closed.

[edit] yep, locked. Thanks NullUserException! Now another quick bet with myself that someone will reply to this comment defending S.O.s repeated closure of interesting questions.

No one's complaining about the lack of cat photos and memegenerator links on Hacker News, but here we are again decrying Stack Overflow trying to keep its signal to noise ratio high.

The historical lock is an appeasement for those who like to binge on candy all day long and not realise a site built on 90% candy is no place for quality.

You're laying bets all over the place. How about putting forth a cogent argument why these type of questions need to reside on Stack Overflow and not on reddit or Hacker News?

Well put. There is actually a major difference between a joke thread here and a joke thread on Stack Overflow: on HN, it would be on the front page for a few hours or perhaps a day at most (less if the volume of comments triggered the anti-flamewar code). But on Stack Overflow, the joke thread was being bumped to the front page every day for months; any edit or new answer jumps it to the top again, even if that answer is a copy of six other answers.

I get incredible value out of Stack Overflow. Do you not?

Does the fact that this question is locked diminish its value or the value of Stack Overflow in any way?

Of course, Stack Overflow is not made for interesting questions. Notice that I am not defending this descision, I am merely stating it. You know this, which is why you were accurately able to predict that this question would be closed. Why is this interesting enough to warrant commenting that this is the case also today?

At least 4/5 of the times it comes up in a Google search (for the stuff I search for, at least), some idiot moderator has closed the question.

The message that sends to me is "Your question isn't worthy of our site. Go away."

So, yeah, it does make using the site less pleasant, and thus reduces its value to me.

Ditto. I stopped contributing to Stack Overflow because of this.

It's a classic example of cart-before-the-horse product thinking. Users aren't there to follow your orders; they're people with actual needs that you're trying to serve. I get that they don't want the site to be overrun with goofy content, because that prevents you from serving other actual needs. But there are better solutions than tasking a large number of people with running around and jerkily stomping out anything that doesn't fit the owners' precise vision.

I think this is the exact mistake that Friendster made. And really, the same one Google Plus made. Neither of those products were built for the users; they were built to serve the owners' desires.

Yes, the same with Wikipedia. The site has largely been taken over by people who are there simply to "be moderators".

And I see we have plenty of 'em here, too.

I spend 12+ hours a day coding, across a variety of technologies that I'm only semi-familiar with. Stack Overflow saves my sanity on an hourly basis.

It seems like 9/10 of the useful questions are closed by mods, though the answer is usually there anyway. I'm not sure what to make of that, but the quality there is still high.

Looks like I already won my bet that someone on HN was going to bitch and moan about closed questions again.

Surely you can make a good case for it on meta.stackoverflow.com?

Huh. I was pretty sure this was one question everyone could understand was off-topic, but I guess I was wrong.

Interestingly, this HN submission is illustrating the original reason Jeff Atwood locked the post in 2009 - nobody can be bothered to even read the first page before posting their own joke.

Of the 20+ pages already there, no one has yet posted the funny one from xkcd or Dilbert. No other site on the Internet can put these two sources together like Stack Overflow can.

There's another whole thread devoted to cartoons: http://stackoverflow.com/questions/84556/whats-your-favorite...

Yes, it's locked too, and it too was deleted for a year or so before the current crop of moderators undeleted and locked it.

Why should I have to "make my case"? I'm the customer (or at least the user), right?

If they don't get those mods on a leash pretty soon, someone else will come along and drink their milkshake and I won't have to do anything.

If you want to participate on the website, you should actually participate. If you do nothing, then other people are going to run the site and you won't have any input.

Why would I want to "actually participate" when 4/5 of the stuff that interests me has already been nuked by a moderator?

What's your point, then? You are explicitly stating that you have interest mostly in passively receiving stuff that's out of the site's scope, not interested in actively participating, and not interested in changing the site orientation.

In other words, the site is not interesting to you, yet you choose to rant about it; very strange. Does the very existence of StackOverflow bother you?

(There are other sites on the Internet, y'know. It's not like SO is preventing you from visiting /r/ProgrammerJokes instead.)

I didn't "explicitly" say any of that. And I'm not "ranting", either.

Other than that, great point.

"Does the very existence of StackOverflow bother you?"

No, but the existence of abusive moderators does.

When I run across locked threads on SO, I'm not searching for "jokes". These are actual programming-related questions.

Please don't imply that I said things that I didn't. Thanks.

I must have misunderstood then; I apologize for putting words into your mouth.

How about some examples? I was a diamond mod (Kev) for a while and the stuff we were closing either fell wildly outside the scope of the site, or was just spam/garbage.

If you're unhappy about a question being closed (the community can and does make mistakes) then bring it up on meta-SO. If the question was closed by mistake then more often than not it'll be re-opened if you explain why.

I wonder how long it takes before someone complains about StackOverflow closing subjective quest- never mind.

You won the first bet. Why not quit while you are ahead? ;)

Also, if you are betting with yourself, doesn't it mean that you lose when you win?

At the top of the page:

When I teach introductory computer science courses, I like to lighten the mood with some humor. Having a sense of fun about the material makes it less frustrating and more memorable, and it's even motivating if the joke requires some technical understanding to 'get it'!

When put in this context, I think the question has some value. Being honest, programming can be very dry at times. The most mirth inducing stuff I have read in relation to programming is when programmers complain about programming languages, I think SO had a question addressing this issue.

An electrical engineer from GE, a chemical engineer from DuPont and a Windows kernel developer from Microsoft are in a car, driving along a desert road.

At some point the car malfunctions and comes to a stop. The following discussion ensues:

GE guy: "It's because there are some crossed wires in the electrical system that regulates the engine."

DuPont Guy: "Don't be ridiculous, this is clearly caused by a wrong mix of gasoline and oxygen going into the cylinders."

MS guy: "Why don't we all get out of the car, close the doors, reopen the doors, get back into the car, and try again."

The variation I like is this:

An electrical engineer, a mechanical engineer and a software engineer from Microsoft are riding in a car, when they start down a steep hill. Halfway down the brakes go out and the car crashes into a tree at the bottom of the hill. Luckily, no one is hurt, so they get out and start analyzing what happened.

Electrical engineer: Clearly a short-circuit in the ABS system caused the brakes to go out.

Mechanical engineer: No, no, it was an over-pressure situation that caused a brake line to rupture.

They both turn to the Microsoft guy and ask him for his opinion:

Microsoft guy: I don't know, but let's push the car back to the top of the hill and try it again.

Two regular expressions are sitting at a bar and having a drink. A big, context-sensitive string walks over and steals the drink from the first regex. The second says to the first "Are you going to let him bully you like that?" The first replies "Yeah, I'm no match for him."

Sticker on car: "My other car is a cdr".

He cdr got a cadr. A cadr is a real car.

>"locked by NullUserException"

I was hoping that were a joke :(

To go off topic a bit here - all these SO articles that are not pinpointed programming questions are always closed or locked. You can no longer ask these kind of open ended, leading to a debate kind of questions on SO anymore. The questions have to be very focused and narrow so that someone can answer it to get points. Its really disappointing but that is just the way the community took it in - pedantic.

On SO, mod points are granted by how many "points" you have. The idea is that if you have that many points, you got them by asking good questions, writing good answers, and generally being a good citizen on the site. But if you allow jokes or open-ended questions, then people get tons of points and mod powers even it they don't really contribute to the content of the site.

It would help if they allowed open-ended questions that are marked "community wiki" (which means the author doesn't get points for the post). But you'd still end up with a lot of off-topic content getting upvoted on the front page which would be annoying.

"It would help if they allowed open-ended questions that are marked "community wiki""

And then we'd have quora, which would not be Stack Overflow. The intention of the site from day one was to encourage specific answerable programming questions that do not involve endless open ended discussion.

I truly believe this narrow scope of acceptable question type is why the site is hugely popular.

I don't understand how people don't get this even after five and a half years.

Why programmers keep confusing Halloween and Christmas?

Because Oct 31 == Dec 25.

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

Yes - see the earlier comment: https://news.ycombinator.com/item?id=7036510

Redundancy is a key part of unreliable protocol jokes.


Why couldn't the computer scientist plough the field? It was intractorable.

A couple originals:

- Javascript programmers have no class.

- Psst...did you hear Haskell is stateless? Pass it on.

At a friend's wedding, I delivered the toast which was a long list of "To X!" items, where X was something special to/for/about the couple. This worked spectacularly well. Including the dead silence & puzzled looks, and seething consternation from the groom, at "To RTFM!" halfway thru.

Oh btw, did you have a toast "to X" too, or just "to ${X}"?

An architect, an engineer and a programmer are discussing God:

Architect: Of course God was an architect! Look at the world! It's so beautiful and well composed!

Engineer: Nah, you don't know what you're saying! God was an engineer! Look at the universe and all it contains!

Programmer: Pfft... who do you think created chaos?

There are three kinds of people in the world: the ones who understand binary and the ones who don't.

That's a weird non-joke version. The ones I know are:

The usual:

    There are 10 kinds of people in the world, those
        that understand binary and those that don't.
Then there was:

    There are 11 kinds of people in the world, those
        that understand binary and those that don't.
Which is a riff on:

    There are 3 kinds of people in the world, those
        who can count, and those who can't.
Then along came:

    There are 10 kinds of people in the world, those
        that understand binary, those that don't, and
        those that didn't expect this joke to be in
Yours, on the other hand, just doesn't really make sense. Maybe I'm missing something ...

Maybe he's a SQL programmer (a binary column can be true, false or NULL).


    There are 11 kinds of people in the world, those
    who understand binary and those who confuse it with Gray code.

The joke is he doesn't get binary.

...or off by 1 error.

OK, I'm confused too :)

There are 10 kinds of people in the world. Those who understand binary, those who don't, and those who didn't expect this to be in base 3.

I always hated this joke because to me understanding binary does not mean understanding two's complement. Thus the joke took a on a meta-joke: using two bits to represent a binary state instead of one bit. If the joke teller understood binary in their heart they would use a proper enumeration without just using integers.

Also the proper syntax is 0b10 not 10.

There are 10 kinds of people in the world. The ones who understand binary and 9 others I can't remember.

Binary, as easy as 1, 10, 11.

Strange that the joke most popular with my friends has not been quoted yet. It's about the programmer who goes to bed and places two glasses by the bedside: one with water, in case he wants to drink at night, and the other empty, in case he does not.

Study shows learning exotic functional programming languages like LISP/Scheme or Haskell to impact facial hair growth and accelerate neckbeards: http://thequickword.wordpress.com/2014/01/23/on-the-origin-o...

#ifdef GetAHearingAid

Stolen from the Bad C Pun Contest in the C/C++ User's Journal, in 1992. But I've never forgotten it.


A Chinese spy manages to steal the last 50MB of the Lisp program governing U.S. missile launches. Fortunately, it was all closing parentheses.

  > Fortunately, it was all closing parentheses.
Fortunately? Now that they know it's LISP, they can just attack during GC.

(I know what you're going to say… but the parent joke predates incremental garbage collection.)

actually, it was javascript and the file contained:


Well, people do say Javascript is a Lisp in C clothes, and for a good reason. Well, for a bad reason too, as in this case.

I used to say that too until I read http://journal.stuffwithstuff.com/2013/07/18/javascript-isnt...

It is not, but there are reasons some people say that. Keep in mind this is a posting about jokes. By the way, someone managed to downvote the parent -- what a strange reaction to a joke! Kind of sad, really.

The joke would be a little better if you didn't explicitly as it was a lisp. Gotta leave a moment of epiphany for the listener.

I can't make up my mind about which of the following is better:

> A Chinese spy manages to steal the last 50MB of the program governing U.S. missile launches. Fortunately, it was all closing parentheses.


> A Chinese spy manages to steal the last 50MB of the program governing U.S. missile launches. Fortunately, it was Lisp.

A Chinese spy manages to steal the last 50MB of the program governing U.S. missile launches.

Fortunately it was in Lisp, so it was all closing parentheses.

My attempt:

A Chinese spy stole the last 48MB of the Abram's targeting system. To our good fortunes this was only the closing parentheses.

I don't know what's scarier: the code being stolen or a >150MB Lisp program governing US missiles.

Pair-programming: http://www.youtube.com/watch?v=u8qgehH3kEQ

  There are 10 types of people in the world:
  Those who understand binary,
  Those who don't,
  And those who count from zero.

Why did the Java developer need glasses?

Because he couldn't C#.

An http request walks into a bar and says "get me a beer". The barman sets down a beer with 200 napkins.

This one I sing to my kids:

"Old MacDonald had a farm,


And on that farm he had an infinite recursion


With an

Old MacDonald had a farm,


And on that farm he had an infinite recursion ..."

an infinite loop

I think he went with recursion so that it would eventually terminate, when he runs out of memory.

it loops when you get to "With An", not that you get through the whole verse.

That is, the cow says "Moo", the sheep says "baa", and the infinite recursion says "That is, the cow says "Moo", the sheep says "baa", and the infinite recursion says "That is, the cow says "Moo", the sheep says "baa", and the infinite recursion says "That is, the cow says "Moo", the sheep says "baa", and the infinite recursion says "That is, the cow says "Moo", the sheep says "baa", and the infinite recursion says StackOverflowException was unhandled

An unhandled exception of type

'System.StackOverflowException' occurred in Pxtl.dll

Make sure you do not have an infinite loop or infinite recursion.

This looks familiar... :D

Every little bit counts

Knock, nock.

Race condition.

Who is there?

Two bits walk into a bar for a byte.

Two bytes walk into a bar for a bit.

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