Geeks With Blogs
Mark Pearl

I had an interesting meeting with a team that is currently facing some challenges getting work done. After working with them for a few days a major issue that cropped up was the amount of context switching that they were experiencing between projects. Each team member is handling several projects and switching between them several times in a day. While I am no psychologist / time management expert, I thought I would try and illustrate the cost of context switching and how real a cost it is and some of the things I do to avoid this cost.

Scenario A – Ideal Situation

Assume you have several projects that you were working on – let’s say 4 projects (for illustration purposes). They are each challenging and require concentration when working on them. Also, assume it takes 10 minutes for one to begin concentrating properly on a project.

If each project requires a full 6 hours’ worth of concentrated work before it is completed, then with no waste you should be able to complete all the projects in 24 hours – let’s call this Scenario A – the ideal scenario.

Scenario B – Worst Case Situation

For Scenario B – let’s assume you context switch between projects regularly – for this example let’s say you change projects every hour. That would mean, every hour before you get meaningful work done you would be spending 10 minutes to get “in the zone” – the cost of a context switch. Let’s take it even further and assume that you rotate evenly between projects. For instance for the 1st hour you work on project 1, then for the second hour you work on project 2, then project 3, then project 4 and repeat the process.

With an ideal waste of 10 minutes for each context switch the total time to complete the projects in Scenario B take just less than 28 hours. That is almost 4 more than the Scenario A where no context switching occurs.

Further, if you look at the time to deliver each project it begins to look even worse. In Scenario A where you work on each project and get it complete without any context switching you are able to deliver the first completed project after 6 hours, the second after twelve and so on.

In Scenario B where you are switching every hour between projects you are only able to deliver the first project after 24 hours - a significant delay.

The problem with a delay like this is if these projects are urgent and you have someone hounding you continually from each of them, then for the first 24 hours you will have 4 project managers hounding you for status updates additional waste that you will incur in time to respond to each person and give them a progress report.

Where do you operate?

Ironically, a large number of developers that I have worked with operate in a Scenario B type of situation. In fact, for a long period of my career I was a Scenario B type of person. Looking back I had a number of what I felt were valid reasons for putting myself in this type of situation including the following…

·         I like a change else I get bored

·         I am waiting for feedback from the client so I don’t want to waste time doing nothing

·         This project is more urgent than the one I am currently working on so I need to change

·         etc.


Honestly deep down inside at the time I liked to feel busy – in many ways I liked it that I looked like I had a lot on my plate.


Does this sound familiar?

Don’t get me wrong, there are legitimate situations where a project is more urgent and needs to take priority over another project that you are already working on – but my own experience tends to indicate that people allow this to happen to often.

Also, it is true that if you are waiting for feedback from business on a particular project you probably should use that time effectively instead of doing nothing, BUT again you need to be aware of the risks you take when taking on another project and pick what you do during that feedback time wisely. Pick things that will have less of a cost to context switch out of.


When is it good to context switch?

One final point to make in this post -  there are times where natural context switches occur. For instance, lunch for me is a context switch that I cannot avoid – I need to eat. I know I am going to lose focus during lunch time and so if know I need to do a context switch on projects I plan it for this time.


There are other natural times for context switching which include start of new days, after meetings, etc.


So the challenge from me today is for you to go through a day and consciously make a note of every time you context switch. Ask yourself if you really need to incur the cost of the switch.


I would be interested to see your results. if anyone else has done any research on this topic or has any input leave a comment!

Posted on Tuesday, July 17, 2012 5:55 PM | Back to top

Comments on this post: The human multitasking problem – the cost of a context switch

# re: The human multitasking problem – the cost of a context switch
Requesting Gravatar...
10 minutes might even be optimistic for a context switch. Some years back, I worked at a company that was in perpetual "firefighting" mode so "drop everything you're doing and start doing this" was something I heard several times per day. I started to time how long it took me to switch context when this happen and to record the results in a spreadsheet driven by formulas to forecast what percentage of my time was wasted.

The results were pretty staggering. And, it's not wholly unexpected. If you've got 12 code windows open and someone tells you to drop all that and switch to something else for the rest of the day, you're probably going to need to work a bit to get to a stopping point where the code at least builds, check it into source control, go find the person who came by and you told to wait 5 or 10 minutes, see what that person wants, go back to your desk, fire up the new project, update it in source control, open the project, and only then start to think about the next context.

It adds up pretty quickly, or at least it did for me. And that doesn't even include meetings (see Paul Graham's "Maker's Schedule, Manager's Schedule") for an interesting read there.
Left by Erik Dietrich on Jul 17, 2012 6:13 PM

# re: The human multitasking problem – the cost of a context switch
Requesting Gravatar...
You see Jeff Atwood's blog on this same topic - has some pretty scary numbers:
Left by Robert MacLean on Jul 17, 2012 8:39 PM

# re: The human multitasking problem – the cost of a context switch
Requesting Gravatar...
Even though multi-tasking and context switching is bad and we can try to prevent it, it is going to happen at some point. I consider the ability to switch contexts quickly desirable in software developers. One of my stumbling blocks though is how you would assess this in an interview situation
Left by Joshua Lewis on Aug 02, 2012 11:09 AM

Your comment:
 (will show your gravatar)

Copyright © MarkPearl | Powered by: