Task Switching Costs for Developers


On Wednesdays I like to cover a random topic for developers and today I’m going to discuss the concept of task switching costs. Task switching, commonly referred to as multitasking, can be detrimental to your performance as a developer and can even lead to errors in your projects.

Our world has changed dramatically over the past decade, whether for good or bad is not a topic we’ll discuss today, however one thing is sure: we are constantly bombarded with distractions. As I was researching this post I received over a dozen emails, 7 Snapchat messages, 30 notifications on Instagram, 7 Twitter notifications, 5 Skype instant messages, and surprisingly only 9 text messages. If you were counting that’s around 72 various notifications that were pushed to me in the past two hours. Beyond that, I researched this post at a coffee shop filled with potential distractions.

So exactly how bad are distractions? Research from Gloria Mark, who is a Professor in the Department of Informatics at the UC Irvine shows that it takes, on average, 23 minutes and 15 seconds to get fully back on task after being distracted. That’s a very very bad thing when it comes to productivity, however I’ve seen it myself, I’ve lost track of how many times I’ll be in the middle of a development project and receive an email on a completed unrelated matter and instead of ignoring it and continuing to work I’ll read it and then spend time working on another task before returning to the project. This may not sound like a major issue, except that when I come back to the project I don’t pickup from where I left off. Instead I have to re-familiarize myself with what I was working on the moment that I was distracted. If the problem was complex it may take me even longer than the 23 minutes in order to get back in the zone and working on the project.

So in a world filled with emails and social media distractions how can anyone get any real work done? After reading Cal Newport’s book “Deep Work” I started to put together some practical ways that I can work efficiently and still stay in touch with the world.

System for Decreasing Task Switching Costs

  1. If I’m working on a project I set aside a specific amount of time that morning. For example, if I’m working on Project X for 2 hours, I will put it on my calendar and say that from 9-11am I’m working on Project X.
  2. I remove any and all negative distractions during that time. That means I’ll usually put my phone on Airplane mode so I don’t receive any social media notifications. Notice how I said ‘negative’ distractions? I made this distinction because in the same research report from UC Irvine it revealed that not all distractions are bad. If the distraction is related to the task that you’re working on, it can actually be beneficial. For example, if I’m working on the routing engine for a web application and the client messages me to discuss the application, what they say may actually influence the work that I’m doing or give me an idea on how to refine it. That’s a good distraction and it’s why I typically will keep my email and instant messenger on while I’m working. However if I see that the Skype message or email is coming from another client or is completely unrelated I’ll simply ignore it. I do know many Deep Work proponents who would say that 100% of your distractions have to be eliminated, however that’s not always practical.
  3. Have a clear conclusion for whatever you are studying or working on. If you don’t establish an end for the task, your mind is going to be prone to wander in the same way that a runner without a finish line won’t be able to effectively compete in a race. The research around task switching costs also reveals that even planned distractions are harmful, so if you are planning on working for 2 hours straight on a project don’t plan any breaks in the middle of the task. Maintain your focus throughout the allotted time and then you’ll be free to relax afterwards.

I hope that this has been a helpful overview of task switching costs and that you now have some practical methods for staying on task.

task switching costs



Please enter your comment!
Please enter your name here