logoalt Hacker News

dagsslast Saturday at 7:39 AM1 replyview on HN

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


Replies

chronos00last Saturday at 11:56 AM

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

I think this is a perfectly succint explanation for people who have trouble grasping the double entry system. Because they are usually stuck thinking in terms of "move 100 from X to Y". And its hard to get them to think in terms of "subtract 100 from X and add 100 to Y".