In my experience, I have found this behavior to present itself most often in retriever types who love to play fetch. They circle, back up, and bark in anticipation of you throwing their ball.The doodle dogs (Labradoodles, Goldendoodles) can add an extra dimension. Instead of it being ball-driven, it is as if they are trying to engage you in a game like keep-away where they will no doubt be the winner.
To seemingly taunt you even further, they often do a little polka dance around you or jump and hit/nip you from behind. In either case, the owner needs to do a little self-examination. Obviously, some dogs are prone to this type of reaction and you need to know your dog’s inborn traits. From there, you must realize that you have inadvertently encouraged your dog to behave this way by even the slightest amount of reinforcement.
When you, the owner, reacts to your dog’s barking with attention, high-pitched yells of “no!” and “quiet” or even simple acknowledgement by eye contact, you are inadvertently offering the same attention your dog sought through barking. This not only increases the likelihood of the barking continuing and your own frustration building, but it also teaches the dog to try barking at you for attention more frequently! Dogs have such keen senses that they may get excited by the very nature of your excitement, such as your blood pressure rising and jerking movements as you get frustrated.
To proactively diffuse this situation be aware of the behaviors your dog it presenting, and what they are trying to gain from you. Just as a child may act out to be noticed, your dog needs to learn effective ways to gain your attention through positive behaviors. By ignoring the barking and walking away until the dog quiets you are neutralizing the situation and showing that you will not reward that attempt for attention.
The best way to teach appropriate behavior to replace the barking is to reward your dog for the little moments that you hardly notice, like when the dog is quietly resting beside you for a petting, or when it does a command you ask for. In order for a dog (or a child for that matter) to learn a new behavior well, then need to have three positive alternative behaviors rewarded for each time you need to redirect a less favorable behavior. Train yourself to be very aware of when you give attention and for which behaviors. This way your dog won’t receive mixed messages about what you find to be acceptable attention-getting tactics. Patience and consistency are key when fine tuning your dog’s behaviors, and your own training.