Separating a Computation from Presentation
A computation can expose results as stable values so presentation can format those values for different readers.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Trace two outputs
A measurement result in seconds can be displayed as 1.5 s on a dashboard and exported as a numeric 1.5 plus a unit field. They share one result. Representing units keeps the common value interpretable.
Test both promises separately
Verify the computation with an independent expected value, then test the selected spelling or formatting at the display boundary. Returning versus printing illustrates why shared computation can stay reusable.[1]