Monday, September 28, 2009

Multitasking

I love coincidences. Here’s another example.

I was talking with some folks on Friday about multitasking, and about the fact that the human brain just isn’t capable of it. They’ve done study after study, and it turns out that doing multiple things at once is much less inefficient than doing each thing, finishing it, and then starting the next thing. Your brain can’t do two things at once, so it has to keep switching back and forth between activities. And if you’re reading that and thinking that you’re the exception to the rule—“but serna, I can multitask just fine!”—you should also know that those studies also show another interesting factor: The people being studied always think that they’re being more efficient, when they’re multitasking, even though they’re not.

So after having this conversation on Friday, today I read a post on Coding Horror about The Multi-Tasking Myth. He even had a quote from Joel Spolsky on the subject:

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.
And I can really relate to that quote, because I’ve been doing some programming lately. We want to do something fairly complex at work, and I wanted to build a reference implementation, that the developers could work from. If they got stuck on any particular piece, they could look back at my implementation, and find out how I’d overcome that issue. But I was very inefficient; it took me days to do something that should have been doable in a day, because I’m constantly being interrupted for this or that meeting, or an urgent question. And as a result of that (along with the fact that programming is not a normal part of my job anymore, and I’m out of practice), I wasn’t able to maintain any of those “zillions of things” in my head. (The Jargon File calls this “juggling eggs”.) I’d create a member variable I wanted to use somewhere, and find myself constantly scrolling back and forth, saying, “what did I call that variable?” and then, a few minutes later, “wait, what did I call that variable again?”

I very much want to turn this into a diatribe against BlackBerries, but I won’t. But I want to. So I’d better stop typing now.

1 comments:

Sweep said...

But there is no such thing as a coincidence! It's all providence. (Ah, semantics...)