The Swiss Cheese model, pt. 2
1.
Oh damn, you caught me in the middle of something. I was just trying to make a list of Windows versions for a friend – in Google Docs, of all things.
Should be easy. I already grabbed this one off of Wikipedia and massaged it a bit, but it’s still kinda ugly:
I don’t love the tight padding here. Let me try something bigger, like 0.08 inches? I’ll just select the first column and punch the number in, and…
What the hell!!!
Jesus. What happened? Okay, let’s press ⌘Z to get out of it…
Oh, no. Maybe I can press Esc…
Shit.
2.
Okay, here’s what happened in precise detail:
- I pressed Backspace to delete an existing zero:
- I started to type “.08″. Pressing ”.” was okay, although it showed a pretty thirsty tooltip:
- upon adding “0″ Docs removed the ”.” and so the output was just “0”:
- upon adding “8” Docs removed the leading zero and we ended up at just “8″:
- the page saw the resulting “8″, applied 8 inches of padding (a hundred times of what I wanted!), and just showed it to me in real time, resulting in a profoundly unrecognizable table that looked like something went horribly wrong,
- pressing ⌘Z didn’t do anything.
- pressing Esc only removed the focus from the input field.
I believe I can explain exactly the chain of reasoning and bugs here:
- To start with, any number entered is immediately previewed on the left. This generally feels good!
- Instead of fixing my input on commit (Enter), the input is being rewritten on the fly, as I’m typing. This wouldn’t be my recommendation, but I can this design decision.
- If I typed just “08,” it would be rewritten to “8″. This makes some sense since it normalizes the numbers, and makes them consistent.
- If I typed ”.1″, it would be rewritten to “0.1″. Sure, fine, a similar idea.
- However, typing ”.0″ rewrites it to just “0”. I believe this is a bug or a lack of imagination – it should be rewritten to “0.0″.
- ⌘Z doesn’t work. I believe this is a bug where system’s rewrites of numbers don’t put the change on the undo stack. (As a matter of fact, it appears worse than that – pressing ⌘Z a few more times ended up rewriting my number to “80″, which would have made this even worse!)
So, in effect, my ”.08″ got mangled to “8”, applied immediately, and wasn’t easily undoable.
3.
This feels like a great example of the Swiss cheese model in action:
If just one of these bullet points below behaved differently, I would not end up in this situation:
- with numbers not being rewritten on the fly, there would be no problem,
- with ”.” not be aggressively rewritten to “0.”, there would be no problem,
- without live preview, the rewrite could’ve been caught and fixed it by hand, instead of panicking seeing a huge change on the screen that felt like data loss,
- with a fully functioning input field undo, the moment of panic could be reverted,
- with Esc to abort instead of commit, likewise.
All of these decisions made sense and didn’t feel dangerous or important in isolation. Together, the holes in cheese aligned perfectly, creating a pretty scary experience.
(Thank you to Ezra Spier for sharing this with me.)