Recently, I realized I was doing the same thing three different ways. Namely, I was trying to practice mindfulness - and, while I was using different strategies (1) for work, (2) for home, and (3) for "personal development", it was all the same thing. Here's some stuff about my work-related mindfulness strategies.
The problem: work in the Age of Distraction
What with Slack and slow SQL queries, there has been endless opportunity for me to be distracted - and my brain has generally turned into a big, thin mushy goo, as I have flitted from task to task, nudging everything forward but not thinking deeply about any of it.
The solution: Tomato time + turning everything off
After reading Cal Newport's Deep Work and shaking my Spear of Social Justice at it, I decided to implement the basic idea: focused work. I downloaded a pomodoro timer (after briefly debating buying an actual, vintage, Italian tomato-shaped kitchen timer because AESTHETICS) and got in the habit of closing everything (Slack, email, phone, random browser tabs) during those 25-minute chunks.
Reader, I got so much more work done.
And better work! Suddenly, using my ACTUAL BRAIN and giving tasks my full attention, solutions would pop and I had all sorts of ideas and work just generally felt like a calm, rich, rewarding activity. So that was great. A+.
The challenges: but [my SQL query | Docker | grid searching] is so sloooow
The big issue I have is that some of my work tasks, by their very nature, occupy my computer for a very long time. They are computationally slow.
For example: a big, complex SQL query on millions of rows. For example: a machine learning grid search. What to do? What if I'm in the dead middle of a tomato-time when some computationally-intensive task kicks off, and I'm just left staring at my screen?
Sometimes, when my will has been strong and my intentions extra-pure, I've allowed the dragging seconds of boredom to wash clean my mind. Sometimes this has led to some "ah ha!" moments - e.g. that query could be made much more efficient! there's probably a better way to do this! That's excellent. But it takes extra-strong willpower.
Otherwise, I nudge forward on some work-related book (e.g. Statistics Done Wrong). Something to keep things quiet, and not scattered (i.e. not checking my phone).