Live data from Hacker News

Accounting for Computer Scientists (2011)

martin.kleppmann.com

31–40 of 76 posts

Re: Accounting for Computer Scientists (2011)

#31

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 negati…

We wrote about it here: https://finbodhi.com/docs/understanding-double-entry

It's just a convention to be able to capture the flow of money. Roughly, money comes in via Income, stays in Asset, goes to Expense (there is also Liability and Equity). Let's consider a home, as an asset. You could have got it with your own money (`Asset:Bank -> Asset:House`), or by taking a loan (`Liability:Home Loan -> Asset:House`). Both have very different implications. If you are just tracking current value of home, it won't capture the whole picture. E.g. if you want to sell the house, the price is going to be different in both cases.

Double entry is just a way to track the flow of money from these different categories of account. Once you have that, you can do a lot over it, generate all kinds of report that companies can use to understand their operations (and to share with investors).

There are even attempts to go beyond with triple-entry account, etc. I think the way to look at it is, companies need a way to understand and report the flow of money, the current state etc. Double entry helps with that. And they way it helps, it to keep track of both where money came from and where it went.

Re: Accounting for Computer Scientists (2011)

#32

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 negati…

It's like Newton's third law of motion, that "every force has an equal and opposite reaction", which when I was a wee child made no sense to me because "surely then nothing would happen". The key was that the equal and opposite reactions are on different objects.

It's the same thing with double entry accounting! The two entries are on different accounts.

Re: Accounting for Computer Scientists (2011)

#34

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 negati…

This website is absolutely nonsensical and I would not recommend it to anyone to understand how GAAP or IFRS accounting works. It might be useful for someone wanting to learn unicorn fantasy land accounting.

Double-entry accounting is basically checksum. For any transaction, the total in and out of all accounts involved in the transaction should be zero. If it's not, you have an error.

Conceptually, one of the hard parts to grasp and what many accounting students struggle with in the beginning is that in accounting financials, asset accounts have the opposite polarity as revenue accounts. This is because revenue is treated as an item that flows into Equity (in the famous equation Assets = Liabilities + Equity). The cash earned from a revenue-generating transaction is a (positive) asset, and so to balance it you need that revenue amount to be a negative somewhere in the books. This just affects the accounting financial statements (like the income statement or balance sheet; in the books both numbers would be entered as positive amounts in a transaction known as a "journal entry" in which you report the increase to one account and the offsetting decrease to another account.

Credit = money flowing out of an account or creating a new liability = decreases asset and expense accounts but increases liability and revenue accounts

Debit = money flowing into an account or reducing a liability = increases assets and expense accounts but decreases liability and revenue accounts

Re: Accounting for Computer Scientists (2011)

#35
I had independently invented diagrams like that many decades ago. I had also made up a "matrix accounting", which uses a new accounting equation:

   = 0
(It is assumed that changes over time.)

However, I think that both the diagrams and the matrix accounting are not really practical compared with the double entry accounting, but that does not mean that they are not worth anything.

Re: Accounting for Computer Scientists (2011)

#36

Earlier quoted context omitted.

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 transacti…

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 cheq…

"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)"

Perhaps the word "transaction" should have been explained better. It doesn't mean an entry/record/action. It means a collection of several actions, all happening at the same time. Several actions that are interlinked and only can happen because of one another.

For instance, if I buy a house. "Ensuring the transaction" would be to make sure that a) I get registered as owner to the house and b) that the sellers gets my money. Either a)+b) should both happen (and those two things both happening is ONE transaction), or neither happens. (If I only give the money but don't get the house the transaction didn't complete/is invalid, but incomplete transactions are sort of out of scope for accounting systems)

Back to the article. An edge of 100 from X to Y means "move 100 from X to Y", which is the same as "subtract 100 from X and add 100 to Y, and those two entries belong together and should be done transactionally".

How else would you move money between two accounts if you did not subtract from one and add to the other?

Anyway: The edge is definitely not turned into 2 transactions. But, each edge causes two accounting entries, belonging to the same transaction.

Re: Accounting for Computer Scientists (2011)

#37

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 negati…

This website is absolutely nonsensical and I would not recommend it to anyone to understand how GAAP or IFRS accounting works. It might be useful for someone wanting to learn unicorn fantasy land accounting. Double-entry accounting is basically checksum. For any transaction, the total in and out of all accounts involved in the transaction should be zero. If it's not, you have an error. Conceptually, one of the hard p…

This website that you call nonsensical was a huge help to me when starting to learn about accounting systems. And I have spent several years of my life working on a (special purpose, non-generalist) accounting system.

The important thing is just a shift of perspective. It is just a different way of viewing the same system. The website doesn't contradict the things you write about at all.

Saying "double entry book-keeping is basically a checksum" and "a transaction of two entries is basically an edge in a graph" is just two views into the same model. Like working in real space vs Fourier domain. You can move between the representations but they represent the same underlying thing.

It seems your main gripe is the use of negative numbers instead of credit/debit.

I feel certain that if negative numbers where around when double entry book-keeping was first done then credit/debit would not have been invented.

Once you "grok" it, viewing an income account balance as a negative number and an expense account as a positive number makes so much sense.

Yes, using credit/debit instead of +/- is more normal, and if you use +/- you have to be prepared to translate at the UI later to terms more commonly used in accounting. But is is the same thing. You can just translate between them.

The article is not nonsensical at all. But perhaps it should have explained the regular use of debit/credit instead of negative numbers more explicitly.

The words used doesn't change the concepts though.

Re: Accounting for Computer Scientists (2011)

#38
post #17

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 negati…

>I never understood double entry bookkeeping It only makes sense in the context of a company. Yes you can shoehorn it into a personal context and/or treating it like some sort of database like hn's accounting posts love to do but that's not what the real accounting world looks like at all. An accountant armed with a low/no code solution isn't going to write great code. That I think is obvious to every hn reader. But…

> It only makes sense in the context of a company.

Don't you think it can make sense in terms of pension contributions?

I used to track my finances very carefully (but now I'm more lackadaisical). Double entry would've been helpful for "I'm taking money from this pocket and putting it in this pocket".

Re: Accounting for Computer Scientists (2011)

#39
post #37

Earlier quoted context omitted.

This website is absolutely nonsensical and I would not recommend it to anyone to understand how GAAP or IFRS accounting works. It might be useful for someone wanting to learn unicorn fantasy land accounting. Double-entry accounting is basically checksum. For any transaction, the total in and out of all accounts involved in the transaction should be zero. If it's not, you have an error. Conceptually, one of the hard p…

This website that you call nonsensical was a huge help to me when starting to learn about accounting systems. And I have spent several years of my life working on a (special purpose, non-generalist) accounting system. The important thing is just a shift of perspective. It is just a different way of viewing the same system. The website doesn't contradict the things you write about at all. Saying "double entry book-kee…

> I feel certain that if negative numbers where around when double entry book-keeping was first done

They were; one of negative numbers first documented uses in Europe after the Classical period was by Fibonacci in the specific context of financial calculations, around the turn of the 13th Century; the first evidence of the double entry bookkeeping is also in Italy, around the turn of the 14th Century.

Re: Accounting for Computer Scientists (2011)

#40
I read this article on HN ten years ago and it has been very important to me in a career working on a special purpose accounting (for automated reconciliation of bank accounts of a payments processor).

The biggest shift from conventional accounting is the use of negative numbers instead of debit/credit.

I believe that accounting would have been a lot more accessible to professionals from science/math backgrounds if negative numbers had been used instead of debit/credit.

I think biggest challenge to introducing negative numbers in accounting now is that people don't like the look of an income account accumulating a negative balance and the expense account accumulating a positive balance. But once you bend your mind around that it makes perfect sense...expense is where the money "went" (positive), income is where the money "came from" (negative).

(The alternative sign convention would make cash on hand negative.)

That said: Credit/debit does carry an extra bit of information, because you can put negative numbers as credit/debit to convey flow going the opposite direction of the usual one. (This can also be inferred from the accounts being credit-normal or debit-normal, just wanted to note it is not 100% the same model.)

My Norwegian small business accounting system vendor (Fiken) has started to present data using +/- in addition to debit/credit columns, perhaps there is some adaption of signed numbers accounting happening..

Post reply on HN