If a dog is coming after me, I normally get off the bike, absolute livid in anger. I will probably kill the dog if I get a hold of it. It can "sense" that I am going to kill it. All I do is stop the bike, jump off and head straight at the dog - not a one hasn't ran behind the house with it's tail between it's legs.
The other thing that I have taken to doing (because I want to somehow make the stupid dog suffer for making me break cadence) is grabbing a handful of rock, gravel or something by the side of the road and seeing if I can connect. A rock that is about 1 to 2 inches whipped side arm into the ribs of a dog is a good deterant. It takes the fight right out of them. If the previous day a dog had escaped my wrath, I will often have a couple of stones in my hand, ready. It is a nice game to see if I can connect without getting off the bike. Any dog in the road who acts aggressive is considered fair game. Two points for a direct hit.
By the way, I actually love dogs - but a dog came out and knocked my daughter off a bike many years ago while we were riding together - and she never did get the courage to ride with me again. I wanted to kill the dog AND the owner.
Here in Costa Rica - the dog is just dead - no questions asked. The average Costa Rican is 5'4" (males), I am 6'2" and look like Herman Munster to them. No dog owner is going to try to argue with me about poochie.
Always remember you are a lot tougher than the dog - unless you act like a prey animal. When you act like the predator that you are (check your teeth in the mirror sometime) the dog does the smart thing and runs - after all, you are a lot bigger.
Still hoping for a dog that is dumb enough to get close... Maybe they aren't that stupid! By the way, I have killed 3 dogs in the USA who were dumb enough to come at me. I don't care if they are just following their instincts - I am just following mine. Destroy a threat. One time an owner was there - the dog didn't respond - and I killed it. The owner was understandably upset - I guess I wasn't very sensitive to them, I suggested that if they didn't want to lose their next dog, they spend a little training it - and themselves. It was a purebred.
My route tends to be swept clean of bad dogs pretty quickly. The dogs learn quick! I have seen dogs see me coming, run behing their house, and then after I pass - bother the next person.
Normally, I am actually pretty mellow - but I HATE DOGS WHO CHASE CYCLIST - AND I ESPECIALLY HATE THEIR OWNERS!
By the way, if the owner is present in the USA - the following words tend to ellict their complete assistance. IF YOUR DOG BITES ME, I WILL KILL IT AND THEN SUE YOU FOR EVERYTHING YOU HAVE. Works wonders.
Sorry for ranting - but man this subject riles me up. We shouldn't have to deal with dogs while riding because some idiot doesn't know to keep them off the street.