Accounting for Computer Scientists (2011)
59 points
by tosh
5 hours ago
| 7 comments
| martin.kleppmann.com
| HN
NikolaNovak
37 minutes ago
[-]
I never understood double entry bookkeeping and that's where the author immediately loses me again:

Early on after 4th diagram, author includes sentence : "Because every transaction appears twice, once positive and once negative"

There is something so obvious about this to accounting folks that they always make the massive jump without any explanation. The previous diagram absolutely does not have positive and negative for each transaction! In fact, there is 5000 going into banking account and 500+5 coming out of it. Nothing in 4th diagram is obviously the negative of that 5k transaction, to me.

Similarly next sentence is "obviously" false: "If you partition the set of nodes into any two disjoint sets, and add up all of the balances in each set, then the sum for the one set is always the negative sum of the other set" -- the sum of the left two balances is minus five, and the sum of right three balances is 505.

And just like that, I'm completely lost and booted out of yet another accounting lesson without passing the introduction :-(

(fwiw, my experience of reading accounting is broadly the same as reading Plato: "it is obviously true that..." What, no, stop, that's not obvious at all, you gotta do better than that! :-)

reply
V__
15 minutes ago
[-]
Every time it comes up in my life, I search for an easy answer, yet I haven't found one yet. It reduces errors, makes it easy to track things and other reasons... all don't make sense to me if there is no physical bookkeeping involved. I am nearly convinced the reason is simply: It has been done like that for centuries. That's it.
reply
throwaway74848
20 minutes ago
[-]
Accounting generally wouldn't depict it this way, and it's quite confusing with the bubble diagram. I always found it easier when looking at things called "t accounts" [1]

Anyway, for the example you mention, it's supposed to mean that it takes 5k from the bubble on the left (founder) and gives to next bubble (bank)

Then each line again takes from left and gives to the new bubble on right. So each line is a transaction that balances out by adjusting both sides.

[1] https://en.wikipedia.org/wiki/Debits_and_credits

reply
NikolaNovak
1 minute ago
[-]
Thanks, I appreciate your answer, though sadly it does not move the needle much for me.

* the article still loses me because it defines transactions one way (the edges) and then seems to make this big switch that each edge/transaction is really two transactions suddenly (one on each side of the edge) .

Similarly the explanation In Wikipedia is completely contrary to my mental framework: "tenant who writes a rent cheque to a landlord would enter a credit for the bank account on which the cheque is drawn, and a debit in a rent expense account. Similarly, the landlord would enter a credit in the rent income account associated with the tenant and a debit for the bank account where the cheque is deposited."

I cannot even begin to parse that, and I'm honestly reasonably bright :-). Paying my landlord is "obviously" a transaction from my banking account (negative) into their banking account (positive). How it becomes four transaction is, as ever, the magic bit glossed over. That landlord is entering "debit for the bank account where the cheque is deposited" just feels like someone is yanking my chain.

Anyvoo! Like with French language, I'll try again one day :-). Merci!

reply
amelius
18 minutes ago
[-]
Those graphs look cool, but I'd prefer a growing log of entries, so you can see what happens over time and more easily roll back or fix things.

That's actually what's missing in this presentation: how do you deal with time?

reply
tomhow
2 hours ago
[-]
Previously:

Accounting for computer scientists (2011) - https://news.ycombinator.com/item?id=37940973 - Oct 2023 (50 comments)

Accounting for Computer Scientists - https://news.ycombinator.com/item?id=15446202 - Oct 2017 (1 comment)

Accounting for Computer Scientists - https://news.ycombinator.com/item?id=2298471 - March 2011 (75 comments)

reply
arn3n
32 minutes ago
[-]
Double entry account is, in fact, what gave “transactional” databases their name: They were meant for financial transactions! Nowadays TigerBeetle is a custom built financial database just for double entry accounting. The implementation is fascinating.
reply
rahimnathwani
3 hours ago
[-]
The last time this was posted on HN (October 2023), I posted this comment which I think makes it easy to understand the fundamentals of accounting:

https://news.ycombinator.com/item?id=37951781

reply
kjshsh123
2 hours ago
[-]
It's a good comment but I think to make something intuitive you really need to understand why something exists and I think for most people there just isn't in fact a good reason.

If you know it, it's easy to use, so why not? But if you don't, whatever method you come up with to track account balances and revenues vs. expenses is going to be useful enough. For individuals not accounting for receivables, debts, depreciation properly isn't likely to make a big difference.

reply
rahimnathwani
1 hour ago
[-]
This is a great point.

I take it for granted that people want to be able to read a balance sheet and an income statement.

But most people don't.

reply
ghaff
47 minutes ago
[-]
That was my thinking reading this. You need the basics but I would assume the main motivation is to look at a company's financial statement and at least recognize a lot of the language and the significance of the relationships. Of course there are going to be a lot of subtleties but the statement shouldn't be seen as being written in an ancient language.
reply
jimbokun
2 hours ago
[-]
This is so nicely presented it’s tempting me to have Claude whip up an implementation.

Just need aome form of graphic persistence then ways of summing across partitions of nodes to generate reports. And some convenience methods for adding transactions.

Final step would be to slap a CLI or UI on top of everything.

reply
kogasa240p
2 hours ago
[-]
As someone who failed an accounting class I will definitely read this.
reply