Coding Horror

programming and human factors

The Multitasking Myth

In Quality Software Management: Systems Thinking, Gerald Weinberg proposed a rule of thumb to calculate the waste caused by project switching:

waste-caused-by-project-switching-graph.png

Even adding a single project to your workload is profoundly debilitating by Weinberg's calculation. You lose 20% of your time. By the time you add a third project to the mix, nearly half your time is wasted in task switching.
This can be a problem even if you're only working on a single project at any time. The impact of simply letting your email, phone, and instant messaging interrupt what you're doing can be profound, as documented in this BBC study:

The study, carried out at the Institute of Psychiatry, found excessive use of technology reduced workers' intelligence. Those distracted by incoming email and phone calls saw a 10-point fall in their IQ - more than twice that found in studies of the impact of smoking marijuana, said researchers.

Kathy Sierra wrote a great post comparing multi-tasking and serial tasks and followed it up a year later with a typically insightful post proposing that multi-tasking makes us stupid:

Perhaps the biggest problem of all, though, is that the majority of people doing the most media multitasking have a big-ass blind spot on just how much they suck at it.

We believe we can e-mail and talk on the phone at the same time, with little or no degradation of either communication.

We believe we can do homework while watching a movie.

We believe we can surf the web while talking to our kids/spouse/lover/co-worker.

But we can't! Not without a hit on every level – time, quality, and the ability to think deeply.

Joel Spolsky compares the task switching penalty for computers and computer programmers:

The trick here is that when you manage programmers, specifically, task switches take a really, really, really long time. That's because programming is the kind of task where you have to keep a lot of things in your head at once. The more things you remember at once, the more productive you are at programming. A programmer coding at full throttle is keeping zillions of things in their head at once: everything from names of variables, data structures, important APIs, the names of utility functions that they wrote and call a lot, even the name of the subdirectory where they store their source code. If you send that programmer to Crete for a three week vacation, they will forget it all. The human brain seems to move it out of short-term RAM and swaps it out onto a backup tape where it takes forever to retrieve.

I've often pushed back on demands to work on multiple projects at the same time. It can be difficult to say no, because software developers are notoriously prone to the occupational hazard of optimism.

We typically overestimate how much we'll actually get done, and multi-tasking exaggerates our own internal biases even more. Whenever possible, avoid interruptions and avoid working on more than one project at the same time. If it's unavoidable, be brutally honest with yourself – and your stakeholders – about how much you can actually get done under multi-tasking conditions. It's probably less than you think.

Written by Jeff Atwood

Indoor enthusiast. Co-founder of Stack Overflow and Discourse. Disclaimer: I have no idea what I'm talking about. Find me here: https://infosec.exchange/@codinghorror