Of course all of us love to work on the interesting problems - the thrill of hunting down the perfect algorithm that perfectly expresses the desires of our hearts to both the compiler and those who come after us. We love it so much that we're willing to put up with all sorts of monkeying from co-workers and pointy-haired bosses. It's so much fun that many of us consider it play and do it when we're not at work, where we're lucky enough to get paid to do essentially hard tasks that other people don't want to do (or aren't smart enough). These are easy things to work on.
But what about the painful tedium? How do you force yourself to work on the tasks that are insanely un-interesting, but necessary? What tricks do you have to thrust yourself through the doldrums? Do you reward yourself like the subject of a Pavlovian experiment? Do you threaten yourself with worse punishment? Does your boss flog you with a cat o' nine tails, to the beat of a skin-drum while you're chained to your desk until you reach your destination?
What's your secret?