Dogs that are not exercised and allowed around people are the ones that bark incessantly. I suggest you learn its name so you can call to it occasionally - works for ~ 5 minutes. I pick up old tennis balls, etc. that I find in the gutter and toss them to the barkers - usually lasts about 10 minutes. One neighbor agreed to let me take his dog on my jogs, but it was well-behaved and didn't have to stop to sniff much. At one point I was contemplating buying an $80 ultrasonic bark stopper. The cheap ones don't last.
Those are the humane things you can do. I know the other guys are joking about guns and poison, because causing agony to innocent animals is not what they are about.