Briefle words · Code & architecture
Single source of truth
Keeping each fact or value in exactly one place, so every other part of the system refers to it instead of copying it.
Say it to an AI
Python late_fee(balance, days_late) returning a Decimal: 5-day grace period, 1.5% of the balance, a $25 collections fee after 30 days, capped at $40. No magic numbers: put each policy value in a named constant at module level so there is a single source of truth.
How an expert would brief the stronger version of “Loan late fee”.
See it
Try it as a puzzle →The rule that charges a late fee on an overdue loan payment in a lending app.
Why: If reminders or the terms page also need the 5-day grace period, B's code can import GRACE_PERIOD_DAYS; with A, someone will copy a bare 5 and they will drift apart.
More ways experts use it
TypeScript helpers for helpdesk tickets. Model status as a TicketStatus enum (open, pending, resolved, closed) as the single source of truth, type Ticket.status with it, and never compare or assign magic strings. canReply(ticket) and resolve(ticket), both pure.
Ticket status · Code & architecture
Related words
Room 1 · Essentials
Learn “Single source of truth” in a five-minute lesson