There's a peculiar habit I've noticed when I'm transitioning between activities. Often the best way to get started on something is to just jump right in; I know that if I go check my email or read internet junk first I'll just get distracted, and the time between activities is critical because I haven't got into a rhythm yet. But the weird thing is, I seem to have accreted little rituals that I do before I start working on something. These include choosing music to listen to, making coffee, moving things around on my desk, and, yes, checking my email and reading junk on the internet.
These are distinct from just regular recreational activities for a couple of reasons. Firstly, you don't set out to do them recreationally. Instead, they're considered part of work time; they're a work-like activity that isn't actually work. Secondly, they're things that you do even when you're transitioning from fun to work, leading to the bizarre phenomenon where you sometimes finish reading junk on the internet, go to do some work, and then start reading junk on the internet again.
I think of these as interstitials, mainly inspired by the term in software meaning a (usually unwelcome) screen that you have to click through before the one you wanted to see. By analogy, these interstitials are activities that pop up just before you do the activity you actually set out to do. Sometimes they're fairly benign – a coffee isn't likely to disrupt you significantly – but complex interstitials can easily make everything you do harder. Even something relatively benign like choosing music can go off the rails if you can't find the right thing to listen to, or you get distracted because your amp won't turn on.
The antidote to interstitials is simple in theory: just immediately start doing something. I've found timetabling helps with that, but I'm sure other methods would work too. Often the preparatory rituals aren't necessary, and if they are you can go back to them once you've got a bit of a rhythm going.