Actually the author is using the wrong technique if he is trying to swat the fly.
Flies use their compound eyes and a collection of sensitive hairs on their bodies to detect threats and avoid being swatted. You can use this to your advantage.
When the fly lands on something you should approach slowly and steadily from the same direction with your palms open and ready to clap together. Move slowly as your hands get close to the fly so as to cause a minimal air disturbance. By moving slowly, the fly finds it difficult to parse the fact that your hands are getting closer and once you are within a foot or so (.3m) clap your hands together as fast as possible.
Your hands will be close enough that even with the fly's excellent acceleration and detection skills it will be difficult for the fly to escape being crushed. Make sure your fingers are cupped so that the fly is spit out between them as the air escapes during the clap.
It may help to consider that many times a fly will launch itself slightly backwards when it takes flight before zipping forward rapidly. Plan your clap so that the fly will be trapped even if they shift backwards slightly.
Wash your hands when you're done.
This method is successful for me more than 95% of the time when I allow the fly to land. If the fly is nervously zipping around just be patient. It will pause and then you can clap.