I was spanked OFTEN. I was also lectured OFTEN. Spanking didn't make me behave any better, but it did make me fear my parents. Studies show that spanking is ineffective for long-term results, so I have never used it and never had cause to.
With my child, he is still learning how to behave appropriately, so I do a lot of explaining to him what he can and can't do. It takes patience and lots of repeating myself before he is successful, but I'm surprised at how much he tries to do things the right way.
For deliberate offenses, I give him a time-out and expect an apology afterwards. Then, I tell him that I forgive him and give him a hug. Then, we start from scratch. This happens about three times per week.
I've found that what my child likes the most are choices. So, when he's being non-compliant, I give him a choice and he's happy to choose and the problem is usually solved. An example: The other day, he refused to get dressed. So, I asked him if he wanted to wear jeans or pants. He chose pants and forgot all about refusing to get dressed. Problem solved.