Live data from Hacker News

Double Entry Accounting for Developers

django-hordak.readthedocs.io

221–230 of 237 posts

Re: Double Entry Accounting for Developers

#221
post #195

Earlier quoted context omitted.

I agree, I don't understand how creating two entries in two separate locations is a good thing. You have to constantly monitor that you have matching entries everywhere. No thanks. Instead, have a master list of transactions with money in/out in each transaction. As long as every transaction balances, you are golden. Balances, history, cash flow, etc. can all be figured out from this one central location. This is how…

I haven't used ledger, but it seems to be double entry accounting too. According to the example: 2015/10/12 Exxon Expenses:Auto:Gas $10.00 Liabilities:MasterCard $-10.00 whereas I would have something like: 2015/10/12 Exxon $10.00 MasterCard -> Gas The idea would be that the form of the transaction doesn't allow you to screw up - it is neccessarily balanced because you only give the amount once. A bit like a typed la…

Modern accounting systems like most ERPs allow you to specify the account and offset account in one line. It pretty much like you describe and is the preferred method for simple entries with only two accounts.

It gets a bit trickier when, for example, sales tax is involved where a simple example for a sale of $1.000 with 25% VAT would be:

  cr. revenues                $800
  cr. VAT patable             $200
  dr. accounts receivable    $1000

Re: Double Entry Accounting for Developers

#222
post #73

If we’re talking “accounting for developers”, I’d like to plug the FOSS accounting system we wrote which uses event orientation to model the entities that a business owner actually things of (invoices, wages, etc). Side effects like taxes and legally required artifacts can be generated by rules. We’ve used it successfully for the last years to do our companies bookkeeping. https://github.com/200ok-ch/easy

Huh, you used `clojure.spec` but then used YAML. I get it for the UX reasons, but I would have guessed you'd be generating edn under the hood.

Re: Double Entry Accounting for Developers

#223

Earlier quoted context omitted.

Spot on. This is another situation of trying to solve a problem that doesn't exist and the writer does not understand at all . There are reasons why GAAP and IFRS exist. Accounting can make a lot of sense to a programmer, I've moved between fields early on with relative ease because accounting is extremely rule based/puzzle-oriented and adheres to a structured and specific framework. I haven't touched accounting in y…

Hey Snowing, would love to learn more about your experience -- I'm a fellow accountant (BS accounting) looking to move into development.

Nothing too special, I worked for a few large tech consulting companies early on in finance but did a bunch of a side development projects/freelance work as well. One of those ended up becoming a full-time gig so jumped ship and went from there.

Best of luck!

Re: Double Entry Accounting for Developers

#224
post #169

Earlier quoted context omitted.

But the UK doesn't! That probably tells you something about the UKs relationship with the commonwealth.

It's not compulsory, but it's available at GCSE and A Level; also in General Knowledge A Level I think. Granted they have a bit of a reputation for being 'lesser' subjects. I don't really agree that everyone needs to be taught this though, most Britons don't have to 'do taxes', and aren't running companies. It should probably form a part of trades' apprenticeship training (and for all I know it does) due to the highe…

chicken and egg

Re: Double Entry Accounting for Developers

#225

Note to people looking for job security: there is a HUGE need for developers who understand finance. The fundamental problem is that most finance people can't speak the language of software development (the biggest problem I've seen is that finance people tend to be very poor at writing out a spec of what the software should do - they're much better at looking at a set of examples and then telling you if the calculat…

I'm not so sure. I reckon you just hire the people who know a lot about finance in to a Business Analysis role and you're OK. You don't need single brains that know everything, just people working well in a team.

Completely disagree. I'm not saying the dev needs to know everything about finance, but they need to know the nuts and bolts and how things that finance people care about translate down into software. Most importantly, they need to be well versed in the language of finance so they can have intelligent conversations with the finance people.

Just sticking another "Business Analysis" person in the mix just means there are more hand-off points where things can slow down and get confused.

Re: Double Entry Accounting for Developers

#226
post #141

That's the silly, confusing view of accounting. Here is the smart view: 1. The sum of all accounts is zero: that's the fundamental equation. Nothing about assets, liabilities or equity. 2. A transaction updates at least two accounts, by applying deltas to them. The sum of the deltas is a transaction zero. Because of that (1) continues to hold. 3. Accounts which represent outside interests in the business run negative…

If the only thing required to untwist the system is to switch the sign of everything on the liabilities side maybe it wasn’t so twisted after all. At least you have the good taste of keeping assets positive, unlike other people. :-)

Ah, but the simple matter of fiddling with the sign has ramifications. You end up with people having to cram mnemonics into their heads like DEAD CLIC, and PEARL. On top of that, there are awkward limitations like a transaction having to work with exactly two accounts, one of which is debited and one of which is credited. The actual numeric deltas applied to the two accounts by the debit/credit can be any of the four combinations: UP/UP, DOWN/DOWN, UP/DOWN, DOWN/UP.

Under the sum-to-zero system, it's very simple. Negative-running accounts is what the system owes to the outside, including to its owners. Positive accounts are what it holds. It doesn't own anything: all of what it holds is either owed to its owners, or else to other creditors, so the sum is zero.

A transaction can update two or more accounts. The only rule is that all the deltas in the transaction add to zero.

That's as far as keeping balance is concerned: of course, the transaction has to reflect reality and accounting principles. For instance, if $1000 is injected into the business somehow (the company wins a lottery draw), that could be mistakenly applied as "+1000 cash, -1000 bank loan" which validates, due to summing to zero. But it looks like the company made a $1000 draft against the bank loan, which doesn't reflect what happened. The correct transaction is "+1000 cash, -1000 equity": the company is $1000 richer and so the owners have a greater interest: it "owes" more to the owners. (It's sort of as if the owners actually got the money, and loaned it to the business).

The debit/credit system's rule that a transaction must have a credit and debit of equal size also do not prevent bad transaction semantics: transaction from using the wrong asset or liability/equity account. It's just a gratuitous complication which provides exactly the same sanity check as summing to zero.

In my accounting system for self-employment, I have transactions that update four or five accounts. In double-entry, that would have to be done via an awkward series of binary debit/credit pairs. Moreover, I also have some "virtual" accounts: pairs of accounts that maintain precisely opposite balances that sum to zero. These accounts provide figures useful for reporting. For instance, suppose that transactions for receiving income are broken down: income doesn't go into a single lumped account, but some of it into "cash", some of it into "income tax withholding", and some into a third account like "health fund". But, for the sake of periodic income reporting, we need the whole lump together. For that, we can instantiate a virtual account pair "income" and "income-neg". In the same transaction, "income" receives the total, and "income-neg" the additive inverse of that to keep the ledger balanced. We can query the "income" account to see the lumped income, and not have to ferret that out of the income transactions.

Re: Double Entry Accounting for Developers

#227
post #141

Earlier quoted context omitted.

If the only thing required to untwist the system is to switch the sign of everything on the liabilities side maybe it wasn’t so twisted after all. At least you have the good taste of keeping assets positive, unlike other people. :-)

Ah, but the simple matter of fiddling with the sign has ramifications. You end up with people having to cram mnemonics into their heads like DEAD CLIC, and PEARL. On top of that, there are awkward limitations like a transaction having to work with exactly two accounts, one of which is debited and one of which is credited. The actual numeric deltas applied to the two accounts by the debit/credit can be any of the four…

> (the company wins a lottery draw) The correct transaction is "+1000 cash, -1000 equity"

In the end it will come to that (when the books are closed) but to be able to generate correct income statements you may need to create some kind of income account for that gain.

> (It's sort of as if the owners actually got the money, and loaned it to the business).

But it's not really the same thing.

Re: Double Entry Accounting for Developers

#228
post #133

I think I understand the mechanics of double entry bookkeeping, but what I find confusing about it is that it is the redundancy. People emphasize the error detection, but these errors can only exist in the first place because of the requirement to record each transaction twice. Also you get a lot of "fictious" or virtual accounts that don't correspond to concrete piles of cash or bank accounts. It seems much easier t…

> People emphasize the error detection, but these errors can only exist in the first place because of the requirement to record each transaction twice. That's like saying that check digits in credit card numbers detect errors that only exist in the first place because we entered more digits. Or that checking the md5sum after downloading a binary file detects errors that only exist in the first place because we downlo…

Any increase in redundancy should increase the raw error rate. However, with a credit card check digit or md5sum file the additional data is relatively tiny compared to the data it's responsible for checking, so you're much more likely to catch an error than to introduce a new one. Double-entry bookkeeping, in the traditional sense where you actually record every detail about each transaction separately in two or more journals, is more like a RAID-1 mirror: double the data, so approximately double the raw error rate, and if a discrepancy does turn up you'll have no idea which entry was wrong and which was right. But if you lose a journal outright you can recreate it from the mirror image.

So far as I know, most actual "double-entry" accounting software just stores each transaction once in a general ledger. The appearance of doubled entries is all in the UI where it processes the ledger to present a list of transactions from the perspective of a certain account. You still get the benefit that the system won't allow the balance of one account to be increased or decreased without an equal and opposite change in other account(s)—money cannot be created or destroyed[1], only moved around.

[1] Unless you're the Federal Reserve. They play by different rules.

Re: Double Entry Accounting for Developers

#229
post #209
post #204

Earlier quoted context omitted.

I do understand the difference between debit and credit. The point is not whether you can balance the books looking at them when they fit in a single page. The point is that in a balance sheet assets appear as $x (where x is rarely negative, an asset with negative value would become a liability). People want assets to be positive in the balance sheet. This may be a convention but it's a reasonable convention. I don't…

If you are using a negative numbers you can do it in three ways. 1. positive numbers represent the default for an account (A positive number in a debit account is a debit, but a positive number in a liability say, is a credit). This is done a lot. But he causes a lot of rules about when to add and went to subtract what the balance with what. I think this is why they lot of double entry bookkeeping and has a hard repu…

> But sales income would be negative (it is a credit). I wonder if that would confuse people.

It does tend to cause some confusion, but IMHO less than you would get with negative asset balances, much less the traditional version where "credits" and "debits" have different signs depending on the type of account and nothing ever just sums to zero.

The less confusing way to think of it is that an income account represents not "how much income have I received" but rather the source of the income, e.g. your employer or customer. They paid you, so they have less than they started with.

⋄ Money moves from employer to me: decrease "Income:Employment" and increase "Assets:Cash".

⋄ Money moves from me to my landlord: decrease "Assets:Cash" and increase "Expenses:Rent".

⋄ Deposit money at the bank: decrease "Assets:Cash" and increase "Assets:Bank:Checking".

⋄ Take out a loan: decrease "Liabilities:Loan" (negative since I owe them money) and increase "Assets:Cash".

Note that Income and Expense account balances are relative—which is why it makes sense for Income balances to sometimes be negative, and why these accounts are zeroed out at the end of the reporting period with transfers to or from equity—in contrast to most other accounts which have absolute balances.

Re: Double Entry Accounting for Developers

#230

Earlier quoted context omitted.

It doesn’t quite. You’ll also need to consider allocations and accounting for tax (sales and income), depreciation, transaction fees, warehousing, shipping revenue and expenses, revenue and expense recognition, discounts, returns, overpayments, prepayments, futures, chargebacks, refunds, credit notes, invoicing, subscriptions, subsidies, tariffs, reconciliation, adjustments in the current financial year, adjustments…

Apples and oranges. By way of analogy, the OP was talking about C while you are describing building a commercial Windows app. DE accounting is a simple tool that can be used in complex ways.

OP is neither, it is in Python, but this merely demonstrates that accounting can be incorrect in any language.

The problem isn't just terminology, but when people use the term double-entry accounting interchangeably with double-entry book-keeping, they reveal how little they know about the subject matter, and how unqualified they are to be implementing either.

Post reply on HN