More specifically, pedestrians are surprised by the cyclist proximity, as mentioned previously. Waiting until you get to within arms length of someone will almost always surprise them and cause them to react unpredictably. Its worse than not ringing the bell at all.
A better method would be to begin ringing your bell at a distance, and continue until you get some type of acknowledgement (typically a movement to the right) that they know you are approaching to pass.