Skip to content
All notes

The guide everyone was scared of was 39 lines of JavaScript

Note 4 of 12
  • #rebuild
  • #measurement

The interactive guide was assumed to be the hard migration. Measured, it was trivial. The real cost was 13,000 lines of bespoke HTML nobody had counted.

One of the legacy guides is interactive. It has controls, it updates on the page, it does something rather than just sitting there. Every conversation about the migration treated it as the hard one, the one that would need a framework, the one to leave until last.

I opened it and counted. 39 lines of JavaScript. A couple of event listeners and some DOM updates. It would port in an afternoon.

Meanwhile the guides nobody worried about, the ones that are “just prose”, came to roughly 13,000 lines of hand-written HTML across the set. Bespoke section markup, one-off table structures, inline styles, tags opened in one place and closed several screens later. That is the actual migration cost, and it was invisible because nobody had ever run a line count over it. It does not look like work. It looks like text.

The mistake has a shape worth naming. I was estimating difficulty by how a thing feels to use. Interactive feels hard, static feels easy. But migration cost tracks how much bespoke structure a page carries, and that has almost nothing to do with whether it moves.

Two wc -l commands would have reordered the entire plan. I ran them a month later than I should have.

I now try to make estimating cheap enough that there is no excuse to skip it. Not a full audit. A count. If you are about to sequence work by intuition, spend 5 minutes producing one number per item first, and then look at whether your intuition survives the table.

Mine did not.

Back to all 12 notes