All good relationships rely on communication, including your relationship with your dog. When he acts out, he's not just trying to be rude. He is telling you he needs something, and if you look at the circumstances surrounding his misbehavior, you can determine what it is he needs.
Take careful note of what triggers your dog's misbehavior. For example, he may act out when guests come over, when you leave him home alone or when he hasn't gotten his daily exercise. Most of the time, dogs have triggers -- even long-term triggers -- that bring about bad behavior.
Increase your dog's cardiovascular activity and play time. Most of the time, a dog who is acting out simply isn't getting enough exercise, and all that pent-up energy has to go somewhere. A bored dog is a destructive dog, so if your pooch can't keep his impulses under control, he probably just needs a positive outlet for his energy.
Maintain a routine. Dogs thrive on consistency, particularly when it comes to their training. If your dog doesn't have any consistency in his routine, he'll simply demand things when he wants them. For example, he may carry his food bowl around when he's hungry, scratch the door when he wants to go for a walk or jump in your lap when he wants attention. By establishing a sense of order in his life, he can rely on you to meet his needs without him asking.
Address the specific issue at hand if simple routine-establishing is ineffective. Once you've identified the cause of your dog's misbehavior, you can address the issue instead of attempting to simply correct the behavior. For example, if your dog acts out because you've been paying more attention to a new pet, make sure your dog receives enough individual attention. If he acts out when the doorbell rings, take the time to teach him that the doorbell isn't a threat rather than simply scolding him every time he barks at it.
Withhold positive reinforcement rather than using negative reinforcement. Yelling at and scolding your dog for bad behavior is far less affective than rewarding him for good behavior. If he begs and barks for your attention, don't give it to him -- acquiescing only teaches him that acting out gets him attention. Conversely, when he behaves -- like if he doesn't bother you while you eat dinner -- reward him after the fact with praise and attention. Dogs behave in a way that gets them attention.