← Back to context

Comment by jes5199

1 year ago

literally every startup I’ve worked at has had busted accounting system that had to be painfully and expensively rewritten as a proper ledger. We should be teaching “Accounting for Programmers” as a required course in CS programs, or at least spreading memes about how money data must be append-only and immutable or you are being negligent in ways far more serious than most programming errors

The Software Engineering department next door from my CS department had a mandatory course on accounting. I don't think CS needs accounting, but I did learn two skills that would have helped here: why one should never use floating point for money (which may not apply here, who knows), and how to stick to a formal specification. "Money is neither lost nor created" is the most trivial example one can think for an invariant.

Relatedly, some months ago I asked how to correctly record food in a double-entry bookkeeping system [1] and it triggered a 1300-words, 8-levels-deep discussion. We should remember more often than accounting is a degree by itself.

[1] https://news.ycombinator.com/item?id=39992107

  • Haha, same. https://news.ycombinator.com/item?id=39994886

    I kept digging and digging on a "sell some lemonade for $5" example, and ended up at:

      - $5 debit to cash (asset => debit means +5)
      - $5 credit to revenue (equity => credit means + 5)
      - $X debit to cost of goods sold (liability => debit means - X)
      - $X credit to inventory (asset => credits mean - X)
    

    A double-entry for the money, and a double-entry for the inventory, for a total of 4 entries.

    It's too complicated for me. I'd model it as a Sale{lemonade:1,price:$5} and be done with it. Nothing sums to zero and there's no "Equity + Income + Liabilities = Assets + Expenses" in my version.

    But this is HN, and I think a lot of people would call my way of doing things "double" because it has both the lemonade and the money in it. So when I say I'm not sold on doing actual double-entry [https://news.ycombinator.com/item?id=42270721] I get sweet down-votes.

    • if you’re just doing first-party sales, the single-entry model you described is probably fine!

      but every startup these days wants to become a marketplace where you are facilitating multiple third-party lemonade vendors and taking a cut for letting them use your platform. In that case, the flow of money quickly gets too hard to understand unless you have double-entry

  • I think because programmer find it confusing about translation of model in computer to real world

    Accounting predates computer by hundreds of years, there are better way to do certain thing of course but we must follow convention here because that's the norm and everyone understood

    • computers evolved out of tabulating machines and tabulating machines were designed to make pen&paper accounting easier. These are our roots and we should appreciate them