The Pragmatic Programmer
{"all_nodes":"PHASE 1 fill complete; deterministic lint clean (2026-10-12)"}local graph
The Pragmatic Programmer — David Thomas, Andrew Hunt
Section titled “The Pragmatic Programmer — David Thomas, Andrew Hunt”chapter_01
Section titled “chapter_01”node-book_the-pragmatic-programmer_chapter-01-a-pragmatic-philosophy — A Pragmatic Philosophy
chapter_02
Section titled “chapter_02”node-book_the-pragmatic-programmer_chapter-02-a-pragmatic-approach — A Pragmatic Approach
chapter_03
Section titled “chapter_03”node-book_the-pragmatic-programmer_chapter-03-the-basic-tools — The Basic Tools
chapter_04
Section titled “chapter_04”node-book_the-pragmatic-programmer_chapter-04-pragmatic-paranoia — Pragmatic Paranoia
chapter_05
Section titled “chapter_05”node-book_the-pragmatic-programmer_chapter-05-bend-or-break — Bend, or Break
chapter_06
Section titled “chapter_06”node-book_the-pragmatic-programmer_chapter-06-concurrency — Concurrency
chapter_07
Section titled “chapter_07”node-book_the-pragmatic-programmer_chapter-07-while-you-are-coding — While You Are Coding
chapter_08
Section titled “chapter_08”node-book_the-pragmatic-programmer_chapter-08-before-the-project — Before the Project
chapter_09
Section titled “chapter_09”node-book_the-pragmatic-programmer_chapter-09-pragmatic-projects — Pragmatic Projects
chapter_10
Section titled “chapter_10”node-book_the-pragmatic-programmer_chapter-10-bibliography — Bibliography
chapter_11
Section titled “chapter_11”node-book_the-pragmatic-programmer_chapter-11-possible-answers-to-the-exercises — Possible Answers to the Exercises
Title Page
Section titled “Title Page”20th Anniversary Edition
Section titled “20th Anniversary Edition”The Pragmatic Programmer
Section titled “The Pragmatic Programmer”your journey to mastery
DAVID THOMAS
Section titled “DAVID THOMAS”ANDREW HUNT
Section titled “ANDREW HUNT”Foreword by SARON YITBAREK
Table of Contents
Section titled “Table of Contents”Contents
Section titled “Contents”Foreword … xi
Preface to the Second Edition … xv
From the Preface to the First Edition … xix
-
A Pragmatic Philosophy … 1
Topic 1. It’s Your Life … 2
Topic 2. The Cat Ate My Source Code … 3
Topic 3. Software Entropy … 6
Topic 4. Stone Soup and Boiled Frogs … 8
Topic 5. Good-Enough Software … 11
Topic 6. Your Knowledge Portfolio … 13
Topic 7. Communicate! … 19 -
A Pragmatic Approach … 27
Topic 8. The Essence of Good Design … 28
Topic 9. DRY—The Evils of Duplication … 30
Topic 10. Orthogonality … 39
Topic 11. Reversibility … 47
Topic 12. Tracer Bullets … 50
Topic 13. Prototypes and Post-it Notes … 56
Topic 14. Domain Languages … 59
Topic 15. Estimating … 65 -
The Basic Tools … 73
Topic 16. The Power of Plain Text … 74
Topic 17. Shell Games … 78
Topic 18. Power Editing … 81
Topic 19. Version Control … 84
Topic 20. Debugging … 88
Topic 21. Text Manipulation … 97
Topic 22. Engineering Daybooks … 100
Contents • viii
-
Pragmatic Paranoia 103 Topic 23. Design by Contract … … … … … … … … 104 Topic 24. Dead Programs Tell No Lies … … … … … … … 112 Topic 25. Assertive Programming … … … … … … … … 115 Topic 26. How to Balance Resources … … … … … … … . 118 Topic 27. Don’t Outrun Your Headlights … … … … … … . . 125
-
Bend, or Break 129 Topic 28. Decoupling … … … … … … … … … … . 130 Topic 29. Juggling the Real World … … … … … … … … 137 Topic 30. Transforming Programming … … … … … … … . . 147 Topic 31. Inheritance Tax … … … … … … … … … . . 158 Topic 32. Configuration … … … … … … … … … … 166
-
Concurrency 169 Topic 33. Breaking Temporal Coupling … … … … … … … . 170 Topic 34. Shared State Is Incorrect State … … … … … … . . 174 Topic 35. Actors and Processes … … … … … … … … . . 181 Topic 36. Blackboards … … … … … … … … … … . 187
-
While You Are Coding 191 Topic 37. Listen to Your Lizard Brain … … … … … … … . 192 Topic 38. Programming by Coincidence … … … … … … … . 197 Topic 39. Algorithm Speed … … … … … … … … … . . 203 Topic 40. Refactoring … … … … … … … … … … . . 209 Topic 41. Test to Code … … … … … … … … … … . 214 Topic 42. Property-Based Testing … … … … … … … … . 224 Topic 43. Stay Safe Out There … … … … … … … … … 231 Topic 44. Naming Things … … … … … … … … … … 238
-
Before the Project 243 Topic 45. The Requirements Pit … … … … … … … … . . 244 Topic 46. Solving Impossible Puzzles … … … … … … … . . 252 Topic 47. Working Together … … … … … … … … … . . 256 Topic 48. The Essence of Agility … … … … … … … … . . 259
Contents • ix
- Pragmatic Projects 263 Topic 49. Pragmatic Teams 264 Topic 50. Coconuts Don’t Cut It 270 Topic 51. Pragmatic Starter Kit 273 Topic 52. Delight Your Users 280 Topic 53. Pride and Prejudice 282
Postface 285
Bibliography 289
Possible Answers to the Exercises 293
Index 307
From the Preface to the First Edition • xxii
Individual Pragmatists, Large Teams
Section titled “Individual Pragmatists, Large Teams”Some people feel that there is no room for individuality on large teams or complex projects. “Software is an engineering discipline,” they say, “that breaks down if individual team members make decisions for themselves.”
We strongly disagree.
There should be engineering in software construction. However, this doesn’t preclude individual craftsmanship. Think about the large cathedrals built in Europe during the Middle Ages. Each took thousands of person-years of effort, spread over many decades. Lessons learned were passed down to the next set of builders, who advanced the state of structural engineering with their accomplishments. But the carpenters, stonecutters, carvers, and glass workers were all craftspeople, interpreting the engineering requirements to produce a whole that transcended the purely mechanical side of the construction. It was their belief in their individual contributions that sustained the projects: We who cut mere stones must always be envisioning cathedrals.
Within the overall structure of a project there is always room for individuality and craftsmanship. This is particularly true given the current state of software engineering. One hundred years from now, our engineering may seem as archaic as the techniques used by medieval cathedral builders seem to today’s civil engineers, while our craftsmanship will still be honored.
It’s a Continuous Process
Section titled “It’s a Continuous Process”A tourist visiting England’s Eton College asked the gardener how he got the lawns so perfect. “That’s easy,” he replied, “You just brush off the dew every morning, mow them every other day, and roll them once a week.”
“Is that all?” asked the tourist. “Absolutely,” replied the gardener. “Do that for 500 years and you’ll have a nice lawn, too.”
Great lawns need small amounts of daily care, and so do great programmers. Management consultants like to drop the word kaizen in conversations. “Kaizen” is a Japanese term that captures the concept of continuously making many small improvements. It was considered to be one of the main reasons for the dramatic gains in productivity and quality in Japanese manufacturing and was widely copied throughout the world. Kaizen applies to individuals, too. Every day, work to refine the skills you have and to add new tools to your repertoire. Unlike the Eton lawns, you’ll start seeing results in a matter of days. Over the years, you’ll be amazed at how your experience has blossomed and how your skills have grown.