Concentration is important! Long periods of uninterrupted focus are crucial to getting some things done. Writing code, for instance, or documentation, or composing some detailed email about how to solve parking problems. But sometimes, if you were to concentrate on just one thing at a time, you'd spend a lot of time waiting, and waiting, and waiting.
For instance, compiling a piece of software, or even refreshing your local checkout of your project's version control system. Talking via instant messenger with someone can also qualify; while chatting is one thing, sometimes IM is used for serious work-related discussions, and you need to frequently make sure you're keeping up with your part of the discussion. Polling your inbox can also qualify, especially if you're waiting for an important email (such as a response to a network ticket you've filed, or the day's lunch menu).
The key to successful multitasking is getting as much state out of your brain and into the computer. Front-load the thinking and decision making, and then spread yourself as thin as possible across multiple tasks. The goal is that, given some pile of tasks, you quickly dispatch the next step in each one as soon as it is ready.
Another key is to be able to quickly recover state if you've lost it. Sometimes, power outages happen, or you have to go home, or your network filer decides it really, really needs to stop talking to the network for a while. Good multitasking hygiene means it is as easy as possible to pick up where you left off, be it five minutes or five days later.
For me, one of the most common multitasking challenges is waiting for various programs to finish. Sometimes I'm working on some code that needs compiling (usually C++). Compiling can take a while. Instead of sitting there and waiting for my terminal to finish the compile, I switch to another desktop. Likewise, when running some tool that talks to other services over the network, there can be a delay. Don't just sit there waiting, go find another desktop and work from there.
Assuming you have a few different desktops with various tasks running on them, though, you sometimes can lose track. There are a few strategies for dealing with this. One is to graze across your desktop and windows, looking for completed tasks. I used to do this a lot, but it is easy to forget desktops. Lately I've been using xosd to pop-up unobtrusive onscreen messages when programs complete. This is nice in that it gets my attention without being too obnoxious.
I actually extended that idea into a little script that continuously polls /proc for known long-running processes (make, version control checkouts, etc). When it sees one live over a few seconds, it will automatically send an onscreen display when it completes. I'll probably teach it to do the opposite -- send a message when something has taken too long (such as leaving a vi editing a version control checkin message for days instead of the checkin finishing... oops!).
Recovering state and being able to resume what you're working on is very important, too. Phones ring, coworkers drop by, and all sorts of other undeferrable interrupts occur during the day, some of which may pull you away for hours. The unix tool screen can help resume long-running jobs from different locations, which helps for some activities (long-running scripts you want to go home while they run, for instance). Also, taking notes of things to get back to, even if it is just a few minutes away, helps quite a bit (I permanently keep my todo file open, but I'm a luddite; software organizers and such work, too. The key is that you be incented to use it often and have no overhead in using it, which rules out things like PDAs).
Multitasking ends up being like juggling. You really are in contact with each ball (task) for a fraction of a second, but that fraction is enough to keep it in motion for much longer and until it needs your attention again.
Wednesday, April 26, 2006
Tuesday, April 25, 2006
How I Concentrate
Jeremy asks if people can concentrate. I find this an interesting question and something I've been thinking quite a bit about lately. My job involves a lot of interruptions, usually related to urgent issues (helping someone keep a system online) or URGENT issues (getting a system back online). Pretty much everything falls into two buckets: "now" and "soon." I'm always interested in staying productive.
This works if tasks are short-lived, fire-and-forget, such as quickly fixing a script or responding to an email. More often, though, things aren't so quickly resolved; that script may need to be tested thoroughly or that quick response turns into a long, drawn-out thread. Add onto this long term projects which need to be done, but don't qualify as an urgent task, and things get hairy very quickly.
So, I concentrate by accepting the interrupts and minimizing their impact. I keep a todo file of "today," "this week," and "sooner or later." Every day I check the "today" list and possibly migrate things back and forth in the list. I try to get through the "today" list, well, today, but usually I don't. That's okay -- better to aim high and miss than always shoot at the easy targets :)
Whenever an interrupt occurs and I'm doing something else, it goes on the list. Like a stack, push, pop, push push push, pop push pop pop pop. This more or less works, with the goal being if something isn't so urgent as to need immediate attention then it can wait until my next planned context switch, at which time I reschedule what to do next (gee, sounds like a computer... I guess I'm a bit digital sometimes).
Interrupts aside, here are some other things I do to concentrate:
The key is to minimize the external distractions as much as possible, drown out your surroundings (I'm disturbed how much code I've written to Lords of Acid over the years... ahem), and to develop good work habits that prevent, say, that quick check of email (which, suddenly, you see an awesome thread on some inane detail not actually job-related that you simply must respond to, oh, and there's an IM about some interesting gossip, oh, and the people outside your office are commenting on the whiteboard project you're working on, oh, and ...).
Sometimes, though, you have to multitask. I'll blog next how I deal with things where I simply have to stop and find something else to do (such as waiting on a long build). In a way, it's the opposite of concentrating; intentionally losing focus but organizing your approach such that the cost is minimal and getting back onto the task at hand is easy.
This works if tasks are short-lived, fire-and-forget, such as quickly fixing a script or responding to an email. More often, though, things aren't so quickly resolved; that script may need to be tested thoroughly or that quick response turns into a long, drawn-out thread. Add onto this long term projects which need to be done, but don't qualify as an urgent task, and things get hairy very quickly.
So, I concentrate by accepting the interrupts and minimizing their impact. I keep a todo file of "today," "this week," and "sooner or later." Every day I check the "today" list and possibly migrate things back and forth in the list. I try to get through the "today" list, well, today, but usually I don't. That's okay -- better to aim high and miss than always shoot at the easy targets :)
Whenever an interrupt occurs and I'm doing something else, it goes on the list. Like a stack, push, pop, push push push, pop push pop pop pop. This more or less works, with the goal being if something isn't so urgent as to need immediate attention then it can wait until my next planned context switch, at which time I reschedule what to do next (gee, sounds like a computer... I guess I'm a bit digital sometimes).
Interrupts aside, here are some other things I do to concentrate:
- Close my email client - or at least put it on another desktop
- Ditto with instant messenging
- Put headphones on and play familiar music (for me, a good beat helps)
- Shut my office door
- Work a half or full day from home
- Schedule fake all-day meetings to keep other meetings from popping up
- Read the excellent Time Management for System Administrators, though I'm not a sysadmin
- Tell people to get out of your office so you can get work done (this seems rude at first, but when you then get something done they wanted done, they quickly start being happy when you tell them to buzz off!)
- Only read RSS feeds at home, not at work
The key is to minimize the external distractions as much as possible, drown out your surroundings (I'm disturbed how much code I've written to Lords of Acid over the years... ahem), and to develop good work habits that prevent, say, that quick check of email (which, suddenly, you see an awesome thread on some inane detail not actually job-related that you simply must respond to, oh, and there's an IM about some interesting gossip, oh, and the people outside your office are commenting on the whiteboard project you're working on, oh, and ...).
Sometimes, though, you have to multitask. I'll blog next how I deal with things where I simply have to stop and find something else to do (such as waiting on a long build). In a way, it's the opposite of concentrating; intentionally losing focus but organizing your approach such that the cost is minimal and getting back onto the task at hand is easy.
Subscribe to:
Posts (Atom)