I've actually tried the whole "glass-tapping" thing when one fish is after another one. It maybe startles them the first couple of times, then they just ignore it and keep on doing what they're doing. You can't teach them stuff, they're fish, they're dumb as dirt generally speaking.
