Live data from Hacker News

Double-entry bookkeeping as a directed graph

matheusportela.com

61–70 of 388 posts

Re: Double-entry bookkeeping as a directed graph

#61

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…

On the other hand some things in how accounting is traditionally done suffer from accounting predating a lot of "modern" math. Negative numbers were first used around the 3rd century in China and took until the 16th century to be used in Europe. Modern double-entry bookkeeping was invented in the 14th century in Europe. So if you ever wonder why they traditionally use a column for debit and one for credit, with defin…

I'm not sure if that's the reason for it, but I'm pretty certain introducing negative numbers would confound the accounting process.

Re: Double-entry bookkeeping as a directed graph

#62
post #49

Earlier quoted context omitted.

Not really, the meaning of debit and credit depends on the type of account That's how most accountants think about it. But I think there's something more fundamental: a CR entry is an increase is what the company owes (to creditors or shareholders), and a DR is an increase in what the company owns. EDIT: see this link for how this relates to the accounting equation https://news.ycombinator.com/item?id=32501707

Isn't that exactly backwards to what most people think of credits and debits? If you credit me something, I now have something. I don't owe anything. I can kinda squint and see "Oh, you want the universe to balance, so if I have something it is some kind of karmic debt". But it still feels like exactly the opposite of what I grew up thinking of these terms to mean.

It's the opposite because when a counterparty (like a bank or a store) says they're 'crediting your account', they're talking about the impact from their perspective, not your perspective.

Re: Double-entry bookkeeping as a directed graph

#63
post #16

I find it a strange choice to explain double-entry bookkeeping with the example of "one entry for Alice, one entry for Bob". That's really not what it's about. It's obvious that a transaction with two parties could be recorded in two places, but to me the crucial point of double-entry bookkeeping is that it requires two entries for each party of the transaction . So if Alice buys book from Bob, four entries are made.…

Every explanation of double entry accounting seems to do the same thing. If I'm trying to understand the double part of double-entry bookkeeping, what exactly does the "double" refer to? What's being "doubled"? How would you salvage the article to actually explain the "double" part in detail? Could you do it purely from Bob's (or Alice's) perspective?

The 'double' in double entry book-keeping is related only to the book keepers own records/books. It has nothing to do with counter party's record keeping.

If Alice purchases a house worth $100,000 in cash, then 2 (double) accounts will get effected. Her cash account will decrease (Credit) by $100,100 and simultaneously her House equity account (or any other appropriate name such as immovable asset etc) will increase by $100,000 (Debit).

This can be recorded in a 3 column table as

  Credit account -- value -- Debit account
  Cash -- $100,000 -- House equity
In the above transaction, two accounts were effected. Hence the name double entry. This gives a truer picture of ones assets and liabilities.

Note: 1. Debit and credit dont have much to do with increase decrease. 2. A transaction can be modelled to have affect more than 2 account. For example if Alice were to make the purchase with $80,000 loan, then the book keeping could go like

  Credit Lender $80,000
  Credit Cash $20,000
  Debit House Equity $100,000
For the sake of better understanding, if one is uncomfortable with having one record affecting 3 accounts, one can be more robust and split the loan and the purchase into 2 transactions. After all, taking a loan and purchasing a house are 2 different events(transactions).

  Transaction one ->
  Credit Lender $80,000
  Debit Cash $80,000

  Transaction two ->
  Credit Cash $100,000
  Debit House equity $100,000
edit 1: attempt at better formatting

Re: Double-entry bookkeeping as a directed graph

#64

Earlier quoted context omitted.

Every explanation of double entry accounting seems to do the same thing. If I'm trying to understand the double part of double-entry bookkeeping, what exactly does the "double" refer to? What's being "doubled"? How would you salvage the article to actually explain the "double" part in detail? Could you do it purely from Bob's (or Alice's) perspective?

From what I got out of the article and my own limited understanding of double entry bookkeeping, the "double" seems to be referring to the part where we split a transaction into credits and debits as opposed to a transaction with positive or negative balance. The doubling is happening with the labels we use to describe what's happening with the money. From an individual account perspective, there's a doubling of the…

The core innovation of 'double entry' is that you can see the flow of money between accounts for every transaction.

This is possible because you (the accountant) are always adding a back-reference from the other account (hence the 'double' in 'double entry').

There's really not much to it. It throws people that are new to it for a loop, I think, because it is a strange way of behaving, and it isn't obvious why you're doing it until you have to track down something that doesn't balance. It's just a disciplined behavior that accountants started using because it allows one to track things that were difficult without it.

Re: Double-entry bookkeeping as a directed graph

#65

Earlier quoted context omitted.

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.

so why isn't there a single cash flow view/report that all businesses use rather than all of these bloated and apparently ineffective methods? PL etc..

Cash flow is not just what is happening, but what will happen. i.e. the difference between when money goes out vs. it coming in.

If you are selling widgets for $1.20 and buying them for $1, and they are delivered after you order them, you are limited on how many open orders you can have at any point in time even though you make money on each order.

A companies cash flow will be dependent on employees, capital expenditures, money for stock, returns rates, tax requirements etc. etc. So it's heavily dependent on what type of business is being run and the specifics of how the business is being run.

Re: Double-entry bookkeeping as a directed graph

#66
post #16

I find it a strange choice to explain double-entry bookkeeping with the example of "one entry for Alice, one entry for Bob". That's really not what it's about. It's obvious that a transaction with two parties could be recorded in two places, but to me the crucial point of double-entry bookkeeping is that it requires two entries for each party of the transaction . So if Alice buys book from Bob, four entries are made.…

Every explanation of double entry accounting seems to do the same thing. If I'm trying to understand the double part of double-entry bookkeeping, what exactly does the "double" refer to? What's being "doubled"? How would you salvage the article to actually explain the "double" part in detail? Could you do it purely from Bob's (or Alice's) perspective?

Remember, this was all done on paper before software with tagging and such existed.

I'll give a description shot, since I've been doing finance work recently. Other people can feel free to correct.

A company using double entry (as opposed to single) has a "chart of accounts." This means they have a bunch of imaginary accounts for tracking everything, including:

- Assets (e.g. cash on hand.)

- Liabilities (e.g. loans)

- Equity (e.g. investments in the company from outside parties)

- Income/Revenue: (edit: as PopAlongKid kid mentioned, I forgot this one. This could include sales revenue, but also things like interest.)

- Expenses (e.g. team lunch or a flight cost)

Some of these "accounts" may map to actual bank accounts: there is likely a liability account for a credit card or an asset account for the company checking.

Knowing all that, every time money is deposited or withdrawn (a transaction) the "double" references the fact that it's recorded in the journal (a.k.a ledger) of two accounts. (Edit: As bregma mentioned, one records where money is coming from and the other where it's going.) Often, an expense is often recorded in the checking "account" and the and the corresponding expense "account." E.g. a flight may be recorded in a travel expense "account," but you also record that the money came from the checking account. Every transaction is recorded in two places.

Beyond just being more accurate than single entry, this helps with important finance reports like Profit & Loss, since you can now see how money is moving around.

Edit: Now that I'm back on my desktop, these are a couple of useful links for understanding basic double entry bookkeeping: Accounting for Computer Scientists [0] and Accounting for Developers, Part I | Modern Treasury Journal [1]. What is a Sample Chart of Accounts for SASS Companies [2] illustrates some charts, which may be helpful for some folks.

[0] https://martin.kleppmann.com/2011/03/07/accounting-for-compu...

[1] https://www.moderntreasury.com/journal/accounting-for-develo...

[2] https://kruzeconsulting.com/startup-chart-accounts/

Re: Double-entry bookkeeping as a directed graph

#67

Earlier quoted context omitted.

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.

so why isn't there a single cash flow view/report that all businesses use rather than all of these bloated and apparently ineffective methods? PL etc..

There is a cash flow report that all (public) businesses use -- as I said, it is one of 3 basic reports that capture different aspects of the companies financial performance. You need all 3 for a complete picture. The cash flow statement helps "unobfuscate" certain aspects of the other two reports (which I hope you agree are not pure obfuscation).

For example, see this Apple Corp. financial report[0] -- it includes a statement of cash flows. I think you'd find that all other companies required to publicly share their financials will include the same report.

[0]https://www.apple.com/newsroom/pdfs/FY22_Q4_Consolidated_Fin...

Re: Double-entry bookkeeping as a directed graph

#68
post #58
post #16

I find it a strange choice to explain double-entry bookkeeping with the example of "one entry for Alice, one entry for Bob". That's really not what it's about. It's obvious that a transaction with two parties could be recorded in two places, but to me the crucial point of double-entry bookkeeping is that it requires two entries for each party of the transaction . So if Alice buys book from Bob, four entries are made.…

In all fairness, if you're trying to understand a piece of software like Quickbooks and are not coming from an accounting background, anthropomorphizing each "account" at your company as an individual actor with their own ledger can actually be a helpful mental model. Everything needs to be a dance between actors, and, for instance, when you make a vendor payment in cash, you can only do so as a message sent simultan…

anthropomorphizing the accounts is not the problem. the problem is that in the example the two parts of the double-entry are the two partners of the transaction. to anthropomorphize properly alice and bob would be two employees of the company buying a book from a bookstore.

Re: Double-entry bookkeeping as a directed graph

#69

Nice job on this. But, one has to be careful with redefining terms that have a generally accepted meaning. Changing Debit/Credit to Incoming/Outgoing smacks of jargon and will cause confusion. Any bookkeeper will understand what credit cash and debit expense means. Putting that in incoming and outgoing terms will not help the people who do the work, or have to explain the work. It's probably worth the effort of learn…

But the problem is the accounting jargon is counter (contra?) to the layman's gut understanding.

If I get credited or I use a credit card money came from nowhere, woohoo. If I have a debit well that sounds like debt and my money decreased, boo.

I get that actually there's a good reason for the names but a field that doggedly sticks to non intuitive jargon that runs counter to every usage yet encountered for outsiders could do with some different non-overloaded terms.

Re: Double-entry bookkeeping as a directed graph

#70

Nice job on this. But, one has to be careful with redefining terms that have a generally accepted meaning. Changing Debit/Credit to Incoming/Outgoing smacks of jargon and will cause confusion. Any bookkeeper will understand what credit cash and debit expense means. Putting that in incoming and outgoing terms will not help the people who do the work, or have to explain the work. It's probably worth the effort of learn…

> Changing Debit/Credit to Incoming/Outgoing smacks of jargon and will cause confusion.

I disagree. Discussions like this on HN always invite someone to say "Look, it's super simple. Credits are just... and debits are just ...". Then a reply saying "You have it backwards. Look, it's simple! Credits are just..."

I would be perfectly happy to ditch those terms forever.

Post reply on HN