Engineering essay · Systems engineering
Designing financial integrity into everyday software
When somebody records a wrong quantity of feed, the natural expectation is that they should be able to correct it. What looks like a simple edit on the screen can have consequences for inventory, the cost of raising a flock and the accuracy of the farm's records.
What should happen to the original record when we correct it? I think the answer depends on whether we are dealing with an editable description or an operation that has already affected other parts of the system.
Do not confuse a corrected record with a changed past
Suppose a farm uses feed from two purchases made at different prices. A consumption record may deduct from both lots. If the quantity was wrong, adding stock back without knowing which lots it came from can distort the valuation. The quantity may look right while the cost is wrong.
In PoultryPoint, the approach is to preserve the relationship between the original operation and its effects, and compensate the relevant effects when a legitimate correction is made. The correction is not permission to invent a new history.
Decide what must remain true
Before choosing an implementation, it helps to state the properties that must survive it. The inventory movements must remain traceable. Costs must be allocated to the intended destination. A failed operation should not leave only half of its required changes behind.
Those properties give us a way to test more than whether a form submits successfully. They also help distinguish a convenient interface from a reliable underlying system.
For me, this is one of the important responsibilities of building operational software: simplify the user's experience without pretending the complexity of their records has disappeared.