A lot of dogs bark out the window at everyone who goes by. In fact, this is one of the most common problems motivating people to seek the help of a canine behaviorist or dog trainer. Luckily, most dogs can be taught a more appropriate response than barking like a maniac at every passerby.
Dogs tend to bark even more if we say, “Quiet!” Barking is a social, contagious behavior, so when dogs hear us vocalize in a sharp way in response to their barking, it’s no wonder that our dogs keep going with their own barking. A far better plan is to teach them to come away from the window whenever they see anybody going by and then reinforce them with a lot of treats for that behavior. I offer detailed advice  in a recent newspaper column.