In fiction, there's no greater compliment to a dog than being called a "good dog" or "good boy/girl".
If the dog is sapient and has a good enough understanding of human language, being this way can signify that they're humble and simplistic (maybe even a bit dumb, in some cases). They're a Loyal Animal Companion who enjoys simple things and likes making their human happy.
As a result of this trope, being called a "bad dog" will be deeply offensive and troubling to dogs.
The scientific term for this is "pet-directed speech", which is considered a form of baby talk. Dogs actually react to the tone of the words rather than the actual words themselves.
Despite the title, not all examples involve dogs. It's just most common in dog characters.
- In Seton Academy: Join the Pack!, Jin ends up tutoring most of the Beast Man and Little Bit Beastly population of the school when they hear rumors that anyone who fails the next tests will be expelled. As Jin tutors everyone, finding ways to learn particular to each type of beast, he very specifically does not tutor Ranka the wolf until much later, in private. That's because the special trick he has for her is, very simply, praising her whenever she gets anything right. Unfortunately, Ranka gets so excited at Jin's praise that she leaps onto him, prompting Jin to get mad and throw her out of the room, which the narration notes pretty much negates the effects of the praise.
- In Astro City, G-Dog is a superhero created through the combination of Hank (a corgi) and Andy (a man) via the agency of the magic amulet. When this first happened, Andy planned to call himself 'Nighthound', but when he was asked his name for the first time, the Hank half of the combination blurted out 'G-Dog'. This is short for 'good dog' because Hank was very proud of being a good dog. G-Dog stuck as his name.
- A darkly tragic and non-dog example with Dex-Starr of the Red Lanterns, who was just an ordinary stray cat taken in by a lonely woman. When she was murdered, Dex-Starr's rage drew the attention of a Red power ring, which he uses to avenge his owner because he's a "good kitty".
I find one who hurt you. I kill. I good kitty.
- In the Harry Potter fanfiction The Shoebox Project, the Marauders take a potion revealing the animal selves that will come out when they successfully become an animagus. Sirius of course immediately starts acting like a hyper-energetic dog, and is so disruptive that Remus on instinct tries to quiet him by yelling "Bad dog!" Sirius is immediately heartbroken and curls up into a small, sad ball, occasionally sending Remus betrayed looks.
- Going Native: Alluded to when Felix Geata compared the ships to dogs. The Enterprise-D is like one of those smart-as-a-whip show dogs with a thousand tricks, while Galactica is one of those old, slow one-trick dogs that just really, really wants to hear, "good girl".
- In "Dug's Special Mission", a bonus short from Up, Dug becomes even sadder than he was initially when he overhears Alpha calling him a "bad dog".
- A common joke involves a pet owner asking "who's a good boy?" to his dog, only for the dog to explain that the owner is the "good boy".
- In A Dog's Way Home, Bella has a limited understanding of humans, but she knows what being a "good dog" means and what being a "bad dog" means. To be a "bad dog" is a terrible offense. Bella wants nothing but to be a good dog and make people happy.
- In A Dogs Journey, the protagonist enjoys being called a "good dog" and takes great offense to being called a "bad dog." He even will eagerly state himself as being a "good dog" whenever he has done something he thinks will help make someone happy and refer to himself as such matter-of-factly many times throughout the narrative. The beginning of the book starts with him saying this: "As I sat on the wooden dock that jutted out onto the pond, I knew this to be true: my name is Buddy and I was a good dog."
- Inverted in Doglands. Furgul hates being called a "good boy" because he's not a "boy", he's a dog.
- In the first Animorphs novel, Jake gets called a bad dog by his brother while shape-shifted into their family dog. He immediately becomes inconsolable and curls up in a corner.
- Discworld: In Moving Pictures, Laddie's personality consists entirely of this and Dogs Are Dumb. The more cynical Talking Animal Gaspode, in this book and later ones, has a difficult relationship with the trope; on some level he wants to be called a good dog, and he deeply resents it. In Men at Arms he's able to provoke an instant existential crisis in some of the most vicious street dogs in the city by shouting "Bad dog!" at them.
Gaspode: (to himself) Clever Dog Saves The Day. Everyone Says, Good Doggy. No they don't, I'm only doing it 'cos I was threatened. The Marvellous Nose. I didn't want to do this. You Shall Have A Bone. I'm just flotsam on the sea of life, me. Who's a Good Boy? Shut up.
- Doctor Who: The Doctor's robotic dog K-9, despite being a sentient computer, can be lifted from depression with the words, "Good dog." (It does lead to a villain, in a NuWho episode, calling it/him a "bad dog"... for opposing the villain. K-9 proudly say "Affirmative!")
- Welcome to Night Vale: Subverted by "The Good Boy", an incredibly cute beagle puppy who was always following Chad and Maureen around in season 4, and turned out to be none other than Satan incarnate.
- Red Dead Redemption II: Arthur Morgan periodically calls the stallions he rides "good boy" and the mares that he rides "good girl" whenever the horse accomplishes something (like escape the lawmen and bounty hunters, jump over a rock or fence, travel a long distance) and as they ride across the old western landscape.
- There are also free-roaming dogs that Arthur can interact with. Arthur can praise them, calling them "good boy" as he kneels down and pets them affectionately. It seems that every single dog in the game loves being praised by Arthur and will even began to form a bond with him, which means any time he comes across that same location, the dogs will remember him, bark happily and run up to him, wagging their tails and shaking their whole body excitedly, hoping to be praised and petted again. There is also a "scold" button, however (which is a button hardly used by many players, whereas these same players have no problem antagonizing any of human characters) and while Arthur doesn't say anything worse than to tell the dog to "go on home," they take offense to this, lower their heads, ears drooping with their tail between their legs and whine as they sulkingly slink away from Arthur. They will also have no bond with Arthur if he chooses to scold them.
- The hero's Canine Companion in both Dragon Age: Origins and Dragon Age II reacts very positively when other characters compliment him. Say something negative, and he doesn't take it well. Hawke's mother Leandra even points it out in the second game, reminding her brother that mabari are very intelligent and understand everything you say, which is the literal truth; an old adage concerning the breed is that they are "smart enough to talk and wise enough to keep silent." There are multiple opportunities in both games for the player character to be good to their dog, and he (like all members of his breed) has Undying Loyalty for his master.
- Scott Howl from Monster Prom is a Kindhearted Simpleton werewolf, a combination that lends to him being overall portrayed as, essentially, a dog in a man's body, right down to him occasionally eagerly referring to himself as "a good boy" and making it clear that that's his favorite compliment. On the flip side, he's thrown into distress in one scene by Vera threatening to call him a "bad Scott".
- In Martha Speaks, Bob the dog understands language like Martha, but unlike her, he can't speak, so when he gets called a "bad dog", he becomes an Angry Guard Dog and when he gets called a "good dog", he turns into a Big Friendly Dog.
- Animaniacs: Most of the Buttons & Mindy shorts end with Buttons getting blamed for something and being called a bad dog.
- The entire premise of the aptly named Bad Dog was the dog Berkeley would go catatonic when called a bad dog. He's so obsessed with being the best dog he can be though he has a compulsive need to obey every single order he hears, even ones that weren't directed at him, or even things like suggestions, or even sarcastic comments, that he tends to be called bad Once per Episode after enough collateral damage has been caused. The only way to turn him back to normal was to call him a good dog.
- Played for Laughs with Atticus from Infinity Train. He's a Talking Animal who likes when Tulip calls him a "good boy", but he corrects her by insisting he's a "good man".