“That wasn’t so bad…” – but why did we find so many dead-end streets?

March 28, 2013

SEP is having another blog battle, and this week my topic is “That wasn’t so bad”.

Once upon a time, a teammate and myself were tasked with tracking down this gnarly bug. We had little-to-no steps to reproduce this bug, but we had both seen the bug with our own eyes. (And seeing is believing, right?)

Typically, the first step in our plan of action is to write a test. I mean, that’s what all of the cool kids are doing these days with their Test First mumbo jumbo.

That is a great goal. But what do you do when you don’t even know where to write a test?

To answer that question, let me first walk through the decision-making process that we used. (Spoiler, we didn’t know that we used this process, it just happened.)

We were using a process referred to as the OODA loop: Observe, Orient, Decide, Act.

  • We first Observed the bug.
  • We then Oriented ourselves around the bug.
  • Next, we made a Decision to write a test to expose the bug.
  • And finally, we Acted by writing code to pass the failing test.

The missing step that was key…we had not re-focused our orientation, at least, not quick enough. We spent a lot of time creating hypotheses, exploring our new hypotheses, and ultimately finding ourselves on the wrong-side of a dead-end street.

If we had taken a moment to re-orient ourselves, we would have noticed that this bug presented itself in a very specific context. What I mean by “re-orient”, or “re-focus our orientation”, is to observe the bug and understand the context in which the bug is present.

In our case, the bug only occurred if the device was recently factory reset. So every time we observed the bug, the very next time we try to act on the bug, it would not happen again.

Phew – that wasn’t so bad… (except that it was, so bad)

So, the next time that you find yourself taking down your enemy (in this case, the gnarly bug that would show up and then immediately hide again)…remember to perform your OODA loop and increase your bug-squishing abilities!