Skip to content
AccountancyPath

Accounting for DevelopersModule 1: Concepts for engineersBeginner2 min read

Why Software Developers Need Accounting Knowledge

Why engineers building billing, payments, marketplaces or ERP software need accounting: the bugs it prevents, the concepts that matter most, and where to start.

Lesson 1 of 16
Course outline (16 lessons)

If you work on invoicing, subscriptions, payments, wallets, marketplaces, payroll, expense tools or ERP integrations, your code records money. That makes it an accounting system, whether or not anyone calls it one.

Accountants solved many of the problems you will face centuries ago. Learning their rules is the fastest way to avoid rediscovering them in production.

Bugs that accounting prevents

Money appearing or disappearing. A wallet balance is updated in one place but the matching platform balance is not. Double entry, where every movement has an equal and opposite side, makes this structurally impossible to save.

Unexplainable balances. A support ticket asks why a customer’s balance is $37.50. If you only stored the current balance, nobody can answer. A ledger of entries can always answer.

Edited history. Someone “fixes” a wrong payment by updating a row. The audit trail is gone, reports for a closed month change, and reconciliation breaks. Accounting systems never edit posted entries; they reverse them.

Revenue recognised at the wrong time. Treating an annual upfront payment as this month’s revenue overstates revenue now and understates it later. Accrual accounting has precise rules for timing.

Rounding drift. Splitting $100 three ways and storing three floats of 33.333… produces sums that never quite match. Accounting systems store integer minor units and allocate remainders explicitly.

The concepts that matter most

Concept Why it matters in code
Accounting equation The global invariant your data must satisfy
Debits and credits A direction convention so every line can be summed
Double entry Every transaction balances; enforced at write time
Chart of accounts Reference data every posting points to
General ledger Balances are derived from entries, not stored independently
Accrual accounting When revenue and costs are recognised
Reversals and periods History is append-only; closed periods are locked

A mental model

Think of the ledger as an append-only event log with a strong invariant: each event (journal entry) is a set of lines whose signed amounts sum to zero. Account balances are a projection over that log. Reports such as the trial balance, balance sheet and income statement are further projections.

type Posting = { accountId: string; amountMinor: bigint }; // debit > 0, credit < 0
type JournalEntry = { id: string; occurredAt: string; postings: Posting[] };

// Invariant: entry.postings.reduce((s, p) => s + p.amountMinor, 0n) === 0n

If that invariant holds for every entry, the books balance by construction.

Where to start

  1. Read the double-entry engine lesson to see the invariant enforced in code.
  2. Design your accounts with chart of accounts database design.
  3. Model entries and postings with journal and ledger database design.
  4. Handle mistakes properly with reversals and audit trails.

Recap

  • Systems that move money are accounting systems.
  • Double entry, immutable entries, derived balances and integer money prevent common, expensive bugs.
  • Model the ledger as an append-only log of balanced entries, with balances as projections.

Try it yourself

Active recall

Quick check · Test yourself

Work out each answer in your head first, then reveal the explanation and mark whether you got it right.

  1. 1A SaaS customer pays $1,200 upfront for an annual plan on 1 January. When is the revenue recognised under accrual accounting?

    Show worked answer

    Gradually, $100 a month, as the service is delivered. On 1 January the $1,200 is unearned revenue, a liability.

  2. 2Why is storing a single mutable `balance` column on a user table risky?

    Show worked answer

    Concurrent updates can lose changes, there is no record of why the balance changed, and errors cannot be traced or reconciled. A ledger of immutable entries avoids all three.

Key terms in this lesson

Lesson 1 of 16 · Accounting for Developers

Finished this lesson?

Mark it complete to track your progress through the course. Progress is saved in this browser only.

Subject GuideAccounting Systems & Personal Finance

Mei-Ling Chen(陈美玲)

Turns accounting invariants into clean code—and everyday personal money clarity.

  • Double-Entry Ledger Engineering
  • SQL Schemas & Financial APIs
  • Multi-Currency & Billing Code

More lessons with Mei-Ling

Published:

Educational content only—not accounting, tax, legal or investment advice. See our editorial policy or report an error via our corrections policy.

Search