My dad gave my mom (then his ex-wife) one of his little hairless dogs and supplied a male to breed the dog to. The dog had two pups and, a couple of months later, slipped out and was run over by a car. The two pups did fine.
Rascal, the male pup, was mom's constant companion. She was diagnosed with advanced multiple myloma (cancer) when Rascal was young. She spent most of the rest of her nine months of life in her recliner with Rascal there with her. She hand fed him. After she died, her husband wanted to get rid of Rascal. Rascal's sister was mom's husband's favorite.
We ended up with Rascal and loved him from the start. When we moved into our home last June we decided to "fence" Rascal using the electric wire and shock collar. (Don't get bent out of shape--the "shock" is akin to a static shock from touching someone after walking across the carpet--surprising, but harmless.) We spent a few months walking him when he needed to go out, then got the collar and wire last week.
We ran the wire and put up flags to warn Rascal where he would get a shock. Rascal approached the flags tentatively and sniffed at them, then he yelped and jumped back. He wandered a few steps and tried again, with similar results. Then he hastily walked to the front door to be let in.
That day and most of the next, Rascal was scared to go outside. Then the day after, he ventured out. He has not been shocked again. He is a fast learner.