Even the most up-front farce can be seen in different ways by a different audience.
A performance, film, song, or even a joke can be written in such a way as to produce laughs at specific moments in time, but there is always the chance that it will fail. In the same vein, something can be written to specifically NOT be funny, but it has a chance of being hilarious to the right audience.
Audience is the key to humour, because as most people will tell you, laughing at your own jokes just makes you look like a douchebag. Or that you ride the short bus, either way.
The key to humour is that one shouldn’t have to, or just plain shouldn’t at all, try too hard. Because once that happens, whatever joke you’re trying to make ceases to be funny and just becomes claptrap. And that was only cool for Louis XIV, I’m just say’n. In trying too hard, one also becomes victim to the persistence of stereotypes: race, sex, gender, kids, marriage, you name it. Too many stereotypical tripes are likely to end up costing you a comedy career. Granted, the odd stereotypical jab here and there is funny, but try and come up with your own stuff on top of that. Another problem with stereotyping is the sensitive souls; Don’t tell a black joke at the Apollo, don’t tell kitchen jokes to a room full of feminists, ets.
Just remember, that you have to be perceptive of your audience. A lot of successful comedians will have buffer zones, where they set up a performance with more jokes than they need, and the appropriate transitions necessary to omit the offensive ones and include the safety net ones. It’s this little catch-all can save your ass in a room full of people you might accidentally offend if you say the wrong thing at the wrong time. Always be aware that every audience is going to be different, and if one person out of 1,000 is offended at ONE joke, it’s not so bad, but if the entire room is offended at your entire show, you’re setting yourself up for failure pretty quickly.
Ramble on, Aristophanes.