Any time I get near the tank the fish come for food. The only time I tap is when I see one fish harassing another and I want to break it up--maybe not the best thing to do but they can't hear me when I scold them!
i think its just obnoxious to tap on the glass repeatedly.. i dont think the fish care.. although i'd assume that if they had do deal with it all day every day, they would think it was obnoxious too. it's one thing if it's as classical conditioning (tap on the glass to get a conditioned response, like to get the fish to come eat) but when it's just to be obnoxious,it makes me want to scream.
my sister used to tap on the glass at fish stores to get the attention of the goldfish she liked. i told her if she did it again i'd kick her in the face.
she stopped. 8)
i should also mention that my fish come to eat food when i open the lid of the tank. it doesn't make a noise, its not obnoxious, and they figured it out anyway... like magic.