Instead of yelling and spanking which don't work anyway I believe in finding creative ways to keep their attention - turning things into a game for instance. And when they do something good positive reinforcement and praise.
You don't have to do everything by the time you're 30. Or 40. All you need is a work ethic. It's what allows you to push through moments of disappointment and self-doubt and fear.