I think beating your pet will develop bad tendencies later, such as aggression towards other people and animals.
From my experience, you need to establish that you are the "pack leader". When my dog was about 6 months old, he got off the leash and took off down my street in a dead sprint. I caught him about 30 yards later, picked him up and pinned him on the ground (he was about 50 pounds), all the while scolding him. If he ever was acting up, I could just physically over power and hold him down, while saying "bad boy" and things like that.
I don't think beating or inflicting pain does a bit of good.
It's all about establishing what is acceptable from your dog. Now if I even speak in a certain tone, my dog will cower and slink away. No physical interaction necessary.
Another way to avoid bad behavior is to constatnly reward good behavior. Buy a bag of training treats from petsmart and periodically give them a treat for listening.