Mel Helitzer's Comedy Writing Secrets is commonly used as a textbook in college courses on comedy writing.

What does it say is the best method for how to be funny? Helitzer explains the "THREES" formula.

It's an acronym for the six essential elements that are found in everything from good one-liners to funny anecdotes to full comedy sets:

Target Hostility Realism Exaggeration Emotion Surprise

Here's a breakdown:

1. Target:

Humor is criticism cloaked as entertainment and directed at a specific target… A humor target can be almost anything or anybody, but you need to be sure you've focused on the right target for your particular audience… Humor is an attempt to challenge the status quo, but targeting must reaffirm the audience's hostilities and prejudices… Successful humorists select targets with universal appeal. [Comedy Writing Secrets]

Louis CK's target here is his doctor. (Note — All videos are NSFW):

2. Hostility

Humor is a powerful antidote to many of the hostile feelings in our daily lives. All of us have hostility toward some target… Comedy is cruel…some common sources of hostility (and therefore humor): authority, sex, money, family, angst, technology, and group differences. [Comedy Writing Secrets]

Lewis Black, the king of comic hostility, unleashes a torrent of anger regarding the milk section of the supermarket (around 3 minutes, 16 seconds in):

3. Realism

"Most good jokes state a bitter truth," said scriptwriter Larry Gelbart. Without some fundamental basis of truth, there's little with which the audience can associate. [Comedy Writing Secrets]

Louis CK is quite harsh — but hysterical — when talking about his daughter (1 minute, 29 seconds in.)

But it works because it contains elements any parent can relate to:

4. Exaggeration

How does realism relate to exaggeration? As we accept poetic license, let's accept a humor license that grants permission to expand on realistic themes with soaring imagination and unabashed metaphors… [Comedy Writing Secrets]

Eddie Izzard explains World War II. For many, history can be dry but he exaggerates and dramatizes key moments to lighten the subject matter:

5. Emotion

There must be a buildup of anticipation in the audience. This is really nothing more than the writer's skill in using emotion to produce tension and anxiety. It's a trick. Think of hostility as an inflated balloon. When you create tension in your audience, you are effectively adding more and more air to that balloon, building the audience's anticipation over when the balloon will burst. [Comedy Writing Secrets]

Watch how Chris Rock leverages emotion to engage his audience:

6. Surprise

…surprise (is) one of the primary reasons why people laugh. It's no wonder then that it's also one of the primary building blocks for a successful joke… "Comedy is mentally pulling the rug out from under each person in your audience," wrote Gene Perret. "But first, you have to get them to stand on it. You have to fool them, because if they see you preparing to tug on the rug, they'll move." [Comedy Writing Secrets]

UCLA film school professor Howard Suber says surprise is the key to all storytelling.

Jerry Stahl tells the story of how he managed to break his addiction to heroin… by switching to crack:

(More on how humor works here. More on how humor can improve your life here.)

What can we learn from a pro?

My friend Andrew Goldberg, a staff writer on Family Guy, gave a number of comedy tips in my interview with him.

What can he add to the six tips above? Don't get wedded to your first idea:

I think some people make the mistake of thinking that the first thing that they think of is perfect, and they fall in love with it. You might write five different versions of it, and ultimately come back to the first version and decide that's the best. But I think writing different versions is kind of the same thing — it frees you up to be more creative and to look for different ways to go with that same moment in whatever you're writing.

Keep at it. Keep trying new versions ("alts") of a joke until one clicks:

I'm a big fan of writing alts. If I come to a joke spot, even if I'm working on my own stuff, I'll often write three or four or five different alts, and then I'll show it to friends, show it to my wife, show it to my manager, show it to a director or somebody on the project, and ask them which they think is funniest. Usually the first joke you think of isn't the funniest. One thing that I've learned from TV and working in a big group is: Whatever joke is there, you can always beat it. There's always a funnier joke somewhere out there.

To read the extended interview with Andrew and learn more about how to be funny, join 45K+ readers and get my free weekly update via email here.

More from Barking up the Wrong Tree...