In the summer of 1997, NASA's Pathfinder spacecraft landed on the surface of Mars, and began transmitting incredible, iconic images back to Earth. But several days in, something went terribly wrong. The transmissions stopped. Pathfinder was, in effect, procrastinating: keeping itself fully occupied but failing to do its most important work.
在1997年的夏天, 美国航天局探索者飞船降落 在火星表面, 向地球传输令人惊叹不已的, 标志性的图像。 但是几天后, 出现了一些严重的问题。 传输停止了。 探索者出现了拖延现象: 虽然排满了工作, 但没做最重要的任务。
What was going on? There was a bug, it turned out, in its scheduler.
这是怎么回事? 原来在时刻表中 有一个程序错误。
Every operating system has something called the scheduler that tells the CPU how long to work on each task before switching, and what to switch to. Done right, computers move so fluidly between their various responsibilities, they give the illusion of doing everything simultaneously. But we all know what happens when things go wrong.
每一个操作系统 都有一个时刻表 中央处理器转换前 通知处理时间段 以及切换到哪个任务。 若处理得当,电脑会在 不同任务间切换自如, 因此会给人一种它在同时处理 所有事物的幻觉。 但是我们都知道如果操作不当 会导致什么后果。
This should give us, if nothing else, some measure of consolation. Even computers get overwhelmed sometimes.
如果别无其他, 这至少能给我们稍许安慰。 即便是电脑,有时也会崩溃。
Maybe learning about the computer science of scheduling can give us some ideas about our own human struggles with time.
也许学习关于电脑科学的 任务规划 能给我们人类如何处理棘手的 时间问题带来一些启发。
One of the first insights is that all the time you spend prioritizing your work is time you aren't spending doing it. For instance, let's say when you check your inbox, you scan all the messages, choosing which is the most important. Once you've dealt with that one, you repeat. Seems sensible, but there's a problem here.
第一:我们花在给事情做 优先级排序的时间 意味着我们一件具体的 事情都没做。 例如,当你查看收件箱 你会浏览所有的信息, 选出最重要的。 一旦你处理完一个, 你重复相同的动作。 看上去非常合理, 但是存在一个问题。
This is what's known as a quadratic-time algorithm. With an inbox that's twice as full, these passes will take twice as long and you'll need to do twice as many of them! This means four times the work.
这就是计算机学科里著名的 二次时间算法。 当一个收件箱有两倍之多, 它们需要两倍时间长来运行 你需要花两倍时间来处理! 这意味着工作量翻了四倍。
The programmers of the operating system Linux encountered a similar problem in 2003. Linux would rank every single one of its tasks in order of importance, and sometimes spent more time ranking tasks than doing them. The programmers’ counterintuitive solution was to replace this full ranking with a limited number of priority “buckets.” The system was less precise about what to do next but more than made up for it by spending more time making progress.
操作系统Linux的程序员们 在2003年遇到了类似的问题。 Linux会根据每个任务的 重要性来进行排序, 有时会花费更长的时间来 排序而不是做事。 程序员反直觉的做法是 取代完整排名 用有限数量的优先“桶”。 这个系统会降低下一步 做什么的准确性 但是却花了更多的时间 来完成任务。
So with your emails, insisting on always doing the very most important thing first could lead to a meltdown. Waking up to an inbox three times fuller than normal could take nine times longer to clear. You’d be better off replying in chronological order, or even at random! Surprisingly, sometimes giving up on doing things in the perfect order may be the key to getting them done.
因此关于你的邮件, 总是坚持先完成最重要的 会导致崩溃。 打开一个比平常多3倍的收件箱 会花费长达九倍的时间来处理。 你最好按时间顺序来回复, 或者甚至随机回复! 令人惊讶的是,有时放弃 用完美的顺序来执行任务 也许才是把事情完成的关键。
Another insight that emerges from computer scheduling has to do with one of the most prevalent features of modern life: interruptions.
另一点出现在电脑排序时 生活中最常见的问题之一: 各种干扰。
When a computer goes from one task to another, it has to do what's called a context switch, bookmarking its place in one task, moving old data out of its memory and new data in. Each of these actions comes at a cost.
当电脑从一个任务进行到 另一个任务时, 它需要执行称为 上下文切换的任务, 给每一个任务标一个书签, 将内存中之前的数据移出, 导入新的数据。 每一次这样的行为 都会产生代价。
The insight here is that there’s a fundamental tradeoff between productivity and responsiveness. Getting serious work done means minimizing context switches. But being responsive means reacting anytime something comes up. These two principles are fundamentally in tension.
此处有一个重要的 权衡问题存在于 生产效率和反应能力之间。 完成重要任务意味着要 减少上下文切换。 但是反应迅速则意味着 对随时发生的任务进行反馈。 这两个原则孰轻孰重 令人难以取舍。
Recognizing this tension allows us to decide where we want to strike that balance.
意识到这个 取舍难题让我们 决定在哪取得 这样的平衡。
The obvious solution is to minimize interruptions. The less obvious one is to group them. If no notification or email requires a response more urgently than once an hour, say, then that’s exactly how often you should check them. No more.
显而易见的解决方式 就是减少各类干扰。 退而其次的方式是分组。 如果一小时内 没有推送通知 或者需要回复的邮件, 这是通常你查看它们的频次。 不会更多了。
In computer science, this idea goes by the name of interrupt coalescing. Rather than dealing with things as they come up – Oh, the mouse was moved? A key was pressed? More of that file downloaded? – the system groups these interruptions together based on how long they can afford to wait.
在电脑科学中,这个概念被 命名为中断合并。 与其处理随时出现的事情 喔,鼠标动了? 摁了个键? 下载更多的文件? 系统分组会将这些 干扰问题放在一起 根据它们能等多久。
In 2013, interrupt coalescing triggered a massive improvement in laptop battery life. This is because deferring interruptions lets a system check everything at once, then quickly re-enter a low-power state.
在2013年,中断合并 极大地延长了 笔记本电池的寿命。 这是因为推迟处理干扰 可以让系统一次性检查完毕, 然后快速重新进入 低电量模式。
As with computers, so it is with us. Perhaps adopting a similar approach might allow us users to reclaim our own attention, and give us back one of the things that feels so rare in modern life: rest.
不仅电脑如此, 我们也是。 也许采用一个相似的方式 能让我们用户重新集中注意力, 以及给我们当代生活中 极为珍贵的一个回馈:休息。