There are a lot of great jokes you can sit down and write, but that's just a written joke, versus the comedy of the situation. Ideally, you're pulling as much comedy out of the situation as you can.
In every case, I find pre-planning noble, but not always that useful in comedy. You know comedy once you're doing it.