Do you want your dog to stop barking constantly and being over reactive to things like people coming in your house or dogs walking down the street?
A lot of people will pull their dogs back and try and hold them back with there hands stroking them and telling them to "calm down, its ok". When you say these things to your dog, pay attention to the tone you are using. It sounds
just like "good boy, good job". And by stroking your dog trying to calm him down, your actually giving him affection/praise. So then you will have a confused dog that thinks you want him to bark at those things you want him to stop at.
When you give a dog to much affection it can actually hurt your dog mentally and create unstable energy. A dog wants to know it's safe by us providing good leadership. Good leadership means giving clear rules, boundaries and teaching limitations. Which means giving affection when he has worked for it and discipline when he needs it. Nothing comes free in life. We all work to buy our homes and cars and other nice things. When you just give your dog things all the time without him working for it, it'll start to think s/he's the queen/ king and then your dog will start doing undesired behaviors like barking at new people, biting when someone gets to close, etc.
Consistency is what you have to do to ensure your dog stays on the right track. Just because you told your dog "no" one time doesn't mean he's gonna remember that the next time. So be sure to reinforce rules all the time. Staying consistent with the right rules, clear guidance, balanced affection and discipline, you will create a dog with stable energy. And no more confused dog.