When I was younger I was a meter reader for the electric utility company, often requiring entering customers' back yards to read the meter. Naturally there were many encounters with unfriendly dogs. When a dog came running out of the house or from a hidden corner of the yard, barking and snarling, it was nearly always the best tactic to stand my ground and say "No" with confidence and self-assurance.
In most cases the dog would just stand there, unhappy, but would let me read the meter and leave (although I was careful not to turn my full back to them -- always kept one eye on them). I might also add that the worst were the yappy little Poodles and Dachshunds -- they love to nip at your ankles. Perhaps surprisingly, I'm still a dog lover.
Thanks to Jim White, Diocese of Los Angeles, for this!