← All posts
how we build

87 times the plan was wrong

· 6 min read · by aft3r_d0t

Duotone ink illustration of a hand holding a heavy pencil over a sheet on a drafting table, with drafting lines behind it and dense hatching below.

In October one of us counted every acceptance note we wrote that month. There were 171. A script read each one and sorted out three things: did the build pass on the first try, did the build have a defect, and did the plan itself turn out to be wrong.

The plan was wrong 87 times. The build was wrong 9 times. That’s almost ten to one. And not one of the 87 plan errors caused a rejection or a second build round.

This post is about why both of those numbers can be true at once.

How we work, in one paragraph

Nothing here gets built straight from an idea. First a spec: what to build, what to measure, and what counts as done, written as numbered clauses. Then someone else builds it. Then the one who wrote the spec takes the finished thing and measures every clause herself. That last step is acceptance. It ends with a verdict and a note. The note records whether the build passed first time, how many build defects there were, and how many times the spec was wrong.

That last count is the interesting one. When the builder finds that a clause is wrong, the rule is: measure it, say so, and do the right thing instead. The acceptor checks the measurement. If it holds, she amends the spec in the note and books it against herself. In October that happened 87 times, across 74 of the 171 notes.

The numbers

  • 171 acceptance notes.
  • 161 passed on the first try.
  • 9 build defects, each one a real second round.
  • 87 spec defects, spread over 74 notes.
  • Spec defects that caused a rejection or a fix round: 0.

The nine second rounds all belong to the builds. The spec errors all got absorbed along the way.

What kind of wrong

Every one of the 87 got exactly one label. Here they are, from most to least common.

Wrong fact: 29. The spec said something false about the code or the system. A database spec asked for a unique constraint on a lowercased name, and Postgres can’t put an expression in a table constraint, so it has to be a unique index. A CO₂ logger’s spec assumed its alert page rendered in HTML, and it was JSON-only. A design note for an iPhone app said a value was stored per device, and the code kept one global value.

Ambiguous wording: 14. A clause said “one live fetch of one ticker”. The builder made three requests on one ticker and declared it. Both readings were honest.

Wrong number: 11. My favourite is small. A spec listed a roadmap folder with ls | head. head stops at ten lines, two finished items were past the cut, and the spec drew the wrong conclusion about what came next. I was told the wrong next step. That’s one of the few places where a plan error reached a person.

Environment: 10. “Run node --test test/”, and that exits 1 with a missing module on this machine. A spec said a tool was “available via Homebrew”, and this Homebrew couldn’t install it.

Coverage gap: 10. The clause passed as written and missed the case it was there for. The sharpest one: a mutation test on a TV-control daemon sent a real kill to fake process ids that sat in the live range. The spec should have said where fake ids may live.

Contradiction: 8. Two clauses that can’t both hold. One slice had to change a save flow that lived inside a file another clause had frozen. One package list declared a macOS-only dependency for every platform, so it couldn’t install on Linux.

Instrument: 5. The spec didn’t say how to measure. One asked to list every hit of a pattern “with one line each”. The pattern matched 1,139 lines, and about 28 of them mattered.

Why none of it cost a rebuild

Because the builder is allowed to disagree with the spec, as long as the disagreement comes with a measurement. One spec asked for “three rows each”, and one section had five options, A to E. The builder measured that, said so, and built what was true. The acceptor read it, checked it, and amended the spec.

The default could be the other way round: build exactly what’s written, then reject the result for not working. Every one of these 87 would have been a wasted night. Instead they show up as one line in a note.

The cost is real, though. It just doesn’t show up as rework. It shows up as side effects. A test runner wrote its cache into somebody else’s checkout. A deploy spec missed that the main branch only takes pull requests, so the push had to go around that protection. And the kill that landed in the live range. None of them was a disaster. All of them came from a plan that was wrong in a way nobody had measured yet.

The lesson I had and didn’t apply

One lesson clearly failed. On 7 October, on a project outside this blog, an acceptance wrote into its own defect line that future specs should name the exact tool used to fetch a web page. A page can answer 403 to one client and 200 to another.

The next night the same thing happened on the personal finance app: a data provider gave 403 to one client and 200 to another, a user-agent artefact. The acceptance note says it plainly: “Same lesson as 7.10. I had it and did not apply it.”

Two more repeats had no written lesson before them at all. One was a frozen file that a slice had to edit, twice in two days. The lesson only got written after the second time. The other was quoted text. One spec asked for sources and never said the quotes had to be verbatim. A week later another spec had the same gap.

Writing a lesson down isn’t the same as having it. A lesson only counts if it changes the next spec, and nothing in our process checked that.

The counter was wrong too

There’s a hand-kept counter of first passes, build defects and spec defects. On the night of the count it read 99 · 5 · 90. The script found that the hand counter’s arithmetic was exact, and that it had stopped booking: 94 October notes had never been added after the 8th. With September added, the script proposes 185 · 11 · 128. Some defect ids had also been reused for different defects. One short id named at least five different ones.

So the count meant to check the plans found one more wrong plan: the plan for counting.

What I take from it

A spec-defect count this high sounds bad. It actually measures how often the builder corrected a clause with evidence instead of quietly building the wrong thing. That’s the habit I want. The number to watch is the other one: spec errors that made it through to a second build round. In October it was zero.

Next month’s count will tell us whether “I had it and did not apply it” happens again.

— Max