4 ms·
Embarrassing story from someone I know: if you write your own billing application, make sure you round numbers correctly, or you could cost yourself hundreds of
by henning 18y ago
Embarrassing story from someone I know: if you write your own billing application, make sure you round numbers correctly, or you could cost yourself hundreds of dollars a month in under-billing clients.
- swombat 18y agoI'd say that's a nice problem to have.. if you're under-rounding by one cent enough times to cost yourself hundreds of dollars, that would mean you're making at least tens of thousands of dollars of sales...
- henning 18y agoIn the particular manifestation of this bug, he was under-charging by much more than one cent. It was thousands of dollars a month, not tens of thousands.
- nebula 18y agoI noticed a couple of utility providers making the "rounding errors" in their favor. I sensed evil intent on their part. I never thought it would have been a genuine software bug.
- LogicHoleFlaw 18y agoI write billing software for a utility provider so.... yep, it's a bug. Usually that sort of thing manifests when data moves between systems with slightly different rounding rules. There's a ton of integration points to third-party systems and they don't always agree about how these things work. Fractional things like taxes, prorating, and earned vs. deferred incomes make precision errors very easy. We've got sanity checks in the code to make sure nothing crazy is going on when we get results from third-parties but so long as any errors are within certain margins the accountants using the software are happy. Incidentally, accountants are the best users ever for bug reports. Their eye for detail and the multitude of reconciliation processes they use to analyze the results of your processing is fantastic for finding subtle bugs.
- eru 18y agoEverybody should have an accountant. They had to run somewhat buggy software (tax laws, bilancing laws etc) on unreliable hardware (humans) since a long time ago. (It's constrained based programming.)