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.
回到電子郵件的例子, 堅持一定要先處理最重要的信, 可能會造成大潰敗。 一起床看到收件夾中的 信件比平常滿三倍, 可能要用九倍時間去清理。 如果你以時間先後來回覆, 或甚至隨機回覆,可能都更好! 另人驚訝的是,有時不要 依完美的順序來做事, 反而是把事做完的關鍵。
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.
電腦是這樣,我們做事也一樣。 也許採用類似的方法, 可能可以讓我們的使用者 重新取得我們的注意力, 讓我們能夠取回在現代生活當中 非常稀有的東西之一:休息。