No laughing matter: The secrets behind comedy success
Have you heard the one about the computer programmer who bought a failing comedy club in Texas and turned it into a million dollar a year business?
It's no joke. But Kareem Badr says people did laugh in 2009 when he and two friends paid $20,000 (£13,000) for the Hideout in Austin, when it wasn't making money and the previous owner decided not to renew the lease.
"We took over a sinking ship and each brought a bucket to bail it out," says Mr Badr.
"None of us had any experience of running a business. But we loved what we were doing enough that it carried us through."
Three years ago he was able to quit his day job and draw a salary from the club.
Mr Badr, 37, says it's still not as much as he used to make as a programmer (about $80,000 a year), but he now employs around 25 part time and contract workers.
And he recently expanded the premises, taking over the adjoining coffee house which sells alcohol, and leasing more theatre space.
Mr Badr says: "I think my background in computer science helped because I can take a big problem, break it up into small chunks, and figure out how to make it better and more efficient.
"That's basically what we did for every aspect of the business. And by doing that it naturally started to improve."
Mr Badr may have been helped by national trends, which imply a growing enthusiasm for comedy clubs in the US.
An industry report from data firm Ibis World expects total US annual comedy club revenue to grow by 1.8% over the next five years to $344.6m in 2020.
"When the Hideout first opened it was the only improv theatre in Austin," says Mr Badr.
"But now there are five [comedy] schools and four theatres. We were at the right place at the right time."
While the Ibis World report showed that dozens of US comedy clubs were forced to close in the wake of the 2008 recession, when fewer people had disposable income to spend on live entertainment, Stephen Rosenfield, director of the American Comedy Institute in New York, says stand-up comedy is now entering a new golden age.
"The US has comedy clubs all over the country, not just in big cities, and they require talent," he says.
"In any field there are those at the top who make dynastic fortunes. But because of the significance of the local comedy club, there is a career and a living to be made by good comedians who are not superstars."
Mr Rosenfield says the growing popularity of stand-up comedy is fuelled in part by younger audiences, who view humorous TV hosts such as Jon Stewart, Jay Leno and Steve Colbert as their primary source for news.
"It's not just entertaining them, it's also informing them," he says. "There's a new immediacy to stand-up that makes it much more appealing to a generation that's on social media, tweeting, face booking and blogging."
But clubs don't only make money from entertainers. Alcohol alone can bring in as much as 40% of the night's takings, and many clubs demand that audiences buy a minimum number of drinks per person.
"A club really has three businesses going on," says Mr Rosenfield.
"It's an entertainment entity, a restaurant and a bar. They make money from selling drinks and dinners, and they make money from the cover charge.
"There are usually three people on the bill. The opening act is the new comedian. They do about 20 minutes and introduce the other comics.
The middle act does about half an hour, and then there's the headliner. They almost always have TV credits, and are the ones people are coming to see. That headliner could be making six figures a year."
Top-tier performers make much more. According to Forbes, Canadian comedian Russell Peters grossed $19m with 64 shows in 2013, while industry veteran Jerry Seinfeld is the highest paid comedian in the US, set to earn $36m this year.
'Write, write, write'
Steve Byrne, 41, is a veteran stand-up comedian based in LA, and star of his own television show Sullivan and Son, which ran for three seasons.
He describes himself as a successful mid-level comedian who makes an annual six figure salary mainly from touring.
And although he was close to hitting a million dollars a year before his show was cancelled in 2014, he says most comedians make money at clubs and do television to boost their brand rather than their income.
Mr Bryne says: "Gigs vary because it depends what you're contracted at.
"If it's somebody starting off in the business it could be $1,500 a show. For somebody who's had some TV credits you could go from $4,500 to $7,500.
"And if you're just a knock out comic, then you're coming in and getting a door deal. You're taking all the tickets, and the club gets the concessions."
Mr Byrne says hard work is the key to success. There is no magic short cut, and few lucky breaks.
"The one single thing that an aspiring comedian should do is write, write, write. What is it that makes you laugh?
"Your voice should resonate with your audience. So find your voice and you will find your audience."
While the music and film industries have been impacted by the internet, such as illegal downloads and reduced album sales, Mr Rosenfield says the online world has actually given live comedy a boost.
"The format of comedy, particularly stand-up, lends itself to digital media like nothing else. One terrific joke can get a million hits," he says.
"It's become a new metric for a club manager. If a booker sees that a comic has 500,000 online followers - they'll book him almost sight unseen. That's it.
"Digital is gigantically important and has been for a while."
But in the end, the success of comedy comes down to a very simple fact - people need to laugh.
Back in 2001 Steve Byrne was a comedian in New York when terrorists flew two planes into the World Trade Centre on 11 September.
He says: "We all thought 'who's going to come to a comedy club? The dream's over, I've got to get a real job now'.
"But after a week, I forget which club was the first one to open its doors, but it was packed. People needed an outlet.
"And I remember for months on end those clubs in New York City were just jam packed. That was the thing that told me that this was a profession that is foolproof."