As a pet sitter/dog walker I interact with a lot of dogs on a daily basis and many display undesirable behavior. In my role as a pet sitter/dog walker I am also an animal trainer. While this isn't directly what I'm being paid for in this role it is the reality that we deal with and it is always important when working with animals to keep in mind that you get the behavior that you reinforce, but their is another part to the operant conditioning spectrum and that is punishment, and punishment is simply not an effective way to modify behavior.
Punishment is the part of operant conditioning designed to stop an unwanted behavior. When we speak of punishment in everyday terms we are more often than not thinking of positive punishment which is the addition of an unwanted stimulus like a tug on a choke chain or a zap from a shock collar. There is also such a thing as negative punishment which is the removal of a desired stimulus like taking the ball away or withholding of attention. In the aspect of a dog jumping on you negative punishment would be to withhold your attention as long as the dog is on two feet, and this is part of the solution but not the truly effective part. Unless negative punishment is paired with positive reinforcement in this case then the behavior will take a lot longer to modify.
Psychological studies have shown that punishment isn't an effective form of behavior modification and we know from our own lives how little effect punishment has. One common form of punishment are traffic tickets. Think about the number of tickets you've gotten and if they have been effective in modifying your behavior. When you tell someone that you got pulled over for speeding do you warn them not to speed or do you warn them not to speed in a certain location? Traffic tickets rarely have any long term effect on changing behavior.
One of the major issues with punishment is timing. The behavior that is often being punished isn't the problem behavior at all. Think about your dog for a second and a behavior that you may not like. Imagine you just got a nice new leather sofa and you've always allowed your pets on the furniture but you can't allow them on this one. You now have to modify a learned behavior. If you were to punish the dog when you catch him or her on the couch you are punishing getting caught and not the behavior itself and in turn you could make your presence cause fear and anxiety in your dog and no dog owner wants that. Another idea is to use something like a shock pad on mousetraps on the couch when you aren't around and then the dog will become conditioned to associating the couch with that negative stimulus. The problem were is dogs are smarter than the punishment based trainers give them credit for and they will figure out it is not the couch that is causing the discomfort. Dogs have been known to drag shock pads off the couch or cover mousetraps with blankets.
As the above linked article mentions it is the source of punishment that is avoided and not the behavior that caused the punishment. Punishment doesn't work to create an association between the behavior and the stimulus. Just as the rats avoid the lever for a time and you avoid the area of the speed trap your dog will avoid the source of its punishment for a time. Think about the term collar smart and what it means for dogs trained to a shock collar. Once the source of punishment is removed there is no motivation or desire to give the behavior.
When working with dogs it is always important to think about what behaviors you're reinforcing. It is also important to know the types of learning and what is effective and what is not. As a pet sitter/dog walker we are often one of the first sources our clients come to on information on their pets and their behavior and how to modify any unwanted behavior. Since punishment is not an effective form of behavior change we seek to avoid it and would much rather reward the good behavior. Remember if a behavior isn't reinforced it will go extinct on its own.
Think about the dog on the couch for a minute. Now imagine instead of punishing the dog laying on the soft, comfy couch surrounded by the smell of it's loving master you reinforced behavior that is not laying on the couch. you get your dog a nice comfy dog bed and toss a dirty t-shirt of yours in their and then whenever you're at home you feed your dog treats in the bed and maybe even give them their meals there for a week or so. Pretty soon the dog will prefer their bed to your couch and the desire to lay on the couch will begin to go extinct. Punishment is the work of a lazy and un-creative mind. If we truly wish to build a relationship founded upon love, trust, and understanding with our dogs then we should work to reward and reinforce their good behaviors and only use punishment in the most extreme of circumstances when their lives might be in danger.