JimRB brings up some good points. I would never try and shoot while actually riding. I ride a lot but an not really a serious rider, my speed is more like 15 mph or a little slower. I ride in a very rural area and have very real concerns about dogs. Most people just let them roam and often there is more than one. I also usually ride alone. The only time I would shoot a dog is not because its chasing me but actually knocked me down and attacked. As in any situation, people are also a concern but probably not a problem. Not lets talk helmets. Everyone wears one right? It should be by choice though.
Yeah dogs are a problem. But having one bite you while cycling is rare. Most injuries caused by dogs are because of the cyclists reaction. When with others, somebody swerves to avoid the dog and takes you down. Or the dog chases the bike in front of you, loses interest, then turns into you, taking you down. Or the dog gets in front of you, you hit it, and crash. I've seen dozens get hurt falling because of a dog, and sometimes hurt badly, but never seen anyone bitten. It's scary when the beast charges out surprising you. If it's clear you can outrun it, then it's a good sprint practice. But if there is any doubt, slow down, hold your handlebar with one hand in the center by the stem for stability, grab your water bottle with whichever hand the dog is on, wait for him to get within 10 feet or so, and blast him in the face with a stream while yelling with your meanest voice. I've never seen one who didn't turn away. And by thus point, you're probably out of his territory, and they turn back home. Try it. It works.
As far as helmets, they are absolutely necessary. No need to make it a law, but you're crazy if you ride w/o one. Just like seat belts. I've slapped my head on the pavement several times. My helmet broke. My skull didn't.
I agree owners shouldn't let dogs roam free. But unfortunately, if you ride in rural America, it's a fact that they do. Most dogs just like the chase, and are guarding their turf. I've even stopped before when the dog was chasing me, and he then gets friendly. I wouldn't want to shoot one. Never had the need. If I'm dismounted, I can shield myself with my bike, and even use my bike as a weapon. Maybe there some bad *** dogs that would still eat me up, but I've never encountered one that I couldn't intimidate, once the chase is over, and I turn to confront him.
The funniest thing I ever saw was when we were riding to the coast. A little yappy dog burst out running along the shoulder chasing us. He was acting real mean until he ran into a telephone pole at full speed. We had to stop as we were laughing so hard. He just lay there stunned.