In 1907, the Washington Post detailed the misbehavior of a headstrong resident of the White House. "He is a great fighter and craves trouble," the newspaper wrote of Theodore Roosevelt's "prized bull terrier," Pete, who had bitten the leg of a Navy clerk and chased the French ambassador up a tree.

President Joe Biden's dog Commander has since joined the ranks of unruly presidential pets. A spokesperson for the Secret Service said recently that the dog, a 2-year-old German shepherd, had once again bitten an agent.

Commander had previously landed at least six bites that resulted in a person requiring medical attention, and Major, another one of the Bidens' German shepherds, was sent away from the White House after biting two people.

"The White House can be a stressful environment for family pets," said Elizabeth Alexander, communications director for First Lady Jill Biden. She said the Bidens sought to help Commander cope with "the often unpredictable nature of the White House grounds."

Stress and unpredictability are among the primary enemies of dog trainers who address aggression. Although the White House may be an especially aggravating environment for pets, dog trainers agreed that owners in and outside of the executive branch can help dogs keep their cool. Here's how:

Talking with their teeth

Dogs usually bite to communicate fear or discomfort, said Jean Donaldson, founder of the Academy for Dog Trainers and author of several books on dog behavior.

To solve conflicts, humans have language: "We write letters to the editor, and we backstab, and we engage in office politics," she said. Dogs may instead resort to growls and bites to communicate messages such as "You're a little too close" or "Don't touch my stuff."

But those messages can be lost in translation between species. Dogs often do not intend to hurt anyone, she said, but their bites can end up causing serious injuries or death. And dogs that display aggression, especially in shelters, can be euthanized.

New faces and roast chicken

How dogs react to people may depend in part upon how they were treated as puppies, said Kate LaSala, a dog trainer who specializes in fear and aggression. Dogs that do not meet and have positive interactions with a broad range of people in the first 12 weeks of their lives "tend to be the dogs that grow up to be a little spooky or fearful of strangers," she said.

Owners of those dogs should become familiar with common triggers for biting, and determine which apply to their pets. Dogs often respond to sudden movements and new visitors to their environments, especially those in uniforms. It is not a coincidence that so many dogs bark at mail carriers, she said.

Some dog owners use collars that constrict or shock a dog's neck to try to prevent them from biting — which she does not recommend. "Those methods make fear, anxiety and aggression worse, not better," she said.

Donaldson recommends starting with short-term measures such as leashes, muzzles and safety gates to keep those around the dog safe. Then, she would make a list of people who will encounter the dog regularly and instruct them to approach the dog with some kind of treat — perhaps a handful of roast chicken.

Understanding your dog

Elizabeth Aldrich, a dog trainer in Washington, D.C., who specializes in aggression, said owners often feel shame when their dogs bite or snap at people. "The societal view on aggression is that it's bad, and therefore the dog is unreliable and the owners must have done something wrong," she said. "And I don't agree with that."

Aggression has more to do with whether the dog is being kept in an environment that is compatible with its tendencies, she said. According to Aldrich, who owns a German shepherd, the breed can require more stimulation than others because they were bred to herd and protect livestock. "There's an extra responsibility when you do own a German shepherd or a working-breed dog," she said. (Some researchers, however, have argued that a dog's breed bears little relationship to its behavior.)

If a dog bites someone, its owner should take immediate steps to modify its environment, said Amy Pike, a veterinary behaviorist in Northern Virginia. The more predictable and more structured the situation, the less likely the dog is to bite.

She recommended that people coming into a dog's orbit should throw a ball or hand out a treat to communicate friendliness. But she sees why that might be a challenge for members of the Secret Service. "They're there to do a job," she said. "They're not there to play with Commander."