Analyzing a joke is like dissecting a frog, in the end they both die.
I used to believe that jokes stopped being funny when they were analyzed. But since becoming a father I have undergone a radical transformation of my understanding of humour, and now realize that explaining a joke can only ever make it funnier.
A great idea for a website would be one that contains all of the jokes in existence, and along side them, the commentary that explains how they work and why they are funny.
I've looked into making such a site, but was perturbed by the realization that most jokes are harmful. They are racist, sexist, classist, ageist, or some other "ist"; they work by delineating an in-group (to which the audience belongs) and an out-group, the "butt" of the joke.
Regardless, here is an analysis of a joke.
A horse walks into a bar. The bartender says "Why the long face?"
This joke is funny from beginning to end, and if you don't agree, I will persuade you now.
Let's take a look at this joke, word by word.
Already you are certain that this joke is going to be a good one.
Good jokes always have a great beginning. If a joke started with "A chair" then you would not be expecting very much. Jokes starting "a chair" have a very poor track record. I don't wish to be-labour this example, but there's almost no humour in chairs. Horses, on the other hand, are pretty much always good for a laugh.
Now the dangerous thing with a great start to a joke is that it has to follow through and keep the pace going. It's no good having people laugh at the first two words if they end up frowning by the end of the sentence. So let's see where this one is taking us.
A horse walks
WOW! What a development. The horse doesn't trot. It doesn't gallop. It doesn't even canter. It walks! Like a dude! What a horse! Where will this horse take us next!
A horse walks into a bar.
Damn! What kind of genius was capable of stringing together such a dynamite scene. Picture the bar, a regular saloon with oak and so on. An ordinary day. Not much happening. KAPOW! The doors swing open and who should stroll in? Mr Horse! Nobody saw that coming, I guarantee you.
I haven't been to every bar in the world, but I can tell you one thing I have noticed about bars: horses don't tend to come strolling in.
The bartender says
TIME OUT! STOP THE CLOCK!
If you've ever met a bartender you can already guess what they're gonna say:
Get out of here, horse! No horses! Hey, you with the steel feet, take hike!
Or some variation on the above.
But this bartender, whoah boy, no, here is a cool customer. Check this scene: