I use a bell for pedestrians. It generally works pretty well, although there are lots of zombie morons, er, tourons, er tourists who pay no attention to anything around them.
For fellow cyclists, I sometimes ring the bell from a distance, sometimes say "on your left" when I'm about to pass, and sometimes both. Depends on my mood and whether I think they're aware of my presence. I always do at least one or the other though.