I’ve tried more complex traps that involve making a funnel or inverting plastic soda jugs into each other. Those techniques take more work and don’t do as good a job as this straight forward Death By Drowning solution. The trick is the drop of soap, which breaks up the surface tension of the cider vinegar and allows any fly drawn in by that yummy fermented fruit smell of the vinegar to slip to the bottom of the glass.
I’ve found these traps work for about two days and then the vinegar needs to be refreshed. I think as the vinegar volatiles dissipate the trap just doesn’t smell as good to the flies. Also, at a certain point that many dead bugs in the bottom of a glass is just gross and needs to be dealt with.
Whatever you do, do not mindlessly take a swig of your vinegar-dead-fly concoction thinking it’s apple juice or something. That would be even more terrible than a fruit fly infestation.1