Hacker News new | ask | show | jobs
by sago 2148 days ago
> Equity is similar to a liability. Ít is owed to the owners of the entity.

You can kind of see the easy rationale there. I'm not sure it's very deep though. Revenue is in the same group (Credit). And the assets are like expenses (Debit). That is a bit more of a just-so-story in my mind.

> Making assets positive in code is conventional.

Are you sure? What code are you talking about?

Making everything positive in the UI is certainly common. And not showing whether a value is credit or debit. But I really hope my accountancy software isn't coded that way! It needs to track whether a number is a credit or a debit. It could do it with an unsigned value in a struct with a 'is_cr' Boolean and some custom operations to combine the money structs. But I've only ever seen code using signed values, because it is so much faster and less errorprone. Doing it manually is just reinventing the math of negative numbers. And then, the overwhelming convention is the former is positive, the latter negative, not the other way round.

1 comments

For one example, read the docs for Beancount, which is mentioned above.

Signed values are the way to go!

> Signed values are the way to go!

100% agree!

> For one example, read the docs for Beancount, which is mentioned above.

Do you have other examples too?

You are dead right with this one. It is the opposite way to the way the systems I'm familiar with did it. Debit is positive, And credit negative.

Thanks so much for the link.

I'm still not sure what I would concede that it is conventional ;) But my assumption it was nothing but the other way is definitely incorrect!

I wonder if they did it this way because they felt people would understand negative income being a good thing better than a negative bank accounts being a good thing. The bank account is usually the big problem with understanding debit and credit.

As usual, the world is more complex and interesting then I assume!

When you first open a business, you put in capital - owner's equity. So the cash account (an asset) increases, and the equity account (a liability) also increases.

In a computerized system, one of these accounts carries a negative balance, the other a positive balance. A choice has to be made - but it's not a matter of good or bad.

There are several implementations of the Ledger system. The transaction registers and GL are human-readable. I looked at Ledger, and assets were positive.

I looked in the code for the GNUCash engine, but there are so many features that I didn't manage to get to the bottom of it w/o spending too much time on it :-)

I do recollect working with low level GC transaction data years ago, and I think I would remember if the assets were negative.

There are a couple of Wikipedia pages with links to FOSS accounting systems.