I don't need to tell you that separating work and play in the age of infinite distractions can be a challenge, but there it is. We multi-task too much. We lose our focus too easily. And the one thing you need in order to be an effective writer is focus. I used to have a hard time with this. If I hit a road block in the day's work, I might allow myself a quick break to surf the web. But we all know how easily a "quick break" can turn into an hour spent clawing around the YouTube rabbit hole--or whatever rabbit hole you gravitate toward these days.
There are plenty of solutions to this problem. There are apps that block the internet. There's also turning off your WiFi. Willpower is nice, too, but who has time for that?
Personally, I've found the best way to separate work and play is to physically separate them.
I have two computers. My writing laptop, and my everything-else PC. My everything-else PC is my general use computer. I browse the web, watch Netflix, grade student papers, plan classes, reply to emails, whatever. My writing laptop, you may have guessed, is what I use to write.
I also have a writing desk. In my current setup, because I share a small apartment with my wife, my writing desk and my everything-else desk are in the same room, across from each other. When I haven't sat at my writing desk in a few days, I start to feel like crap. I sit over there for a while, writing. I keep the space clean and uncluttered. I dust it from time to time. Sitting there, even when my writing isn't going great, I am focused. I know that this is not my time to be distracted by any internet rabbit holes. I imagine breaking this code and browsing the web would give my laptop some sort of disease. Not a virus. A genuine disease. Like the measles. Eventually, it would shrivel up like a dying flower and start to stink. Before long, I'd have to bury it in the yard.
It also helps to keep my phone a few feet away with the screen facing down or away. That way, if it goes off, it won't be in my pocket where I've been programmed to clutch at my leg like a text-hungry zombie when I feel it vibrate.
It's all in the name of shutting out the big, loud, oppressively distracting world.
So, if you find yourself having a hard time focusing when you sit down to get the words out, don't blame writer's block or a lack of inspiration. Consider making a physical space and dedicating a device to nothing but writing, if possible. That way, if the work isn't getting done, you can't blame the big, loud, oppressively distracting world. It's more likely you haven't made the time for it, and that's a whole other issue, but one that's generally simple to solve.