Algorithms to Live By: The Computer Science of Human Decisions
Rate it:
Open Preview
Kindle Notes & Highlights
25%
Flag icon
Putting off work on a major project by attending instead to various trivial matters can likewise be seen as “the hastening of subgoal completion”—which is another way of saying that procrastinators are acting (optimally!) to reduce as quickly as possible the number of outstanding tasks on their minds.
25%
Flag icon
It’s not that they have a bad strategy for getting things done; they have a great strategy for the wrong metric.
25%
Flag icon
Live by the metric, die by the metric.
25%
Flag icon
Staying focused not just on getting things done but on getting weighty things done—doing the most important work you can at every moment—sounds like a surefire cure for procrastination. But as it turns out, even that is not enough. And a group of computer scheduling experts would encounter this lesson in the most dramatic way imaginable: on the surface of Mars, with the whole world watching.
25%
Flag icon
Priority inheritance. If
25%
Flag icon
The moral here is that a love of getting things done isn’t enough to avoid scheduling pitfalls, and neither is a love of getting important things done. A commitment to fastidiously doing the most important thing you can, if pursued in a head-down, myopic fashion, can lead to what looks for all the world like procrastination. As with a car spinning its tires, the very desire to make immediate progress is how one gets stuck. “Things which matter most must never be at the mercy of things which matter least,” Goethe allegedly proclaimed; but while that has the ring of wisdom about it, sometimes ...more
26%
Flag icon
Moore’s Algorithm minimizes the number of late tasks (or rotten fruits) when they’re all of equal value
26%
Flag icon
In other words, most scheduling problems admit no ready solution.
26%
Flag icon
If trying to perfectly manage your calendar feels overwhelming, maybe that’s because it actually is.
26%
Flag icon
The best time to plant a tree is twenty years ago. The second best time is now. —PROVERB
26%
Flag icon
But they return to having efficient solutions once preemption is allowed.
26%
Flag icon
In both cases, the classic strategies—Earliest Due Date and Shortest Processing Time, respectively—remain the best, with a fairly straightforward modification.
26%
Flag icon
It turns out, though, that even if you don’t know when tasks will begin, Earliest Due Date and Shortest Processing Time are still optimal strategies, able to guarantee you (on average) the best possible performance in the face of uncertainty.
26%
Flag icon
This algorithm is the closest thing that scheduling theory has to a skeleton key or Swiss Army knife, the optimal strategy not just for one flavor of problem but for many.
26%
Flag icon
When the future is foggy, it turns out you don’t need a calendar—just a to-do list.
26%
Flag icon
Programmers don’t talk because they must not be interrupted.… To synchronize with other people (or their representation in telephones, buzzers and doorbells) can only mean interrupting the thought train. Interruptions mean certain bugs. You must not get off the train. —ELLEN ULLMAN
27%
Flag icon
Second, preemption isn’t free. Every time you switch tasks, you pay a price, known in computer science as a context switch.
27%
Flag icon
Every context switch is wasted time.
27%
Flag icon
Personally, we have found that both programming and writing require keeping in mind the state of the entire system, and thus carry inordinately large context-switching costs.
27%
Flag icon
where it takes a while just to heat up the metal before it’s malleable.
27%
Flag icon
He finds it somewhat useless to block out anything less than ninety minutes for writing, as nothing much happens in the first half hour except loading a giant block of “Now, where was I?” into his head. Scheduling
27%
Flag icon
“If it’s less than an hour I’ll just do errands instead, because it’ll take me the first thirty-five minutes to really figure out what I want to do ...
This highlight has been truncated due to consecutive passage length restrictions.
27%
Flag icon
overhead
Yuan
Warm up?
27%
Flag icon
time lost to metawork, to the logistics of bookkeeping and task management.
27%
Flag icon
And the more you take on, the more overhead there is. At its nightmarish extreme, this turns into a...
This highlight has been truncated due to consecutive passage length restrictions.
27%
Flag icon
“shows up as you add more jobs to the multiprogramming mix. At some point you pass a critical threshold—unpredictable exactly where it is, but you’ll know it when you get there—and all of a sudden the system seems to die.”
27%
Flag icon
He doesn’t drop that ball; he drops everything. The whole system, quite literally, goes down.
27%
Flag icon
when you context switch you pretty much invalidate all caches. And that hurts.”
27%
Flag icon
This is thrashing: a system running full-tilt and accomplishing nothing at all. Denning
27%
Flag icon
term “thrashing” to refer to pretty much any situation where the system grinds to a halt because it’s entirely preoccupied with metawork.
27%
Flag icon
Thrashing is a very recognizable human state. If you’ve ever had a moment where you wanted to stop doing everything just to have the chance to write down everything you were supposed to be doing, but couldn’t spare the time, you’ve thrashed.
27%
Flag icon
When merely remembering everything we need to be doing occupies our full attention—or prioritizing every task consumes all the time we had to do them—or our train of thought is continually interrupted before those thoughts can translate to action—it feels like panic, like paralysis by way of hyperactivity. It’s thrashing, and computers know it well.
27%
Flag icon
If you’ve ever wrestled with a system in a state of thrashing—and if you’ve ever been in such a state—then you might be curious about the computer science of getting out.
27%
Flag icon
Another way to avert thrashing before it starts is to learn the art of saying no.
27%
Flag icon
This prevents thrashing in machines, and is sensible advice for anyone with a full plate.
27%
Flag icon
In these cases there’s clearly no way to work any harder, but you can work … dumber.
27%
Flag icon
Faced with, say, an overflowing inbox of n messages, we know from sorting theory that repeatedly scanning it for the most important one to answer next will take O(n2) operations—n scans of n messages apiece.
28%
Flag icon
What’s more, scanning through those emails means swapping every message into your mind, one after another, before you respond to any of them: a surefire recipe for memory thrashing.
28%
Flag icon
In a thrashing state, you’re making essentially no progress, so even doing tasks in the wrong order is better than doing nothing at all. Instead of answering the most important emails first—which requires an assessment of the whole picture that may take longer than the work itself—maybe you should sidestep that quadratic-time quicksand by just answering the emails in random order, or in whatever order they happen to appear on-screen.
28%
Flag icon
Part of what makes real-time scheduling so complex and interesting is that it is fundamentally a negotiation between two principles that aren’t fully compatible. These two principles are called responsiveness and throughput: how quickly you can respond to things, and how much you can get done overall.
28%
Flag icon
It’s part of the reason there are people whose job it is to answer the phone: they are responsive so that others may have throughput.
28%
Flag icon
Again, life is harder when—like a computer—you must make the responsiveness/throughput tradeoff yourself. And the best strategy for getting things done
28%
Flag icon
The culprit is the hard responsiveness guarantee.
28%
Flag icon
So modern operating systems in fact set a minimum length for their slices and will refuse to subdivide the period any more finely. (In Linux, for instance, this minimum useful slice turns out to be about three-quarters of a millisecond, but in humans it might realistically be at least several minutes.)
28%
Flag icon
It’s also a principle that is easy to translate into a recommendation for human lives. Methods such as “timeboxing” or “pomodoros,” where you literally set a kitchen timer and commit to doing a single task until it runs out, are one embodiment of this idea.
28%
Flag icon
But that’s not the end of the story; higher throughput, after all, also means lower responsiveness.
28%
Flag icon
your system spends as much time as it possibly can away from interacting with you, then gets around to redrawing the mouse just in time.
28%
Flag icon
The moral is that you should try to stay on a single task as long as possible without decreasing your responsiveness below the minimum acceptable limit. Decide how responsive you need to be—and then, if you want to get things done, be no more responsive than that.
28%
Flag icon
“interrupt coalescing.” If you have five credit card bills, for instance, don’t pay them as they arrive; take care of them all in one go when the fifth bill comes.
28%
Flag icon
Likewise, if none of your email correspondents require you to respond in less than twenty-four hours, you can limit yourself to checking your messages once a day.