I was reading through many of the recent posts on the harmfulness of multi-tasking this weekend.

Many cite the cost of a push/pop operation as harmful to multi-tasking. This can absolutely be the case. Some things are very costly to push/pop other things are not costly to push/pop. I feel however the discussion is being completely lost. The issue is not that we should avoid multi-tasking at all costs. We should be trying to figure out what things are low cost to push/pop and what things are high cost to push/pop.

Imagine for example that I asked you to write two programs with TDD. The first is FizzBuzz, the second is to count the recurrence of words in a text. In a quick non-scientific example I was about 10% less productive working on both at the same time (with switches between them at +- 3 minutes) than I was working on each separately start to finish (there was a mild cost of push/pop). I think I could have gotten them to near identical time if I had made my switches allowed 15 seconds or so to find a stopping point (I literally stopped typing in the middle of a word and alt-tab’ed).

In another quick non-scientific study I tried with simple features in a much larger space (e.g. adding features into a larger more complicated code base). I was in this case much slower. The reason why was that my push/pop costs were much higher. I was keeping more information in my head and it took me longer to get back into the problem.

Disclaimer, I often like to think I am multi-tasking. I often have 2-3 things going on the “back burner” where suddenly thoughts hit me and I mark down that thought and continue with what I was working on. How often do you solve that difficult bug while in the shower or cooking spaghetti?

However I see the difficulty of multi-tasking in a code base to be just like any other “ility” it is something that we can optimize towards (and likely we are making tradeoffs on other things). In particular coupling and complexity come to mind as related to the ility and I don’t necessarily mean cyclomatic complexity when I say complexity (it is often more difficult to work in very highly factored code where to put together an operation you need to bring together 20 well factored pieces that to look at one piece of code with high cyclomatic complexity). Oddly these same things that slow you down multi-tasking are the same things that slow down someone new to your team that needs to ramp up.

If you are writing code that you lose exponential productivity in multi-tasking with its probably because the code is complex. Your push/pop costs are high. You probably have a lot of other issues with this code like bringing new people into it.

If something is difficult, do it more.

The best way to get through such problems is to do it more. You are hurting due to complexity and push/pop costs? Multi-task more, where does it hurt when you are multi-tasking? Some tasks are truly complex but more often than not we introduce the complexity ourselves. Our models are wrong.


  1. Posted May 1, 2012 at 8:55 am | Permalink | Reply

    Multi-tasking may be an efficient way of working on a personal level and it gives you the feeling of always producing value. But multi-tasking is often very inefficient on a team and process level. Take a step back and try to understand how multitasking effects the complete development life cycle. How will personal multi-tasking effect feedback between development and testing. How will it affect time to market?

  2. Posted May 1, 2012 at 12:06 pm | Permalink | Reply

    We’ve been making a sport out of this one. A team of 6 working on 6 products. We introduced larger cycles for product clusters and work on those as a team. Bottom line, good for the team, bad for the product, because it excels in mediocracy. You can’t deliver high quality at a sustainable pace if you keep product hopping. The ramp up/down time are the most costly, especially when you’re dealing with an average developer. Technical debt is bound to happen if demotivation starts rearing its head. Also the shift in technology over a large period of time can make this a very unpleasant experience for some.

  3. Posted May 6, 2012 at 10:30 pm | Permalink | Reply

    I find that multi-tasking gets harder under two circumstances. The first is when I have a human being asking me for a decision, especially one that involves a level of thinking that clashes with my current task (strategic vs tactical, emotional vs logical). The second is when there is an element of psychic ‘weight’ attached to the task I am dropping – for example something I don’t want to do, but have promised to get done for someone. In both those cases I find the multi-tasking is an issue because it makes it harder for me to resume flow. Interrupting myself is much easier and less of an issue.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: