How is this type of joke called?

There are two hard things in computer science:
cache invalidation, naming things, and off-by-one errors.

There are only two hard problems in distributed systems:
2. Exactly-once delivery 1. Guaranteed order of messages 2. Exactly-once delivery

I call it joke-in-joke, but how do linguists call it?

  • 2
    I would say neither is a joke-in-a-joke. In the first, the joke is that the length of the list is "off by one" from what was announced. The second is essentially the same, although there are two components to the joke (the order's wrong, and the "exactly-once" message appears twice). Along somewhat similar lines: "There are 10 types of people in the world. Those that understand binary and those that don't".
    – TripeHound
    Jul 14 '17 at 10:49
  • 1
    I'm not a linguistics expert, but given the subject matter, I guess linguists would probably still call it a joke. Entertainers, on the other hand, might have more specialised terms for it.
    – Lawrence
    Jul 14 '17 at 10:55
  • 1
    You could call them autological or self-demonstrating jokes.
    – user888379
    Jul 14 '17 at 12:12
  • 3
    @lawrence: looking at the migration history, it looks like linguists called it off topic!
    – Yorik
    Jul 14 '17 at 14:09
  • 2
    Linguists have only a primitive understanding of jokes, as can be seen by what passes for humor among linguists. Jul 14 '17 at 15:11

It isn’t a joke-within-a-joke, as there’s only one. It’s an example of self-reference.

From the Stanford Encyclopedia of Philosophy: In the context of language, self-reference is used to denote a statement that refers to itself or its own referent. The most famous example of a self-referential sentence is the liar sentence: “This sentence is not true.”

There’s a Wikipedia entry for self-referential humour: Self-referential humor or self-reflexive humor is a type of comedic expressionthat—either directed toward some other subject, or openly directed toward itself—intentionally alludes to the very person who is expressing the humor in a comedic fashion, or to some specific aspect of that same comedic expression.

Searching “self-referential humour” or “self-referential joke” finds many examples, e.g. here and here:

Repeat after me, "I will think for myself."

Condemn ambiguity and other stuff.

The technical term for "being unable to remember the word you want" is ...erm...

I never make predictions. I never have and I never will.

I went to a bookstore and asked the saleswoman, “Where's the self-help section?” She said if she told me, it would defeat the purpose.

And my favourite: "Give credit where credit is due." –Unknown

The common factor seems to be that the statement or anecdote is funny because it refers to itself, or one of its elements, in a way that defeats its face-value meaning or purpose.

For some reason, it appeals especially to computer scientists/professionals and mathematicians.

Not the answer you're looking for? Browse other questions tagged or ask your own question.