I've given the dogs a whap on the rear when I catch them in the garbage, but its not hard, just enough to startle them out of the garbage and let them know they've been caught. I don't really think they've been hurt by it, no more so than a quick touch on the shoulder when I want them to stop a behavior. By no means am I going to pull a naughty dog aside for a spanking as punishment, because they simply aren't going to know why you are hitting them. A child might connect a spanking as punishment quite a while after a bad behavior, but a dog can't be punished once the behavior has already stopped.