As soon as you explain a joke, it immediately becomes unfunny.
People confuse the subject of the joke with the target of the joke, and they're very rarely the same.
Surprise is not humor. I think that there can be a fine line there.
A joke is not a thing but a process, a trick you play on the listener's mind. You start him off toward a plausible goal, and then by a sudden twist you land him nowhere at all or just where he didn't expect to go.
You can analyse a joke and say it's funny because this guy thought this was going to happen, and that happened, and it's surprising. But not all surprising things are funny.
When you really boil it down, what comedy does is you expect one thing, and you get a totally different thing that's humorous, and we all laugh. That's generally how, just mechanically - super-distilled - comedy works.
Poetry is like making a joke. If you get one word wrong at the end of a joke, you've lost the whole thing.
Sometimes a joke that doesn't work just needs a breath or a little word or the tiniest little change to be fixed.
A joke is like building a mousetrap from scratch. You have to work pretty hard to make the thing snap when it is supposed to snap.
For me, most comedy scripts fail in the mechanical playing-out of the setup. They'll pay lip service to a moral lesson or a psychological progression.
There's a lot of nuances to stand-up that you definitely see when you watch someone like Chris Rock in that his body position is also part of why the joke works.