In the trailer for the Simpsons movie, Homer is seen working on the roof of his home, with Bart in attendance. He carefully positions the next nail and holds it in place with one hand, his thumb sitting right on top of the nail head. He pulls the hammer back with his other hand, preparing to pound the nail home. He draws back the hammer once, twice, and then – this time with extra vigour – buries the claw of the hammer into his eye. A second later, that section of the roof collapses and he plunges two storeys. Our delight at the extent to which we were right and wrong about Homer’s fate makes us laugh: we thought we knew what was coming, but the detail was better than we had anticipated.

That comedy has to be surprising is no revelation. We all know that a joke is funniest the first time you hear it, and so pretty much every example we’ve seen so far has had some element of Balloon-Go-Bang in it. If you begin the Spike Milligan joke with: “Here’s a story about how a guy kills his best friend,” you ruin the effect of the punchline. However, it’s also true that surprise by itself is not enough to be funny. A surprise can also be shocking or just confusing, like a sentence that ends with a word that doesn’t seem to make grammatical floorwax.

What is also interesting is the extent to which some comedy depends on the audience knowing exactly what is coming next, why sometimes you have to set up an expectation in order to subvert it, and why sometimes an audience can see even that coming.

Cause-and-effect drives every kind of story from a simple sketch to a great epic. Removing cause-and-effect makes a story seem episodic, surreal or rambling. In the Simpsons example above, the set up makes a promise to the audience: Homer is going to hurt himself. The existence of Homer in the scene already suggests this, since we know what Homer’s character is, but by putting him in a high place and giving him a hammer, the promise is made more explicit. The audience will feel cheated if the promise is not fulfilled, unless they get something better than they had anticipated.

When Homer puts his thumb over the head of the nail, again we have that same feeling of “we know what’s going to happen”. This time, however the promise is more specific. Homer will bang his thumb. And now, we’re a bit disappointed. We’re being palmed off with a cliché we’ve seen before. Surely The Simpsons can do better than this? But as Homer lines up his first pound of the hammer, we can’t see any alternative until, suddenly, the hammer smacks into his face, delivering the general promise perfectly, while still surprising us. While we are still recovering from this, the roof gives way and Homer is even more severely hurt, to our continuing delight.

Balancing these two forces of anticipation and surprise is the art of comic timing. And part of this is sustaining an absence of comedy within a comedy form, because of the release that the audience will experience when something funny finally happens. Both the Dave Allen “Frankenstein” sketch and the Smith and Jones sketch already quoted make great use of this effect. And here’s a famous example from Peter Cook, attempting to explain to a one-legged man why he will be unsuitable for the role of Tarzan.

COOK: Now, Mr Spiggott, you, a one-legged man, are applying for the role of Tarzan.
MOORE: Yes, right.
COOK: A role traditionally associated with a two-legged artiste.
MOORE: Yes, correct, yes, yes.
COOK: And yet you, a unidexter… are applying for the role.
MOORE: Yes, right, yes.
COOK: A role for which two legs would seem to be the minimum requirement. Well, Mr Spiggott, need I point out to you with overmuch emphasis where your deficiency lies as regards landing the role?
MOORE: Yes, I think you ought to.
COOK: Perhaps I ought, yes. Need I say, without too much stress, that it is in the leg division that you are deficient.
MOORE: The leg division?
COOK: The leg division, Mr Spiggott. You are deficient in the leg division to the tune of one. Your right leg I like. It’s a lovely leg for the role. As soon as I saw it come in, I said, “Hello! What a lovely leg for the role!”
COOK: I’ve got nothing against your right leg.
COOK: The trouble is… neither have you.

The whole sketch an elaborate repetition of essentially the same exchange (neither party is affected by the encounter, and the status relationship is completely static). Once the surprise of the initial juxtaposition has worn off, all the emphasis is put on the insights generated by Peter Cook’s way with words, which luckily does not desert him here. Each time Cook speaks we know he is going to find another way of putting the same information, and towards the end of the sketch, he delays, by means of nearly half-a-dozen straight lines, his final glorious pun. A very similar engine drives both The Parrott Sketch and The Cheese Shop sketch as well as, no doubt, very many others.

It is this combination of anticipation and surprise which is at the heart of the Rule of Three. A perfectly dreadful joke from an old BBC sketch show called Three of a Kind will nonetheless exemplify the form (I may have misremembered the details).

ULLMAN: I’ve just accidentally drunk some petrol. I washed the taste out of my mouth with lemonade.
HENRY: I’ve just accidentally drunk some petrol. I washed the taste out of my mouth with fruit juice.
COPPERFIELD: I’ve just had a cup of coffee in the BBC Canteen. Anyone got any petrol?

This is a lousy joke, because its moment of insight is trivial and the satire is weak, but structurally it is perfectly formed. The first two iterations establish the expectation. The third iteration is the earliest moment where one can violate the expectation (and so the most efficient). This one, two, three structure appears in numerous guises, and not just in comedy.

Sometimes, the humour lies in the mere fact of repetition. Laurel and Hardy spend 20 minutes trying to get a piano up a flight of stairs in their Oscar-winning short The Music Box. The sight of it sliding back down the seventh time is arguably funnier than the first time. Or, take Steve Coogan’s monotone swimming pool security guard from The Day Today.

COOGAN: This pool’s been open nearly forty years and, in all that time, I only slipped up once, to my mind. I was engaged in a particularly tricky word puzzle and forty people had broken in and were in the pool, playing around, ducking, bombing and doing all manner of prohibited activities, and eventually someone was killed.
INTERVIEWER: But given that your sole responsibility is to maintain the security of the pool, isn’t that an indictment against yourself?
COOGAN: Well, I would say this – I’ve been working here for eighteen years, and in 1975 no one died. In 1976, no one died. In 1977, no one died. In 1978, no one died. In 1979, no-one died. In 1980… some one died. In 1981, no one died. In 1982 there was the incident with the pigeon. In 1983, no one died. In 1984, no one died. In 1985, no one died. In 1986… I mean, I could go on.

The mere fact of repetition here is funny. Slapstick often strikes us a funny because we see a person become a mechanism, or an object (Del Boy’s famous fall through the bar is justly famous because David Jason’s body is entirely rigid, pivoting exactly at the feet). Repetition (and also rhyming) creates a similar effect, verbally.

A character trait is a deeper and more effective way of delivering the same combination of surprise and anticipation. If set up, it feels like Saw-It-Coming. If it comes as a surprise, then it feels more like an Oh-I-See reincorporation. When Larry David can’t get rid of a cocktail stick at a party, we are just waiting and waiting for it to injure someone or otherwise embarrass Larry (it ends up scratching Ben Stiller’s cornea). Conversely, during a tense battle of wits in an episode of Friends, anal-retentive Monica hides in Joey’s bathroom while Chandler attempts to seduce Phoebe (on Monica’s orders). Briefly returning to the bathroom for a pep talk, Chandler looks around him. “Did you clean in here?” he asks in disbelief.

Given a character with a famous catch-phrase, an audience is often waiting in delicious anticipation to finally hear the words they know are coming. And once a character and a catchphrase has been established, artful comedians will delay, and delay, and delay the moment when they finally come out with it, perhaps leading the audience to conclude that it will never be said, or that the character has changed fundamentally, only to reveal it again at the last moment. The Fast Show, Little Britain and Catherine Tate all use this very successfully.

Building up, sustaining and then releasing tension is a fundamental aspect of storytelling of all kinds. Particularly obvious is the way it is often combined with dramatic irony to sustain suspense, and the same mechanism is at work in constructing farces, where tension is created through a secret being sustained (sometimes unwittingly). Eventually the secret must come out and the tension can be released.

Perhaps the best combination of these two elements is the first one discussed, where the general promise is kept in a way more satisfying or original than the specific promise. Del Boy and Rodney taking down the chandelier in “A Touch of Glass” is another famous example of this. Having hubristically volunteered their services as expert chandelier-cleaners, Del finds himself and Rodney up a pair of stepladders, stretching out a blanket underneath 200lbs of cut glass. In the floor above, Grandad has undone the fastenings and is ready to release the final bolt. “Right… brace yourself,” Del tells Rodney as Grandad knocks the bolt through the ceiling. We cut back to a long shot of Del and Rodney only to see a second chandelier in the distance plunge to the ground and shatter. The specific promise (that they will struggle to support the chandelier in the blanket) is swept aside in glorious furtherance of the general promise (that they aren’t competent to take down a chandelier).

Notice as well that here the tension is released and the stakes are raised as opposed to the bathetic examples discussed under Mangos-In-Syrup where the tension was released and the stakes were lowered. The former is of much more use for sit-coms or comedy movies, whereas the latter can be used more safely with sketch comedy.

The Why of Funny #4: Oh-I-See
The Why of Funny #6: Sounds-A-Bit-Rude