Maybe keep a list of short <30 minute tasks? It's kind of impossible to work deeply on a subject when you know you're going to context switch 30 minutes later. The only way to get something done in that time frame seems to just do something that you can finish in that time frame.
I have to strongly disagree with this. It is only very difficult to make progress with a long term task under a certain set of circumstances: namely, having no context in returning. This is because it takes time to recall where you left off, what resources you were using, what the current subtask was that you were working on, etc. But all these problems can be remedied by methods mentioned by some of the other posters.
By keeping some sort of log of where you left off, you can more easily transition back into a complex task, and make meaningful progress more immediately.
I agree, and thought of this possibility when I said "kind of" impossible -- The problem is, if you want to do truly deep thinking on some subject, or get into the meat of a non-trivial problem, the time that you will take to catch back up on where you were will be a limiting factor (and one I think will be too limiting to make substantial progress).
The more complex the task is, the more state you'll have to dump (especially if your 30 mins was up and you did not finish a concrete step, but were rather part-way through some sub-step), and over time, that will cut into work/think time.
Also, I think your example actually supports my suggestion -- by dumping state and remembering "subtasks", you're breaking up the work into small pieces, right?