There are many reasions why your dog will bark. There are people who feel irritated when a dog keeps on barking. If you like your dog but do not want to listen to the endless barking then you may want to understand what you should do so you would not be bothered by it. Dogs are smart and they do not like to just sit around all day doing nothing. They need to do something and especially they need some movement and so they like to play.
Give enough activity for your dog if you can find a playmate for him or her then you can do it. You can find his games and they will surely enjoy it like hide and seek. Give them some toys that will keep them busy. You can give them treats but put it in a place that they will have to think ways on how to get it. You can have some time while your dog is busy with the task of figuring out how to get the treat.
One of the reasons your dog will bark is when there is a stranger. They have their automatic sense to detect strangers and they are not comfortable. That is why they bark to let you know that they are uncomfortable. You can help them overcome this slowly and not as quickly as there could be a negative effect. You can start with going to the park and let them feel the situation until they could be comfortable with many people.