Usually task-switching is a bad thing, yeah? You want to get into the flow and dive deep into that work, look up and it’s three hours later and you’ve made something amazing.
But sometimes the flow just doesn’t happen. Sometimes the work you’re doing is frustrating and painful and you might as well quit the entire internet and go raise sheep. You’ve been banging your head against this problem for three hours and it’s just dumb. You’re just dumb. Computers are dumb.
So here’s something I learned from the decade where I was a jack-of-all-trades: switch it up. Set the problem down and do something as radically different as your job will allow. Rest the code-brain, the writing-brain, the design-brain, and go pick up some other sort of work.
That problem that’s driving you nuts will still be there, and most likely, when you’re done with that break, you’ll have a slightly different perspective.
And if all your work is the same, clean your desk, make some food, or go for a walk. Your brain will thank you for it.