This is, of course, quite a bit simplified. In any non-trivial venture there will be a significant number of things that need to be done and that you don't particularly enjoy doing. But if the greater part is fun then it is easier to sometimes buckle down and get through the mundane parts.
I guess it also largely depends on the personality. I, for example, hate having to do something quickly, without fully understanding the area, and moving on. On the other hand, if I have a chance to spend time and get exhaustive knowledge about something then I genuinely enjoy working on it even if on the outset it seemed unattractive (think sales, marketing, writing, etc., vs hacking some interesting piece of software).
Using a TODO lists when you already know roughly what you have to do can help enormously. The mundane act of ticking off a box next to a small task is enough motivation to get started on the next task.
Especially in the morning it can be tempting to "catch up" with all the HN posts, but if you go through your TODO list and see that you have to "fix link on page X" it's really easy to just do it. Only takes a minute. You know what you have to do, and it doesn't "feel" like work. And when you've started the next task automatically follows.
You can even put off simple tasks so you can do them whenever you're not feeling motivated, just to help you get started.
writing a unit test is a small task completion, as is passing it in a non-brain-dead manner.
http://www.amazon.com/Mastery-Keys-Success-Long-Term-Fulfill...
I do this and have found myself opening Firefox/Outlook/Newsgroup/RSS readers only to find a flat "no connection" page - that immediately scolds me for sidetracking and I get on with what I'm supposed to eb doing again.
My work is writing, so I find it extremely convenient to have internet access as it helps with checking if I've got the meaning correct for words I rarely use in common conversation. It also helps greatly with research, however there comes a time when I have to turn my wireless off and actually use what I've research, etc.
When/If the laptop dies... I can always head back and plug it in, but at least I'd given myself a dedicated block of time on the problem.