You might think that yelling at your dog when he's barking is a way to stop the behavior, but your dog might interpret your noise as a welcome addition to his cacophony.
Again, dogs don't speak English, so shouting, "Fido, knock it off! Quit barking!" isn't going to convey what You hope.