For those in a hurry, or in a fly-flustered frustrated fucking rage, there are several stratagems of note.
The Cocktail. This works best on fruit flies. Just take an open bottle with a narrow neck, about 1/3 full with some sugary liquid. Red wine is ideal; fruit juice is almost as good. Swish it around a bit (so that it smells stronger) and leave it standing for a few hours. When you come back, you should find a lot of dead fruit flies floating inside.
The Bird. This fun variation on the Statesman (see below) works best on normal house flies. Wait for the fly to land on a table. Place one hand (ideally your writing hand) flat, palm down on the table and lift up the middle finger using your other hand. Tensing your middle finger against this, slide your hand behind the fly so that it's between your index and ring fingers. Release your middle finger so that it snaps down quickly on top of the fly, squishing it.
The Statesman. I find this to be the most effective technique, both on regular house flies and the smaller fruit flies. Wait for the fly to land somewhere. Slowly position your flat palm about 5-6cm (2-3in) above the fly. As fast as you can, slap the fly. Move your hand in one direction only - don't pull back before you slap, or the fly will fly away. It works fucking great, and makes you look like a ninja fly assassin.
Feedback? Drop me a line at: bob at billblock dot biz.