Live data from Hacker News

Double-entry bookkeeping as a directed graph

matheusportela.com

21–30 of 388 posts

Re: Double-entry bookkeeping as a directed graph

#22
A better way to do this would be to more closely model what is really happening, that is the transaction events which change state. The states being changed would be the account balance amounts input to and output from the transaction event. With the event, you can also track the system performing the function in the event. (All with rdf) https://graphmetrix.com/trinpod-server

Re: Double-entry bookkeeping as a directed graph

#23

I think people underestimate the beauty and impact of accounting. Just a tiny number of formulas (accounting identities [1]) and statements (P&L, balance sheet, etc.) can represent what's going on in any org in ways that can be roughly comparable. Reminds me of the "fundamental theorem of calculus" or "central dogma of biology". Accounting is also where we get math and written language [2] as ancient Mesopotamian civ…

> can represent what's going on in any org in ways that can be roughly comparable.

It can also obfuscate it pretty well!

Re: Double-entry bookkeeping as a directed graph

#24
post #23

I think people underestimate the beauty and impact of accounting. Just a tiny number of formulas (accounting identities [1]) and statements (P&L, balance sheet, etc.) can represent what's going on in any org in ways that can be roughly comparable. Reminds me of the "fundamental theorem of calculus" or "central dogma of biology". Accounting is also where we get math and written language [2] as ancient Mesopotamian civ…

> can represent what's going on in any org in ways that can be roughly comparable. It can also obfuscate it pretty well!

Obligatory "Seeing Like a State" reference.

Re: Double-entry bookkeeping as a directed graph

#25
post #20
post #15

Still too complicated. It goes wrong with "Let’s add the Transaction column to our table." Don't store the account data. Instead store the transactions. Compute the accounts from that. The table "Transactions" should have the fields: Date, Amount, SourceAccount, TargetAccount, Description. That is how it becomes beautiful in my opinion. Unlearn this habit of thinking in accounts just because that is what you know fro…

Isn't having to replay every transaction in history to query current balance rather inefficient?

It's a trade off. Immutability is a big enough win to pay the price of a few extra CPU cycles. In practice it's very quick anyway. Computers are very good at adding numbers together (it's almost like it's what they were made for!). I keep all my accounts for over 12 years in one file and I still don't notice any delay when calculating balances etc.

If it does become a problem then one solution is to take sums at some point in time and start the ledger again paying each account from a contra account containing the previous balance.

Re: Double-entry bookkeeping as a directed graph

#26
I believe double-entry bookkeeping needs more attention.

I think double-entry bookkeeping is, at least to me, as fundamental to economics (and of course business) as logic to math. Even if some actors don't use it explicitly, it still holds. If I buy ten apples for 10 bucks, I have ten more apples in stock and ten bucks less.

Many economic discussions (not only on HN) get out of hands because people don't try to see the full picture or deliberately choose to see one side. I've even seen a professor of economics claim in public that the world is too much in debt. Well, double-entry bookkeeping tells you that there are always two sides to consider.

For example, in case of governmental debt they ignore the other side of that debt, which might be assets. Assets like airports, schools, bridges, etc. Usually, we call such things useful.

Another typical example is the central bank "prints money". Well, double-entry bookkeeping tells us that it's not possible. If they hand out currency, the counterpart needs to trade something in (typically repurchase agreements with commercial banks). (Leaving aside here the idea of helicopter money, which could even go into neg. equity or a loss.)

Re: Double-entry bookkeeping as a directed graph

#28
post #20
post #15

Still too complicated. It goes wrong with "Let’s add the Transaction column to our table." Don't store the account data. Instead store the transactions. Compute the accounts from that. The table "Transactions" should have the fields: Date, Amount, SourceAccount, TargetAccount, Description. That is how it becomes beautiful in my opinion. Unlearn this habit of thinking in accounts just because that is what you know fro…

Isn't having to replay every transaction in history to query current balance rather inefficient?

You can cache it. ;)

Re: Double-entry bookkeeping as a directed graph

#29

I think people underestimate the beauty and impact of accounting. Just a tiny number of formulas (accounting identities [1]) and statements (P&L, balance sheet, etc.) can represent what's going on in any org in ways that can be roughly comparable. Reminds me of the "fundamental theorem of calculus" or "central dogma of biology". Accounting is also where we get math and written language [2] as ancient Mesopotamian civ…

Yes, there's a neat simplicity in how everything in accounting must work out, but extrapolating from that into "P&L, balance sheet, etc. can represent what's going on in any org in ways that can be roughly comparable" sounds like a very financialised worldview.

There are many important aspects of organisational design that are only loosely correlated with financial statements.

Re: Double-entry bookkeeping as a directed graph

#30
post #23

I think people underestimate the beauty and impact of accounting. Just a tiny number of formulas (accounting identities [1]) and statements (P&L, balance sheet, etc.) can represent what's going on in any org in ways that can be roughly comparable. Reminds me of the "fundamental theorem of calculus" or "central dogma of biology". Accounting is also where we get math and written language [2] as ancient Mesopotamian civ…

> can represent what's going on in any org in ways that can be roughly comparable. It can also obfuscate it pretty well!

That's where statement of cash flows[0] comes in -- because over a long enough time frame, profit is just cash in minus cash out. Hard to obfuscate that. Companies usually go bankrupt not because of negative net worth, but because of insufficient cash flow.

[0]the third basic type of statement, in addition to balance sheet and profit & loss.

Post reply on HN