Task switching comes at a cost

September 10, 2022


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 in this chapter. However, one thing is sure: we are constantly bombarded with distractions.

As I was researching for this essay, I received a few emails, 7 WhatsApp messages, and some Instagram notifications. And, of course, there's the occasional Reddit browsing.

So exactly how bad are distractions? According to Dr. David Meyer (Research Link), who is a Professor in the Department of Cognitive Science at the University of Michigan, it can cost as much as 40 percent of someone's productive time. 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 completely 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 pick up from where I left off. Instead, I have to re-familiarize myself with what I was working on the moment that I was distracted.

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.

A system for decreasing task switching costs:

1. If you are working on a project, set aside a specific amount of time that morning. For example, if you are working on Project X for 2 hours, then put it on your calendar and say that from 9 AM to 11 AM I'm working on Project X.

2. Remove any and all negative distractions during that time. That means you can put your phone on Airplane mode so you don't receive any social media notifications. Notice how I said negative distractions? I made this distinction because, in the same research report from the University of Michigan, 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.

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 afterward.

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