I work in software development. I quite enjoy the task of writing and testing code, but spending too long without a break can be tiring. In reality, I'm not working 100% all of the time, I'm flicking between windows (GitHub, Slack, social media, code, documentation). Sometimes when I'm running a unit test, there will be a period of a minute or two where I am waiting for the result. It's at that time that the temptation to change to a new tab or window, or start answering Facebook messages, or check if the meetup I want to go to has a free space, etc is strongest.
Maybe there's a similar kind of task in your job that disrupts your normal 'flow'. Do you have a strategy for getting round that? What way of working appeals to you, personally? I'm sure that this is a question that everyone has a different answer to. What do you do to manage distractions and stay productive at work, while minimising stress and saving cognitive energy?
One podcast that I've found explores this kind of issue really well is Note to Self, the tagline of which is "The tech show about being human". They have this occasional event called Infomagical, where listeners can sign up to complete challenges to improve the way they interact with technology. One such challenge was to reduce information overload, which can exact a real toll on your mental well-being. The results of that experiment can be found here.
I'm a writer, which is surprisingly similar to being a software developer, work-wise.
There are structures I am writing within, floating around in my head (paragraph structure, story structure, sentence structure), variables (keywords) I need to monitor and consider and call out at the proper moments, and I need to consider what the inputs and outputs are going to be (who is going to read this), and then run it by them for testing (editing).
I have many windows open at a time. My main writing app. Other documents I have written that are similar in some way. Research or reference materials. A list of keywords I need to integrate. And email, Slack, etc, which is just a normal part of life.
So if you squint a bit, I think our workflows are pretty similar.
What I do is actually turn off the distractions. I make sure I don't ever log into FB with my work computer, for example. While I am at work, I limit myself to the FB app on my personal phone. The app sucks, so I don't use it much. (And, I don't like to be seen on my phone while at work, so the implied social pressure helps, too.)
I close my email from time to time. Log out of it for a couple of hours, and just work.
I set my desktop images to wide expanses and landscapes, to inspire broader thinking, and bring a little bit of nature in.
And when I really need to just crack down and power out a bunch of work, I have a specific playlist that I cue up. (Mine is primarily non-vocal hardcore prog rock. Really technical shit with lots of time signature changes, and other craziness. For some reason this is better than caffeine or anything else, and just turns on my productivity.)
And finally, I adhere to Stephen King's general guidelines he laid out in his book, "On Writing". He makes the case that creativity is a muscle that needs to be trained like any other. So he sits down at the exact same time every day, and writes. I think it is a 4-hour block, from 6:AM to 10:AM, IIRC. And then he stops. He gets up and doesn't think about his story again until the next day at 6:AM.
What this does over time is train your mind to be focused and creative during a specific part of the day. It becomes a tap you can turn on and off at will.
And it works REALLY well for a lot of people. Me included.
So I front-load my day. I get in early, before everyone else, and pound out a shitload of work before 11:AM, because I have trained my brain to be turned on and ready to go. After that period of ridiculous productivity, I go to lunch. Get some good calories in my body. And in the afternoon I do all my meetings, reading, organizing, planning, research, etc.
And when I get up from my desk, I leave everything there. I walk out of the building and do not think about work again until I am at my desk again the next day.
It takes discipline to do it, but it works amazingly well.
I recommend it.