Fail, fast

Adapted from an internal p2 post.

Fail-fast is a systems design approach that intentionally fails early and visibly. The gist is that it is better for users as well as better for developers to halt a system if it finds itself in a “critical enough” situation.

Wait, What, Why?

There are worse things than a crash.

Mike Stall (via Jeff Atwood) sketched an “app health hierarchy” which looks thusly:

1) Application works as expected and never crashes.
2) Application crashes due to rare bugs that nobody notices or cares about.
3) Application crashes due to a commonly encountered bug.
4) Application deadlocks and stops responding due to a common bug.
5) Application crashes long after the original bug.
6) Application causes data loss and/or corruption.

Complex systems can reduce their exposure to the darkest parts of that hierarchy in failing fast. Users are immediately presented truth rather than sometime later discovering their actions didn’t take. Developers get immediate, direct feedback in critical scenarios that points directly toward the root cause.

And, perhaps most importantly, halting in the right places prevents on-going corruption, which is what keeps me up at night as a software developer.

We can’t just BSOD our users!

Yes and no.

Yes, we can, if the situation is that critical and we know of no way to recover.

No, we can’t, on anything less than that.

Fail-fast requires (team) wisdom in implementation. Each situation must be considered in its own context. Tricky, at times, but in my experience the effort is very much worth it.


Do not go gentle into that good night,
Old age should burn and rage at close of day;
Rage, rage against the dying of the light.

Dylan Thomas, “Do not go gentle into that good night” (opening stanza)

Switched to Colemak

We have over 20 alternative layout keyboardists at Automattic circa this post, including one rather well known one. For three years, I resisted their proselytizing as I calculated the cost/benefit ratio to be against switching:

  • We live in a QWERTY world. I didn’t like the idea of being “that guy” when I sat down in front of someone else’s computer.
  • I didn’t want the hassle of radically shifted keyboard shortcuts.
  • I thought it generally over optimizing (for most people). Sixty or seventy words per minute seemed fine to me as it ought to keep pace well enough with most mental threads.

I ended up changing my mind because:

  • It’s not about the (potential) speed. I work at a keyboard the majority of my waking hours. My chances of eventual RSI are high and QWERTY doesn’t help. I’ve finally gotten through my thick head that the main benefit of an alternative layout is comfort and hopefully injury prevention.
  • The advent of the BYOD trend has made the “QWERTY world” problem less of an issue.
  • The Colemak layout leaves the main QWERTY shortcuts intact.

Most of my coworkers switched to Dvorak. I’ve switched to Colemak as I think it to be a tad more efficient. The important takeaway, IMO, is to get off QWERTY as either should be leaps better on your wrists over time.

If you are intrigued, join me in making a Colemak switch! You can grab the purdy-fied Colemak printout you see above from my coworker Matt Wiebe‘s site as a PDF.

Yes, I did type this post up in Colemak. As I’m only a couple days in, it took me, erm, awhile.