Then look into the conditions of "flow" : http://en.wikipedia.org/wiki/Flow_%28psychology%29
1. A clear set of goals : you know exactly what needs to be done next.
2. The task is not too easy, but not too hard. It's just at the edge of your ability.
3. The task gives you immediate feedback.
When you're engaged in that kind of work, you FOCUS! That's why video games are so addictive! They play up these 3 conditions so well. You have no problem focusing when playing a video game!
Also it's pretty crucial to have all this work be leading to a goal that you want so badly - whether it's to be a millionaire, to be famous, to be in Y Combinator, whatever.
Then it's also crucial to have this goal be so close that you know if you just keep working well that it's very likely you'll get there.
Get those situations lined up, and you'll have no problem focusing!
(( And yes, I'm embarrassed to admit I have a major problem with focus in my life right now. Apparently it's kind of common for recent mutli-millionaires who have surpassed all their previous goals. What's next? How can I top this? Do I want to? Do I just retire now? I have some new goals, but they're not burning goals. And I just realized they aren't matching steps #1, 2, 3, above. Hmmm.... ))