Seems to me this can all be be addressed with two words, "Common Sense".
1) Be a responsinble dog owner. Don't let your animals run free and be a nuisance to your neighbors. If you think they could bite someone, keep them in a secure location on your property. By this I mean so they can't leave your property, not that they shouldn't be able to be out in the yard, etc. If something happens to your dog because you didn't keep control of it, blame yourself.
2) Be a responsible parent. Don't let your kid(s) run free and be a nuisance to your neighbors. Too many times these days parents think their kids can go and do whatever they want and it is everyone else's fault for not tolerating it. If your kid goes into someone else's yard and gets bit, blame yourself, not the dog or owner.
3) If you are in a situation that makes you feel uncomfortable, get out of that situation if possible. Call animal control or the police and let them take the animal. (Personally I sometimes wish there was Kid Control too, but that is another story)
4) If you child or animal is attacked by a dog, do what you think you need to do to protect your child or animal. I highly doubt in most cases it would be to shoot the dog, but if that is what it comes to, you better be prepared to justify it.
5) Don't be stupid. All of this macho BS about I would do this and I would do that kills me. You better know the consequences and be prepared to pay for them. Your not just dealing with the law, but emotional parents and/or dog owners. Common Sense may not apply.
True Story from my hometown in IL.
Child walked into the neighbors yard and the neighbors dog who was on a leash and well inside the property line bit the little girl. Her father went over and shot the dog. The dogs owner went over and when the father answered the door, shot and killed him.
Moral of the story, No one wins! One is dead, the other in jail.