3 ms·
I use double-entry bookkeeping as a metaphor when pitching software testing. It's particularly helpful with non-technical audiences who have backgrounds in law
by lchengify 12y ago
I use double-entry bookkeeping as a metaphor when pitching software testing. It's particularly helpful with non-technical audiences who have backgrounds in law, finance, or accounting.
You write software tests for the same reason you do double entry: error detection of a technical system that has expected results. The only difference is that accounting has "real" numbers whereas software is algorithm definitions, so you have to plug in real values to run the tests.
It's also telling how similar (and unforgiving) both software and accounting can be. The mischaracterization of a column in accounting could be the difference between profitability and insolvency for your company. The mislabeling of a macro in your program could be the difference between correct execution and a segfault.
- vdm 12y agoThat is a great way of thinking about testing, and possibly even type systems. It really clicked with me, thank you for sharing.
- sorbits 12y ago> […] reason you do double entry: error detection This is a misconception and if you think about it, it doesn’t make a lot of sense since the two records are generally generated by a system that gets a single value from the user, so it would be a software error if they did not even out. Accounting errors are normally human errors, e.g. entering the wrong amount or specifying the wrong account, none of which are errors that double entry accounting will catch. However, double entry accounting gives us an audit trail because it tracks how assets are moved between accounts, so if the balance of an account is not as we expect, we can go back and see exactly why it is what it is.
- nitrogen 12y agoDouble-entry accounting predates software implementations thereof. When writing values by hand into two different physical ledgers, it would serve as a limited form of error detection.
- vonmoltke 12y ago> This is a misconception and if you think about it, it doesn’t make a lot of sense since the two records are generally generated by a system that gets a single value from the user, so it would be a software error if they did not even out. That applies to a software system, but not a handwritten ledger. In the latter, it does serve as an error detection mechanism because a human has to enter both values and other humans have to read them clearly. You are correct, though, that the primary reason for double-entry is audit trail.
- lchengify 12y ago> However, double entry accounting gives us an audit trail because it tracks how assets are moved between accounts. Ah, makes sense. My understanding of double-entry comes from history rather finance. I read a few articles on Italian history, specifically the Medici family with Florentine banks and hand-written ledgers. I'm not an accountant, in practice it makes more sense as an audit trail. I guess you could stretch the metaphor further and say that a SCM + testing gives you the equivalent of double-entry. However in practice, I've never had much trouble convincing anyone to use a SCM :).