Comedy

Today I want to talk about comedy, because it is an absolutely amazing subject. The fact that an entire dynastic profession exists to make groups of (hopefully drunken) strangers laugh on command just seems kind of unbelievable. Clearly there is something deep and transformative about laughter, but what does it really mean when a person is compelled to laugh at something? For any aspiring jokesters out there, how can a comedian create this situation and get paid?

Well, in scientific terms, laughter is probably caused by something that behaves like a central pattern generator in the nervous system. These neural structures generate rhythmic output patterns without relying on any external feedback, so it is a bit strange to apply this concept to laughter (a person has to hear or see every joke, for example). However, the laughter usually happens only after a person gets the joke, at which point the “joke input” has ended in almost every case.

Therefore we should probably be conceptualizing laughter as an internal rhythmic feedback loop that can be started by some “funny” input. The challenge then is to define a “funny” input. I’ll pause for a second here so you can try that…

But wait! Doesn’t the very incomprehensibility of the challenge suggest something profound about how we should understand humor? Everyone knows that jokes are hard to write because an original comedian has to be the first person to notice that a certain thing is funny. The whole art of comedy revolves around having some of that uncommon and funny knowledge, and choosing to reveal it in the most entertaining way possible. Knowing this, is it possible to imagine something that all funny things must have in common?

Well, sure. They’re all “correct” in some abstract sense. Comedy is the process of being so profoundly correct that other people are compelled to laugh as soon as they realize what is going on. Us college-educated folk can scoff at low-brow humor, but almost any example of “bad” comedy still does reveal more than a few simple truths to more than a few tragically underinformed people, and therefore it can still make a lot of money. The fact that a thing is not funny to every person does not mean that it is not “funny” in some platonic sense. Somewhat disappointingly, there is no such thing. That makes good comedy very hard work, but at least we don’t ever have to fear the funniest joke in the world.

(From this perspective, slapstick humor is a special case where the truth being revealed is basically how badly it must suck for the victim…)

Generally speaking, this is not a new idea at all. A government document says this:

The American comedian Will Rogers was asked how he conceived his jokes. He answered: “I don’t make jokes. I just watch the government and report the facts.” See what I mean? Sometimes the truth is funnier than “comedy.”

Several Woody Allen bits are included as example one-liners, like this one:

I can’t listen to that much Wagner. I start getting the urge to conquer Poland.

It’s funny because it combines and reveals several truths in a clever and efficient way:

  • Wagner was a German imperialist.
  • Music conveys emotion.
  • Germany conquered Poland (and murdered millions of Jews) in World War II.
  • Woody Allen is Jewish.

The joke actually depends on the audience already knowing all of these things, and the “trick” is that he alludes to each in such an efficient and thought-provoking way, in the space of two short sentences. When we realize, all at once, the absurdity contained in the idea of a modern American Jew savoring hypnotic war hymns that ushered in the Second Reich, the effect is very funny for a lot of people, even if they don’t want to think about it!

I’m particularly interested in this method of “humor analysis” because it seems to emerge so naturally from a feedback-dominated model of intelligence. Laughter happens when a person notices something that is interpreted as “true enough” to activate an unconscious neural feedback loop, forcing them to externalize their acknowledgement and understanding. That is the sole evolutionary function of laughter, a phenomenon which almost certainly had a pivotal role in the building of every human civilization.

This is not saying that Adam Sandler is the greatest American ever, or even that we should all start studying Internet memes for the sake of science. But it does mean that we should take a moment and bow our heads in respect to every person who has ever wanted to make another person laugh, and in recognition of the great things they have accomplished for the sake of humanity. Because when a country of people stop what they are doing and start laughing (against their will) at the same idea at the same time, you can probably trust it a bit more than usual.

How would I define a “funny” thing? Funny things are true enough to make people laugh.

Here is someone else’s definition:

There is no simple answer to why something is funny… Something is funny because it captures a moment, it contains an element of simple truth, it is something that we have always known for eternity and yet are hearing it now out loud for the first time.

Variables

What is the most important thing that a programmer should do? The textbook answer, “comment everything”, only ensures a minimum viable reusability, especially when nonsense appears like:

//UTF-8 Kludge
or
//DON'T REMOVE!!!

causing unsuspecting developers to detour for what could be hours (are office distractions NP-complete?) and jeopardizing the sanity of everyone involved. Don’t get me wrong, great comments are indispensable works of art, but to be able to write them, you must first write a great program.

Then what is a great program? It depends on who you ask. Rails users might argue that a great program says everything it needs to say exactly once in unreasonably concise Ruby, and includes modular unit tests for 100% of the code base. LISP enthusiasts might praise a program for its mind-boggling recursive structure, and its unreasonable efficiency. However, in both of these cases, and always for any novice programmer, the most important feature of a great program is its consistent and correct use of variables.

Put another way: a computer program’s codebase is unsustainable if its variable identifiers can’t be interpreted correctly by developers. This means that calling a variable “temp” or “theAccountNumber” is always a bad idea unless it is actually correct to think of that variable as “the temp variable”, or the only “account number” that that particular program (or section of the program) uses. We are at a point where nearly every bottleneck I encounter in everyday software development is between my mind and an unfamiliar block of code. If there is a chance of confusing anything else with whatever you’re naming, it’s the wrong name.

What is the right name? That’s another question with a multitude of answers. CamelCase with the basic, accurate name of a variable is a good place to start, meaning that if I were to create a variable to hold the text of some person’s additional info popup, it might be a good idea to start with one of the following:

InfoPopupText
PersonInfoPopupText
SarahInfoPopupText

depending on the context, i.e. what the program (or section) is supposed to do. Most developers I have met use the first letter of every variable to encode a bit of extra information, like if I decided to use lower case letters for an instance-level variable:

personInfoPopupText

or possibly prepend a special character for private variables:

_personName

As with everything, the key is to use whatever makes the most sense to the people who need to work on it. If we are to sidetrack into a bit of philosophy, accurate naming is what makes all intelligent communication possible. The only thing that allows you to understand my word (“chicane”) is the fact that it has been used in public to refer to some persistent feature of the universe, and therefore anyone else can imagine what I imagine (or check Wikipedia) when I use it. This applies to all formal and mathematical language too: the only thing that is required to understand a given theorem is an accurate understanding of the words that it contains. Be careful, though: accurately understanding some of the words that mathematicians use is a lot harder than it sounds.

Are any non-programmers still paying attention? This part applies to you too. As the old 20th-century paradigm of “files, folders and windows” starts to look more and more passé, why not ditch that menacing behemoth that you call your “backup” and start organizing files by naming them correctly? (Spelling is important!) If you do that, just Gmail them all to yourself, and then they will be archived as reliably as Google is, forever. If you picked the right name for a file, you’ll know what to search for when you need it.