started · updated
Concrete cost calculator developer implements automated testing for price accuracy
A developer of a concrete cost calculator has implemented a technical rule to prevent outdated pricing information from appearing in written articles. Because the tool uses monthly refreshing data—including the US Producer Price Index for ready-mix concrete—hand-typed dollar amounts in prose often become inaccurate shortly after publication.
To solve this, the developer created a test using a regular expression to scan all prose files. The test automatically fails if a dollar sign is followed by a digit, effectively banning manual price entries in sentences. This ensures that all financial figures are pulled directly from the same code used by the calculator and charts, preventing contradictions between data tables and written descriptions.