Members' shelf
All 9 nodes on Naming & Classification are for members only.
Pay with the email you sign in with here, so the Pass is linked to this account.
Members' shelf
All 16 nodes on System Protection & Threat Modeling are for members only.
Pay with the email you sign in with here, so the Pass is linked to this account.
Don't repeat yourself (DRY)
- Holds when
- When one business rule is written in two or more places, and changing one means remembering to change the others.
- Evidence
- Normative claim; Bibliography checked
- Breaks down when
- Where referencing costs more than duplicating, consolidation only adds indirection; and if the one place is wrong, the error becomes consistent and harder to spot.
1. What happened
Twenty years after writing the principle down, its two authors went back and added a sentence of explanation in the new edition. The 1999 first edition of The Pragmatic Programmer puts the principle in one sentence: every piece of knowledge must have a single, unambiguous, authoritative representation within a system[1]Hunt, A. & Thomas, D. (1999). The Pragmatic Programmer: From Journeyman to Master. Addison-Wesley. Chapter 2, The Evils of Duplication; Tip 11. Bibliographic details checked against the official record. The tip number 11 and the definition sentence follows secondary accounts that agree with one another. The original definition: every piece of knowledge must have a single, unambiguous, authoritative representation within a system. The section is titled The Evils of Duplication.. The section that holds it is called The Evils of Duplication. The twentieth anniversary edition states the symptom plainly: the same thing is expressed in two or more places, and when you change one you have to remember to change the others; the question is not whether you will remember but when you will forget[2]Hunt, A. & Thomas, D. (2019). The Pragmatic Programmer: Your Journey to Mastery, 20th Anniversary Edition. Addison-Wesley. Chapter 2, Topic 9; Tip 15. Bibliographic details checked against the publisher's record. Claims matched against the full text. The authors' addition twenty years on: DRY is about the duplication of knowledge, of intent. The same section says the first edition did a poor job of explaining this, and that many people took it to refer to code only.. A common example: one business rule lives at once in a database column definition, in a check on the back end, in a form on the front end, and in a document written for people to read. When the rule changes, you have to remember all four. Nobody remembers every time, and the system starts contradicting itself.
Twenty years later the two authors added a sentence in the new edition, and that addition gets needed more often than the original: the principle is about the duplication of knowledge, of intent[2]Hunt, A. & Thomas, D. (2019). The Pragmatic Programmer: Your Journey to Mastery, 20th Anniversary Edition. Addison-Wesley. Chapter 2, Topic 9; Tip 15. Bibliographic details checked against the publisher's record. Claims matched against the full text. The authors' addition twenty years on: DRY is about the duplication of knowledge, of intent. The same section says the first edition did a poor job of explaining this, and that many people took it to refer to code only.. They added it because the first edition had not explained it well, and many people had read it as don't copy and paste code[2]Hunt, A. & Thomas, D. (2019). The Pragmatic Programmer: Your Journey to Mastery, 20th Anniversary Edition. Addison-Wesley. Chapter 2, Topic 9; Tip 15. Bibliographic details checked against the publisher's record. Claims matched against the full text. The authors' addition twenty years on: DRY is about the duplication of knowledge, of intent. The same section says the first edition did a poor job of explaining this, and that many people took it to refer to code only..
The two readings drive opposite behaviour. Read as written, you go looking for one judgement scattered across several places, then nominate one of them as authoritative and have the rest point at it. Read as the industry reads it, you go looking for two passages that resemble each other and merge them into something shared.
That second move breaks when the wording matches and the intent does not. Two rules happen to be identical today; tomorrow one of them has to change for a business reason, and they are already bound together. The copy you saved buys you a coupling that is harder to take apart.
2. Why this matters to you
Swap the word knowledge for the word criterion and this page lands directly on your own workflow.
How many places does your criterion live in right now? A spec you wrote for yourself, a block of instructions you paste to a model, an explanation you gave a collaborator, and possibly an exception you hold in your head and never wrote down. Those four will drift. And while they drift they raise no error: each one reads sensibly on its own, and the contradiction is visible only if you put them side by side, which you do not do in the normal course of things.
The original move is to nominate one of them as authoritative and have the others say see that one. It sounds like paperwork. What it actually does is change the shape of the failure: drift goes from four copies evolving separately with no way to tell which is right, to one copy changing and everything pointing at it following along. Sometimes the sums do not work out: if a piece of knowledge is used in only two places and both rarely change, setting up a third place for them to point at only adds one more thing to maintain.
The misreading needs guarding against too, and it is easier to walk into when a model is involved. You will want to merge three instruction blocks that look repetitive into one general block, because eight tenths of the wording matches. Stop there and ask the question that matters: are these three the same intent? If one of them exists to handle an exception the other two do not handle, its resemblance to them is a coincidence, and merging it deletes the exception.
In practice this page leaves one usable sentence. Ask whether it is the same piece of knowledge before deciding whether to merge. Do it the other way round and you will turn a coincidence into a structure.
Counter-examples and failure boundaries
The first boundary is what the principle costs. Gathering scattered knowledge into one place requires a place that can be referenced, and that place then has to be maintained. Where the cost of referencing exceeds the cost of duplicating (say the knowledge is used in two places and both change rarely), applying the principle manufactures a layer of indirection that benefits nobody. That is not the principle being wrong. It is its threshold of application.
The second boundary is its tension with readability. After you consolidate, a reader has to jump to the referenced place to understand a passage. One jump is fine. Three jumps start being harder to read than the duplication was. There is no formula for where the line sits, but there is a usable question: does the amount this consolidation makes change safe outweigh the amount it makes reading crooked.
The third gets overlooked most: the principle promises nothing about correctness. What it promises is that a change in one place takes effect everywhere. If that one place is itself wrong, it makes the error more consistent and harder to notice, because the system no longer holds two versions that contradict each other and prompt you. A single authoritative representation plus wrong content equals a quiet and thorough error. What guards against that is checking, not this principle.
Lab cases Written only where there is evidence
No field record for this node yet.
- A common account says the principle just tells you not to have duplicated code. The original addresses duplication of knowledge and intent, not of wording. The authors said so again, explicitly, in the edition twenty years later, and admitted that the first edition had not explained it well, which is why many people took it to be about code only. #
- A common account calls it tip 11 of the book. It is tip 11 in the 1999 first edition; the 2019 twentieth anniversary edition places it in topic 9 and renumbers the tip as 15. Cite the edition along with the number, or a reader following the number will not find it. This site gives no page for the definition in the first edition, because that page was not checked against the book. #
- This page does not credit these two authors with the term single source of truth: that is a separate line of concept history, covered on this site's single source of truth page; the two are compatible and do not share an origin, so the attributions go down separately. #
Records how far each claim was checked, not a guarantee that it is true.
How it was checked
The anchor for this page belongs to the batch that went through cross-model depth review item by item in May 2026: one model ran a breadth sweep at the first stage, a second model returned to the sources and adjudicated each item at the second, and reports from both are on file.
Three findings fold into the page. First, the core definition is confirmed word for word in the 1999 first edition, and confirmed to be retained in the 2019 edition[1]Hunt, A. & Thomas, D. (1999). The Pragmatic Programmer: From Journeyman to Master. Addison-Wesley. Chapter 2, The Evils of Duplication; Tip 11. Bibliographic details checked against the official record. The tip number 11 and the definition sentence follows secondary accounts that agree with one another. The original definition: every piece of knowledge must have a single, unambiguous, authoritative representation within a system. The section is titled The Evils of Duplication.[2]Hunt, A. & Thomas, D. (2019). The Pragmatic Programmer: Your Journey to Mastery, 20th Anniversary Edition. Addison-Wesley. Chapter 2, Topic 9; Tip 15. Bibliographic details checked against the publisher's record. Claims matched against the full text. The authors' addition twenty years on: DRY is about the duplication of knowledge, of intent. The same section says the first edition did a poor job of explaining this, and that many people took it to refer to code only.. Second, the chapter name The Evils of Duplication is confirmed, and the difference in numbering between editions was caught and corrected (tip 11 in the first; topic 9 and tip 15 in the twentieth anniversary edition).
Third, the page number in the first edition is not confirmed[3]Tip 11 and the definition sentence of the first edition appear in that edition's list of tips. Library catalogue records place the start of the section in the first edition at page 26, but the page that carries the definition was not checked against the book, so this site gives no page. The twentieth anniversary edition places it in topic 9 (from page 30) and renumbers the tip as 15.. Several citations available online put the section at roughly pages 26 to 27, while in the twentieth anniversary edition the chapter opens at page 27 and that topic opens at page 30, and the two cannot be mixed. The page that carries the definition was not checked against the book. The finding was that a physical copy is required, so this site cites no page.
Two residuals have to be stated, and the second is a gap in our own governance.
The first: this is a trade book rather than a journal article. Its authority comes from wide adoption and from who the authors are, not from a review process. That holds for most of the nodes on this shelf.
The second: the isolation credential for this depth review is missing. Our rule is that the second stage must run in a clean environment that does not inherit the context of the first, and the way we evidence that is by leaving behind a separate second-stage instruction file. The reports this node points at are the earliest batch in our library (mid-May 2026), and that folder has no such file. Every batch created after mid-May 2026 does have one, a hundred and twenty-five of them across the library.
Both models did do work, and that is on file. Whether the second model did its work in a clean environment cannot be evidenced from the files. Our handling: the verification section keeps the marking the upstream gave it (the method really was two models), the limitation is written here, and the gap has been reported back to the knowledge-base governance side. We do not quietly move the grade because the gap looks like a flaw, and we do not stay quiet because the case is old.
How to read the source notes “Bibliographic details checked” means author, year, title and venue were confirmed. It does not mean the source's claims were checked. “Matched against the full text” means the claim was compared with the text of the source itself. “Follows secondary accounts” means the claim rests on sources that report it, not on the original document. Definitions as of 2026-09-20.
- [1] Hunt, A. & Thomas, D. (1999). The Pragmatic Programmer: From Journeyman to Master. Addison-Wesley. ISBN 0-201-61622-X. Chapter 2, Tip 11. ↩
- [2] Hunt, A. & Thomas, D. (2019). The Pragmatic Programmer, 20th Anniversary Edition. Addison-Wesley. ISBN 978-0-13-595705-9. Chapter 2, Topic 9. ↩
- [3] Editorial note with no external source; the full text is in note [3] of the body.
Tell me when a new shelf opens
Tell me when a new shelf opens
Shelf notices are sent only when a new shelf opens or when the reading rules change.
Tell the editor privately: a correction, a counter-example or where it applies
Submissions are read only by the editor, and nothing is published before they are handled. Once a note is handled, a summary and response written by the editor are published. No sign-up is needed, and the nickname may be left blank.
We have your note