One of the weirdest and most wonderful things about people is that they can make a joke out of anything. For any human discipline there's people making jokes about that discipline. In programming, that starts with memes like "how do I exit vim" (as typified in places like r/programmerhumor), or funny examples of awful code (such as from TheDailyWTF).1
Those are both highly accessible kinds of jokes. More interesting to me is the humor that heavily rely on experience or background knowledge, where the expectation is that many people won't have the context that makes it funny. This is comedy that is produced by programmers for programmers. By relying on the shared context of software engineering, the gags aren't recognizable as mainstream jokes. You could easily explain why this is a joke to a normie, but could you explain Enterprise Fizzbuzz? Aphyr's Technical Interview series?
(This is something that happens in all fields, not just programming. 441 is a hilarious juggling pattern.)
The most interesting is when the medium of programming is itself used as a comedy substrate. This would be something like vanillaJS. There's also some cases where the joke is an entire programming language. Not many, since making a PL is hard, but a few!
IT'S SHOWTIME TALK TO THE HAND "hello world" YOU HAVE BEEN TERMINATED
These can be funny but they're not very interesting.
Ingredients. 33 g chocolate chips 100 g butter 54 ml double cream 2 pinches baking powder 114 g sugar 111 ml beaten eggs 119 g flour 32 g cocoa powder 0 g cake mixture [rest of code at link]
I devoted a lot of time to multicoded languages in my video on esolangs (talk page). Multicoded languages work on a couple of levels. First, it just looks funny, that a play/recipe/picture is actually a valid program. What makes them especially interesting, though, is that the programs can also serve as a valid play/recipe/picture. There's the intellectual challenge of trying to find something that fits both purpose, and I find the successes really delightful. Someone successfully baked the hello world cake!
Languages where the language does funny things as part of execution. These tend to be the rarest kinds of joke languages, because relatively few people can actually make them. But they're also the most interesting.
The most famous example in this category is INTERCAL, which is also the first "joke" language in history. Some of the more interesting semantics include:
COME FROM 10will cause execution to jump to the
COME FROMafter it runs line 10, regardless of where the
COME FROMis in the program.
PLEASE, then compilation raises an impolite/too polite error.
statementis executed and one where it isn't.
def withdraw(acct, amount): implore amount >= 0 implore amount <= acct.balance acct.balance -= amount swear acct.balance >= 0
swear ever fails, the function is deleted from the source code. This guarantees that only functionally correct remains in the codebase.
But isn't a language that deletes code crazy?
No, wanting to keep code that demonstrably has bugs according to its own specifications is crazy. What good could it possibly serve? It is corrupted and must be cleansed from your codebase.
Finally there's Malbolge, which is a language designed to be as hard to program in as possible. Among other things, it used the same memory space for data and source code, so data could be executed as code and vice-versa. It took two years from someone to write hello world.
A subset of funny semantics, usually, but these languages are also reactions to specific trends or discourse. Outside of that discourse, they just seem like ultra-weird languages instead of protests given form.3
I only know of two examples. The first is HQ9+. At the time, there were three common tests of programming language fluency:
HQ9+ was a programming language with only four commands:
Hprints "hello, world"
Qprints the source code
9prints all the 99 Bottles lyrics
+"increments the accumulator."
Obviously, being able to solve every fluency challenge in a single character, HQ9+ is the perfect programming language.
The other satire I know of is MetaGolfScript. "Code Golfing" is the sport of writing programs with as few characters as possible. The bulk of the community is on the Code Golf & Coding Challenges SE board, where the upvote system effectively pits languages against each other. This means that languages like Perl and APL have huge advantages over ones like Java and C.
Eventually people made dedicated golfing languages, which sparked an arms race of increasingly-compact golfing languages. MetaGolfScript is the "no you times infinity" of golfing languages, an entire family where any problem can be solved in zero characters. For example, MGS-4342596 prints "ABC", while MGS-2579603820238107378666987055701286 tests if the input is a prime number. A terrible language, but a great statement on arms races and the futility of war.
There are probably other satirical languages, these are just the two I know about. There are a lot more satirical libraries than languages, like the aforementioned vanillaJS.
This was sent as part of an email newsletter; you can subscribe here. Common topics are software history, formal methods, the theory of software engineering, and silly research dives. Updates are 6x a month. I also have a website where I put my polished writing (the newsletter is more for off-the-cuff stuff).