MongoDB’s WiredTiger uses lock-free algorithms in its B+tree to let many threads read and write without heavy locking. This uses hazard pointers for reads and lock-free skip lists for writes. The result is much higher throughput—about 50% faster reads and up to 4x faster updates in tests.
-
System boundaries: the focus of design #
, 3 highlightsA big part of software design is the design of the abstractions themselves, of course. But equally important at a high-level are dependencies.
The single most important thing about any module is what modules it does not depend upon. It’s one of the most effective decoupling tools possible, to not even allow one module to reference another.
But then we see a response from overzealous use in the wild: “boolean parameters on functions are a code smell!”
-
The one ring problem: abstraction and our quest for power #
, 2 highlightsYou cannot make an abstraction more powerful without sacrificing some properties that you used to know about it. Necessarily. You cannot require a new property be true about an abstraction without sacrificing some of its power and flexibility. Always.
The most important point is simply to recognize properties as being a valid (and arguably most important) part of abstraction design.
-
Timing It Right #
, 2 highlightsLike a lot of people I know, I tend to cluster my work into three distinct sections, neatly organized around different cognitive enhancers: morning espresso, late afternoon tea, and a shorter session after dinner, usually with a glass of wine in hand. I generally organize my day so that I have nothing to do during the postprandial slump of the early afternoon; I’ll read a little, take a quick nap sometimes, work out. (Though I should admit my exercise regime is more cherry tomato than the full Pomodoro—I’m more of a seven-minute-abs kind of guy.) I also try to focus on different kinds of tasks, depending on the time of day. I save challenging creative work for the morning; busy work for the afternoon; and leave the evening free for more playful riffing.
I suspect that most of us have distinct cognitive rhythms tied into the circadian cycle; the trick is figuring out what yours is, and organizing your workflow around its idiosyncracies.
-
Gears vs Behavior #
, 2 highlightsThat’s the key feature of gears-level models: they make falsifiable predictions about the internals of a system, separate from the externally-visible behavior.
All that said, if we have abundant data and aren’t worried about distribution shifts or system changes, non-gears models can still give us great predictive power.
-
A Few Notes on the Culture #
, 1 highlightLet me state here a personal conviction that appears, right now, to be profoundly unfashionable; which is that a planned economy can be more productive - and more morally desirable - than one left to market forces.