Reports · Design

A row that could only ever say zero

A report we shipped had a line for the kiosk that was structurally incapable of showing anything but nought. The fault was mixing two different questions into one list — and it is a common one.


We shipped a suggestions report with four rows on it. One of them — the kiosk — could never show anything but zero. Not "had not yet". Could not.

The fault took an hour to appear and is worth describing, because the shape of it turns up everywhere.

Two questions wearing the same coat

Three of those rows answered where on the screen a suggestion was taken: the add-on row above the menu, the rail in the basket, the blocks inside an item. The fourth answered which device the guest was standing at.

Those are different questions. A guest at a kiosk who taps the add-on row has used the add-on row — on a kiosk. Every line the kiosk ever won was correctly filed under one of the first three, so the fourth row sat there reading nought for ever, and the operator reading it would reasonably conclude their kiosk was not earning.

A constant is worse than nothing

A number somebody watches that cannot change is not a neutral piece of furniture. It is misinformation with a plausible face. Nought looks exactly like a real measurement of a screen that is not working, and there was no way for a reader to tell the two apart.

The fix was not to make the kiosk row work. It was to stop asking two questions in one list. The three surfaces stayed as they were, and the device question moved to where it already had an answer — the channel each order was placed on, which the system has recorded all along. The report now has a separate table for it, drawn only when a venue actually trades on more than one channel, because a venue with one channel does not need a table to be told so.

The rule that stops it coming back

The obvious guard is a test asserting the list has three entries. That is a count, and a count is not a rule — the next person with a good reason adds a fourth and edits the number.

The guard we wrote reads the ordering page's own source and asserts that every surface the report draws is a word the ordering page actually stamps onto a line. A row nothing can fill now fails the build with a name, and it fails for the actual reason rather than for being the wrong length.


Try it on tonight’s service.

Nothing to install, no card. Not better by the weekend? Close the tab.