Skip to main content

Unknown is not zero

StorM1 min readBYTHECLOUD ENT

The shop engine does not guess: in four places an unreadable amount stays unknown, a total with an unknown part is marked incomplete, an unknown gift stock gives no gift, and an unexpected delivery is listed as such.

The rule

In a shop system the costly mistakes are quiet ones: a missing amount becomes zero, a missing stock count becomes plenty, and nothing complains. The engine follows one rule against that in the places below: it does not guess. An amount it cannot read stays unknown, a total with an unknown part is marked incomplete instead of passing as whole, a gift whose stock is unknown is not given, and an item that arrives without being ordered is listed as such. These are rules the engine's functions follow, so anything that calls them gets the same behaviour.

Where it shows

  • Shift history: a closed shift with no stored report is listed as not reported. Past reports are shown exactly as stored and never recalculated, so the numbers of that day stay as they were. A read that reaches its limit says it was cut, instead of passing as the whole list.
  • Discount reports: a discount whose amount cannot be read, or whose line discounts do not add up to the sale, goes to a separate unknown list, and the report marks itself incomplete.
  • Gifts: when the stock of a gift is not known, the gift is not given.
  • Receiving: an item that arrives without being on the purchase order is listed as unexpected. It is neither added to the order nor dropped.

What it costs

A report that lists an unknown looks less clean than one that shows a number. That is the price, and it is deliberate: a number in a report can be taken as read, and an unknown is a task someone can finish.

Published with BWS

More from Research

  1. StorMCard terminals: the rules for pairing and revokingThe rules the shop engine follows when a card terminal is registered, paired and revoked, and for sales that were still waiting on a terminal when it was revoked.
  2. StorMEvery date follows the shop's clockHow the shop layer of StorM Web Engine reads dates and times, and how each release is checked against the business clock instead of the server's or the visitor's.
  3. StorMStorM Web Engine: what loads up frontCompressed size of the code StorM Web Engine loads up front, as a site ships it, and the budget it is held to.