Pay attention to context switching
If you try to do every task when it arrives, you won't get everything done. How do you prioritize while minimizing the cost of switching? Read: "Everything Starts Out Looking Like a Toy" #242
Hi, I’m Greg 👋! I write weekly product essays, including system “handshakes”, the expectations for workflow, and the jobs to be done for data. What is Data Operations? was the first post in the series.
This week’s toy: an interactive panel (the author calls it an “inline evaluaton adventure”) that lets you evaluate code by highlighting information and using control-r
. “Evaluating” code means running it in place, instead of using another application to compile the code and see a result.
This is a common pattern in Jupyter notebooks – software tools that combine code and information about that code – and less prevalent in consumer tools or business applications. It’s a pretty interesting way to surface a “what if?” analysis tool in the middle of document or presentation. Edition 242 of this newsletter is here - it’s March 17, 2025.
Thanks for reading! Let me know if there’s a topic you’d like me to cover.
The Big Idea
A short long-form essay about data things
⚙️ Pay attention to context switching
Have you experienced that feeling of “what was I doing” after being interrupted mid-task? Perhaps you were cooking dinner, your phone buzzed with a text, and then someone asked you a question. (Yes, if you work in a software company, this is silly because it happens all the time.)
Your brain pauses for a second and then you find the path you were on a minute ago. Or you don’t. But either way you have to think: “what do I do next?” When you return to the previous task, you’ve lost some time determining the next step.
This everyday scenario illustrates the challenge of context switching – constantly shifting between tasks – and also understates the impact of the switching on your productivity.
Researcher Gloria Mark describes context switching this way:
A lot of people think that multitasking is doing two different tasks at the same time, and that’s just not humanly possible. But what people are actually doing when they multitask is they’re switching their attention rapidly back and forth.
And even if you’re on a Zoom meeting, and trying to do your email, that’s not multitasking because you’re actually switching your attention. Right? You might be doing your email and you fail to hear your name being called to answer a question or maybe you do hear your name called and then you have to ask people to repeat it, and that’s because your attention had been diverted to doing your email.
Great, so we’ve learned that switching tasks all the time is bad. But let’s get real. Daily life features so many inputs that make it hard to avoid switching tasks.
There are some options to protect your time - let’s take a look at one.
What alternatives do we have to switching?
Consider a line at your local coffee shop. When you arrive and see a very long line, at a certain point you will leave and go to another coffee shop to avoid the feeling of having to wait in line. At that moment you’re not considering whether balking (the fancy term used in Operations Research to indicate someone who leaves a queue) is the right decision. You want coffee and you’re annoyed by waiting in line.
The outcome of that long line might surprise you. It turns out that long lines – when accompanied by sufficient cashiers - are faster than a short line for the median line member waiting for coffee.
Especially when you know that the cost of switching (tasks) is an average interruption of 23 minutes before you can get back to the brain space you were in, staying on task is the right thing to do.
But what happens if your list of tasks is long? Looking at the mountain of tasks at once can be overwhelming. Dividing those tasks into bins or batches that you do in a sustained burst is a helpful frame.
Batch vs. Next Best Action
If context switching causes delays, it makes sense that you could do several “like things” in a group. Finish all the things for n customers or accounts and then you can move on to the next group of tasks.
If you were directing a robot to do a series of tasks rather than figuring out what you want to do next, you might land on these two options:
Batching by similar item
When you batch, you group all of your items into sets of a certain number, depending upon the task difficulty (one at a time is the smallest batch, and you’re probably looking at 10, 20, 50, or 100 things at a time). The beauty of a batch process is that you always know how many things start in the batch. You can create rules to send a “stuck” or “I don’t know” item to another place so that you don’t stop the entire batch. The goal is to improve overall workflow (read this book for more tips).
Grouping work into a batch resembles the Japanese industrial process called Kanban. It has that name for the physical bins sent back and forth on the assembly line to workers with the parts needed to solve the current task. Kanban normalizes the work across different people and makes it easy to measure throughput. It also can slow down when the situation changes dramatically, e.g. when there are too many batches for the available resources.
Finding the Next Best Action
Imagine a magic box that tells you the right next thing to do given your knowledge. The theory is that knowing the right thing to do gives you a bigger benefit than the switching cost between task types. With a just in time mentality, you can do anything! This concept is often described as the Eisenhower Matrix, where you prioritize urgent and important work.
Except in aggregate, you’ve also described the problem of infinite switching. When the organization can respond flexibly to almost any challenge, it might not have capacity to complete a pile of work in a predictable amount of time. So you need to batch a little bit even if you know the next best action.
CAUTION: if you’re always giving people the “next best thing to do” and never giving them a break, you might be giving them cognitive overload.
Imagine that the magic box can route the “next thing to do” to the group of people who know best how to do it. That makes it possible to give what seems to be a homogenous batch (or mostly the same, at least) to a group while not overwhelming them with too many different things. Balancing the context switching caused by a “new important task” with “do a bunch of things in a row to minimize context switching” is an important tension to resolve.
Blending the approach to improve work
The imaginary solutions of an infinite pile of work or always knowing the next best option are illusory. We are talking about people who are trying to do their jobs well. On some days, they are above average; on others, they struggle to cope. We need to build systems that get work done despite that variability and also seem humanized so that the people want to keep doing them.
I hope more teams take the “yes, and …” approach of both batching more work to minimize work in progress at any one time and improving automated routing so that the right people are well positioned to solve typical problems in an org. If done right, we’ll get more work completed at a higher quality and more people who hate their work less (maybe even enjoy it).
What’s the takeaway? Constant shifting can lead to mental fatigue, errors, and a feeling of being perpetually behind. To combat this, strategies like the Eisenhower Matrix, which helps prioritize tasks based on urgency and importance, and time blocking, which allocates specific periods for focused work, can be incredibly effective. Switch the work less, and people will feel more calm (and get more done too).
Links for Reading and Sharing
These are links that caught my 👀
1/ What does the cat say? - Although I am waiting for a crazy AI version of Speak and Spell (which hasn’t happened yet), the Pudding has done something else interesting. They mapped the way people pronounce animal sounds across different languages. The differences in “meow” stem from the language sounds and structures - cool!
2/ Bad films, ranked - If you identified the movies each year with the highest percentage and count of single star reviews, you’d have a list of some really bad movies. It takes a special movie to be that bad, and seeing them all together makes you appreciate them … a little bit.
3/ Cycle time, visualized - Do you ever wonder about the difference in speed to access data from an SSD vs. a magnetic tape drive? Maybe not, but this visual interactive about different forms of storage and the time to read and write is fascinating. Optimizing throughput makes a difference, even if you’re not paying attention.
What to do next
Hit reply if you’ve got links to share, data stories, or want to say hello.
The next big thing always starts out being dismissed as a “toy.” - Chris Dixon
Great article, Greg. We are simpatico! I've recently begun to explore my manic mind's lack of attention span -- its costs and what can be done to change it. More here: https://shorturl.at/Sg4FH