APOSD Reading Notes 03: Working Code Isn't Enough
Notes on Chapter 3 of the second edition of A Philosophy of Software Design: tactical vs. strategic programming, a 10–20% design investment with a 6–18 month payback, and why startups shouldn't count on cleaning up later either.
- Published
- Reading time
- 42 min read
- Category
- Software design
- Tags
- Translated from
- the Chinese original
Contents28 sections
This is the third post in my APOSD reading notes. Chapter 2 said complexity accumulates bit by bit and must be met with “zero tolerance”; Chapter 3 answers the practical question that follows: under delivery pressure, how can anyone get every step right? The author’s answer is to treat design as an investment, with an actionable budget: 10–20%. This chapter focuses on mindset and organizational culture; section 16.1 of the book, Stay strategic, revisits the topic in the context of modifying existing code.
As with the first two posts, “From the book” covers the book’s content, retold in my own words; English quotations are from the book. The rest—my reading, examples, and extensions—is my own addition.
The chapter in brief
Mindset is one of the most important ingredients of good software design. Most programmers aim to “get the feature working” (tactical programming), adding “just a tiny bit of complexity” each time until it all piles up into a mess no one can untangle; strategic programming instead takes “turning out a good design that happens to work as well” as its main goal and keeps making small design investments: actively trying for better designs, and fixing problems as soon as they turn up. The investment comes to roughly 10–20% of development time. You go a little slower at first, the benefits start to show within a few months, and the author estimates it pays for itself in 6–18 months. Startups are no exception—“we’ll clean it up later” most likely won’t happen.
The line of argument
[Observation] Many organizations encourage a "tactical mindset": get features working as fast as possible
│
▼
[3.1 Tactical programming] Short-sighted → "a little complexity is fine" → each task contributes a few bits of complexity
│ → problems start → "the next feature matters more, no time to refactor" → patches → more complexity
│ → stuck in the mire, hard to turn back
│ → extreme form: the "tactical tornado"—a hero in some organizations' management's eyes, a disaster for future maintainers
▼
[3.2 Strategic programming] Lesson one: working code isn't enough
│ Main goal = a good design (that also works)
│ Investment mindset: proactive investment (try several designs, imagine future changes, write documentation)
│ + reactive investment (fix design problems when you find them, don't work around them)
▼
[3.3 How much to invest] A big up-front investment won't work (that's waterfall, which doesn't work)
│ → continual small investments, about 10–20% of development time
│ → 10–20% slower at first, then at least 10–20% faster within months; the investment becomes "free"
│ → tactical programming: 10–20% faster at first, then slower forever after
│ → technical debt: most of it is never repaid
│ → payback time: the author's personal estimate is 6–18 months (explicitly stated to have no data)
▼
[3.4 Startups] Even under the greatest pressure, the tactical path is a mistake:
│ ① spaghetti code is almost impossible to fix; ② the payoff comes quickly, so tactical isn't necessarily faster;
│ ③ a bad codebase keeps you from hiring the best engineers
│ → Facebook (tactical) vs. Google / VMware (strategic): both can succeed,
│ but working in a clean codebase is more fun
▼
[3.5 Conclusion] Good design doesn't fall from the sky—invest today, and keep investing
→ "we'll clean up after this crunch" is the start of a slippery slopeSection by section
Introduction: mindset is the first ingredient of design
From the book
One of the things that matters most in good software design is the mindset you bring when you sit down to program. Many organizations foster a tactical mindset, centered on getting features running as fast as possible; a good design, though, calls for something more strategic: taking the time to create clean designs and to put problems right. This chapter looks at why the strategic route yields better designs and why, over the long run, it actually costs less than the tactical one.
My reading
Here the author makes an important shift: the first two chapters were about the system (complexity, dependency, obscurity), and this one turns to people—the same set of principles produces completely different systems under different mindsets. What the author sets out to argue is not that “strategy is nobler,” but that the strategic route yields better designs and actually turns out cheaper in the long run—an economic argument, not a moral one. That framing is key: it keeps the chapter’s claims open to discussion and challenge (see “Controversies and criticisms” below) instead of letting them sink into preaching.
Tactical programming (section 3.1)
From the book
Tactical programming is mainly about getting something to work—a new feature, say, or a bug fix. On the face of it, that is perfectly sensible: is anything more important than code that works? The author’s view, though, is that tactical programming makes a good system design all but impossible.
The trouble is that it is short-sighted. When you’re racing to finish a task (possibly against a hard deadline), thinking ahead isn’t a priority; you won’t put much time into searching out the best design, since all you want is to get something running fast. You tell yourself that a little extra complexity, or one or two small kludges, is fine as long as it gets the current task done sooner.
And that is exactly how a system ends up complicated. As the previous chapter explained, complexity is incremental: a system doesn’t get complicated because of any one thing, but because dozens, even hundreds, of small things add up. Each tactical task contributes a few of them, and each one looks like a fair trade-off for getting the task done quickly; but they accumulate fast, especially once everyone is programming tactically.
Before long some of that complexity begins to cause trouble, and you start regretting the corners you cut early on. Yet you tell yourself that making the next feature work outranks going back to refactor: refactoring might pay off eventually, but it would certainly hold up the task in front of you. So whenever a problem comes up, you reach for a quick patch to get around it; the patches add more complexity, which calls for still more patches. Soon the code is a mess, so bad that cleaning it up would take months. There is no room in the schedule for a delay like that, and fixing one or two problems doesn’t seem to make a difference, so you keep programming tactically. The author’s verdict: once you are on the tactical path, it is hard to change course.
The tactical tornado
In almost every software development organization there is at least one developer who pushes tactical programming to its limit; the author calls such a developer a “tactical tornado”:
The tactical tornado is a prolific programmer who pumps out code far faster than others but works in a totally tactical fashion.
When it comes to getting a feature working quickly, no one is faster than a tactical tornado. In some organizations, management treats them as heroes, but they leave a trail of destruction behind them, and the engineers who later have to work with their code rarely see them as heroes. It’s usually other engineers who clean up the mess the tactical tornado leaves behind, which makes those engineers—the real heroes—look like they’re making slower progress than the tactical tornado.
My reading
(1) The “reasonableness” of tactical programming is exactly what makes it dangerous. The author first concedes that “getting code working” sounds entirely reasonable—no one would argue that code shouldn’t work. The problem is its time horizon: when the goal is “finish the current task as fast as possible,” any consideration for the future looks like waste. So tactical programming is not “the choice of bad people”; it is the natural choice of any rational person under short-term incentives. To change it, you must change the incentives or the horizon, not hope for individual enlightenment.
(2) The structure of the vicious cycle is “every step is reasonable.” Take the cycle apart:
Crunch → accept a small kludge → complexity accumulates → problems appear
↑ │
└── "the next feature matters more" ← fixing one makes no visible difference ←─┘Each decision is locally optimal at the time, but the overall result is the worst possible—the same structure as the tragedy of the commons analogy I used in my Chapter 2 notes (the tragedy of the commons is my analogy, not in the book). And “fixing one or two problems doesn’t seem to make a difference” corresponds exactly to what section 2.4 said: once complexity has accumulated, fixing a single dependency or a single piece of obscurity doesn’t by itself bring visible improvement.
(3) The tactical tornado: a parable about metrics. This is the most vivid—and most painful—part of the chapter. Its core insight is not “these people are annoying,” but: when an organization measures engineers by the speed at which they produce code, it manufactures tactical tornados and misjudges the real heroes (the cleaners) as inefficient. This is a classic case of metric corruption (Goodhart’s law: when a measure becomes a target, it ceases to be a good measure). Worse, the cleaner’s work is often invisible—no one applauds “the failure that didn’t happen.”
(4) The connection to “zero tolerance.” Section 2.4 demands “zero tolerance” for complexity; this section explains why: because once you accept the first small piece, every subsequent piece becomes easier to accept. The difficulty of turning back from the tactical path is not a matter of willpower, but because each step creates the justification for the next.
Strategic programming (section 3.2)
From the book
To become a good software designer, you first have to recognize that working code isn’t enough: bringing in complexity you don’t need, just to finish the current task faster, is not acceptable. What counts most is the system’s structure over the long term. Since, in any system, most of the code comes from extending code that is already there, a developer’s most important job is to make future extensions easier. So “working code” shouldn’t be your main aim, even though the code of course has to work:
Your primary goal must be to produce a great design, which also happens to work.
That is what strategic programming means. It calls for an investment mindset: instead of taking the quickest route to finishing the current project, you put time into improving the system’s design. In the short run these investments make you a little slower; in the long run they make you faster (Figure 3.1).
Some investments are proactive. For instance, spend a little more time on each new class, looking for a simple design: instead of building the first solution you think of, try a few alternatives and choose the cleanest. Picture how the system may need to change in the future, and make sure your design will make those changes easy. Taking the trouble to write good documentation is also a proactive investment.
Other investments are reactive. However much you put in up front, you are bound to get some design decisions wrong, and as time goes by those mistakes come to light. When you find a design problem, don’t look the other way, and don’t patch around it either; spend the bit of extra time it takes to fix it. Strategic programming means improving the system’s design continually, in small steps—the very opposite of tactical programming, which continually adds complexity one small piece at a time and stores up problems for the future.
My reading
(1) “Working code isn’t enough” is a reversal of perspective. Tactical programming treats “working” as the finish line; strategic programming treats it as the starting point. The author’s argument rests on a fact: most code in a system is written by extending existing code. So the most important “user” of the code you write today is the person who will build on it in the future (very likely yourself). If the goal is “make future extensions easy,” the evaluation criterion shifts from “does it work” to “can others easily continue building on top of my code.”
(2) “The main goal is to turn out a good design that happens to work as well”—it sounds like putting the cart before the horse, but it isn’t. The author isn’t saying “don’t care whether it works” (he states plainly that the code of course has to work); he is reordering priorities: when “fast” and “good” clash, “good” wins by default. This fits what Ousterhout says in Chapter 1, that “the biggest constraint on writing software is understanding”—because understanding is the bottleneck for every extension that comes after.
(3) Proactive and reactive investment are complementary mechanisms.
| Proactive investment | Reactive investment | |
|---|---|---|
| When it happens | Before / while writing new code | After a problem is discovered |
| Typical actions | Try several designs; consider future changes; write good documentation | Fix design problems when found, don’t patch around them |
| Corresponding book sections | Chapter 11 Design it twice; Chapter 6 generalization; Chapters 12, 13, 15 comments | Section 16.1 Stay strategic |
| Failure mode | Not doing it → going with the first solution you thought of | Not doing it → “working around it” → Chapter 2’s unknown unknowns |
| Excess mode | Over-designing for a future that never comes (violating YAGNI) | Changing for the sake of changing, rewriting everything every time |
(4) The tension between “imagine a few possible future changes” and YAGNI. The author suggests “imagining how the system might need to change in the future and making sure those changes will be easy under your design.” This seems to conflict with the agile community’s YAGNI (You Aren’t Gonna Need It—don’t build features you don’t need), but they operate at different levels: YAGNI objects to implementing in advance features that aren’t needed yet; Ousterhout advocates not letting the design preclude possible changes—encapsulating design decisions in modules (Chapter 5) rather than writing them out ahead of time. Section 6.1 puts it even more directly: a module’s functionality should reflect current needs, but its interface should not be shackled to current needs. The former is “don’t do extra”; the latter is “don’t do it in a way that’s hard to change.”
How much to invest? (section 3.3)
From the book
A big investment up front (trying to design the whole system correctly in a single pass, for example) isn’t effective: that is the waterfall model, and we know it fails. The ideal design often takes shape a little at a time, as your experience with the system grows. So what works best is a steady stream of many small investments:
I suggest spending about 10–20% of your total development time on investments.
That share is small enough not to hurt your schedule noticeably, yet big enough to pay off substantially over time. Your early projects will therefore need 10–20% more time than if you had gone purely tactical; the extra time buys a better design, you start to see the benefits within a few months, and before long your pace beats the tactical one by at least 10–20%. At that stage the investment has become “free”: the time your earlier investments have saved you is enough to pay for the ones still to come.
Tactical programming works the other way round: your first projects go 10–20% faster, but development slows down more and more as complexity piles up, and before long you are at least 10–20% slower than with the strategic approach. The time you saved at the start is soon all handed back, and for whatever life the system has left, development stays slower. If you have never had to work in a codebase in serious decay, the author says, ask people who have been through it; they will tell you that bad code quality makes development at least 20% slower.
Technical debt: the problems that tactical programming causes often go by the name technical debt. Programming tactically means borrowing time from the future: you move faster now and slower later. As with a money loan, you end up paying back more than you took out; unlike a money loan, most technical debt is never fully paid off, and you just keep on paying.
Figure 3.1 and payback time: Figure 3.1 draws two progress curves, one tactical and one strategic. The tactical curve climbs faster at first, but complexity also piles up faster under that approach, dragging productivity down; given enough time, the strategic curve ends up ahead. In the caption the author explains that the figure is only a qualitative sketch, and that as far as he knows, nobody has measured the exact shape of the curves empirically.
Figure 3.1 raises a question: where do the two curves cross? That is, how long does it take for the strategic approach to pay back? The author says he knows of no data on this, and a convincing controlled experiment would be hard to run; his personal view is:
My personal opinion is that the time to payback is somewhere in the range of 6–18 months.
Developers’ memory plays a big part in this: a few months on, the developer who wrote a piece of code has forgotten most of what was in their head at the time, and if the code is complex, development slows down noticeably; those extra costs soon cancel out that early edge (the original reads “initial gains from strategic programming”; from context it should mean the time tactical programming saves at the start, so it looks like a slip). Once again he stresses that this is only his personal opinion, with no data behind it.
My reading
(1) Why not a big up-front investment? This is the watershed between this chapter and “traditional engineering thinking.” The reason waterfall-style “design the whole system once” fails was covered in Chapter 1: a large system cannot be fully visualized before implementation. So the investment must be small and continual—the same logic as incremental development, seen from the other side. In other words, “strategic” does not mean “up-front design”; it means “continual design.” This is a common misreading (see “Strategic programming is not big up-front design” below).
(2) 10–20% is a “budget,” not a “law of proportion.” The number the author gives looks specific, but his argument is qualitative: small enough not to significantly affect the schedule (10–20% more time initially), large enough to produce significant long-term benefits. Its real value is turning “refactoring” from a moral appeal to be done “when there’s time” into a work item with an explicit budget—reserving 1–2 days per sprint for design improvements, rather than hoping to “get to it after this crunch.”
(3) The mechanism of “the investment becomes free.” This is an insightful formulation: once the time saved by past design investments ≥ the time required for future ongoing investments, the investment is, in net effect, free. But note the premise: it must be continual—if you stop investing, the saved time gets eaten up by newly accumulated complexity.
(4) The author’s intellectual honesty. This chapter explicitly declares a lack of data on two things: the figure caption says he knows of no empirical measurements of the exact shapes of the curves (the qualitative shape—tactical faster at first, strategic pulling ahead later—is what the author explicitly claims); the payback paragraph begins by saying he knows of no data on this, and ends by emphasizing again that it’s only a personal opinion, unsupported by data. The 10–20% is the author’s suggested value, and “poor code slows development by at least 20%” is a rule of thumb—the author tells readers to ask people who have experienced it. “Controversies and criticisms” below discusses how this honesty is both the chapter’s strength and its most questioned aspect.
(5) “Developer memory” is the key to the payback mechanism. The author explains why the payback takes only months to a bit over a year: because after a few months, even the author himself has forgotten why he wrote it that way—at that point, the code’s “understandability” becomes the only thing you can rely on. This is consistent with Chapter 2’s point that complexity is more apparent to readers than to writers: six months later, you are your own “reader.”
Startups and investment (section 3.4)
From the book
In some settings, strong forces push against the strategic approach. Early-stage startups, for instance, are in a rush to get early releases out the door, and even a 10–20% investment looks like more than they can afford. So many startups go the tactical route: they put very little effort into design, and even less into cleaning up when problems appear. They reassure themselves that if they succeed, there will be money to hire more engineers to sort it all out.
The author’s rebuttal has three parts:
- Once a codebase turns to spaghetti, it is almost impossible to fix; you will likely pay high development costs for the entire life of the product.
- The payoff from good design (or the cost of bad design) comes fairly quickly, so the tactical approach probably isn’t even faster for the first version.
- How good a company’s engineers are is one of the biggest factors in whether it succeeds. If you want to bring development costs down, your best move is to hire excellent engineers: they cost only slightly more than mediocre ones, yet they are far more productive. And top engineers care a lot about good design. If your codebase is known to be a mess, word spreads and recruiting gets harder; in the end you may well be left with only mediocre engineers, which drives future costs up and will quite likely degrade the system’s structure further.
Facebook: the author holds up Facebook as an example of a startup where tactical programming was encouraged. “Move fast and break things” served as its motto for many years: new engineers straight out of school were urged to jump right into the company’s codebase, and it was common for a new hire to be pushing commits to production within their first week. The good side was that this earned Facebook a reputation for empowering its people: engineers had enormous freedom, and hardly any rules or restrictions got in their way. As a business, Facebook has been hugely successful, yet the tactical approach cost its codebase dearly: a lot of it was unstable and difficult to follow, with almost no comments or tests, and painful to change. Bit by bit the company recognized that this culture could not last, and in the end it swapped the motto for “Move fast with solid infrastructure”, urging its engineers to put more effort into good design. Whether Facebook can fully clean up what years of tactical programming left behind remains to be seen. The author is fair to Facebook, too: as startups go, its code is probably not much below average; tactical programming is widespread in startups, and Facebook is merely an unusually visible example.
Erratum: the book writes Facebook’s new motto as “Move fast with solid infrastructure,” but what Zuckerberg actually said in his keynote at the F8 conference on April 30, 2014 was “Move fast with stable infrastructure” (in a subsequent interview he said: “We’ve changed our internal motto from ‘Move fast and break things’ to ‘Move fast with stable infrastructure.’”). The most commonly cited written source for the old motto “Move fast and break things” is the founder’s letter in Zuckerberg’s 2012 IPO prospectus: “We have a saying: ‘Move fast and break things.’”
Google and VMware: the good news is that a strategic approach can win in Silicon Valley too. Google and VMware grew up in roughly the same period as Facebook, yet both took a more strategic path. Both placed great weight on high-quality code and sound design; both built ingenious products that use reliable software systems to solve complex problems; and both are famous in Silicon Valley for their strong technical cultures, and hardly any other company can rival them when it comes to recruiting top technical talent. These examples show that either approach can make a company successful, but it is far more enjoyable to work somewhere that values software design and keeps a clean codebase.
Addition: Google’s engineering practices are systematically described in Software Engineering at Google (edited by Winters, Manshreck, and Wright, O’Reilly 2020)—for example, “At Google, essentially every change is reviewed before being committed,” plus dedicated readability reviews. As for VMware’s engineering culture, apart from this book’s own account I haven’t found a credible independent source, so I won’t go into it here.
My reading
(1) Why is “we’ll hire people to clean up once we have money” an illusion? The book’s three reasons are already complete. Let me add a bit of my own inference (the book doesn’t argue this way): the cleaner’s output is invisible, and after a company succeeds, resources tend to go to new features rather than cleanup, so “clean up later” rarely actually happens. Chapter 16 of the book discusses how to stay strategic when modifying existing code.
(2) The ambiguity of the Facebook case. The author uses Facebook as the typical example of “tactical programming,” but at the same time admits it was “enormously successful as a company.” This makes the example more interesting than it appears: it shows that tactical programming does not necessarily lead to business failure—market timing, network effects, and talent density can all compensate for messy code. The author doesn’t deny this; his conclusion is restrained: “both approaches can make a company successful, but working in a clean codebase is more fun.” In other words, what he’s arguing for is engineering culture and long-term cost, not “tactical programming will kill your company.” Also, the author proactively adds a “to be fair” note: Facebook’s code is probably not much worse than the average startup’s—tactical programming is the norm in startups.
(3) The “engineer quality” argument is the most persuasive one. It ties design quality to hiring competitiveness: the best engineers care about design, and once a codebase gets a reputation as a mess, it’s hard to hire them—in the end you’ll most likely end up with mediocre engineers (let me extend this one step further: the good engineers you already have may leave too), which further accelerates the decline—a positive feedback loop of adverse selection. This argument holds especially well in industries with high talent mobility.
Conclusion (section 3.5)
From the book
Good design isn’t free: unless you keep investing in it, small problems pile up into large ones. Happily, good design pays for itself in the end, and sooner than you’d expect. The key is to stick with the strategic approach consistently, treating investment as a job for today rather than tomorrow. When a crunch hits, it is tempting to put the cleanup off until things calm down; but that is a slippery slope: when this crunch ends, another is almost certain to follow, and then another. As soon as design improvements start getting deferred, the deferral can easily become permanent, and the culture slides toward the tactical approach. The longer a design problem is left alone, the bigger it gets and the more daunting the fix looks, which makes it all the easier to keep putting off. What works best is for every engineer to keep investing small amounts in good design.
My reading
The conclusion elevates “investment” from a personal habit to a cultural level, and offers two practical principles:
- Consistency: not “invest when there’s time,” but invest every iteration—the same logic as dollar-cost averaging in investing: small, regular, uninterrupted contributions are more reliable than one big lump sum, and less likely to be interrupted by “we’re busy right now.”
- Today, not tomorrow: because when this crunch ends, another one is almost certain to come. It is a textbook slippery slope—each postponement makes the next one easier, while the problem keeps growing and the fix looks more and more daunting.
The final sentence—“every engineer makes continual small investments”—is the chapter’s core claim: design quality is not the responsibility of an architect alone, but the choice every person who writes code makes in every change. This is also a fundamental stance of the whole book: the principles are for every developer to use in daily work, not for a few experts to cite in reviews.
A few points worth thinking about
Strategic programming is not big up-front design
The most common misreading of this chapter is to understand “strategic” as “design everything before you code.” The author explicitly rejects this: a big up-front investment is the waterfall model, and waterfall “doesn’t work.” The essence of strategic programming is continual small investments—it is precisely against “doing it all at once.” A table can distinguish the three positions:
| Tactical programming | Waterfall / big design up front | Strategic programming (this book) | |
|---|---|---|---|
| When design happens | Almost never | All at the beginning | Throughout the life cycle |
| Form of investment | Zero | One big lump sum | Continual small amounts |
| Attitude toward change | Reactive coping | Trying to freeze it in advance | Letting the design accommodate change |
| Failure mode | Complexity accumulates | Design errors get frozen in, only patchable | Degrades into tactical if not sustained |
In other words, strategic programming = incremental development + a design budget set aside at every step. This is highly consistent in spirit with what Fowler calls “evolutionary design”—design is not a one-time product but evolves through continual refactoring, yet it still needs to be taken seriously. Fowler describes the abandoned design in Is Design Dead? (2000) this way:
“The design ends up being the aggregation of a bunch of ad-hoc tactical decisions, each of which makes the code harder to alter.”
—which is another definition of this chapter’s “tactical programming.” And Fowler’s premise is: “Only if you have testing, continuous integration, and refactoring can you practice simple design effectively.” That is, continual small investments need engineering infrastructure to support them (testing, CI, refactoring habits); otherwise “evolutionary design” degenerates into a pile of ad-hoc tactical decisions.
The honesty and limits of Figure 3.1
In the caption the author says plainly that the figure is “purely qualitative” and that he “knows of no empirical measurement of exactly how the curves are shaped”. That is to the chapter’s credit—it doesn’t dress itself up as science—but it is also its biggest weak spot: the chapter’s entire economic argument rests on an assumption that has never been measured.
Here’s one way to assess the credibility of that assumption:
- Credible in direction: complexity accumulation slows development—hardly controversial in the engineering world; Chapter 2 already explained the mechanism.
- Uncertain in magnitude: 10–20% is a “reasonable small amount,” not a measurement; the 6–18 month crossover point is the author’s personal estimate.
- One structurally noteworthy point: the author attributes the payback to “the decay of developer memory”—after a few months, even the original author has to re-read the code. This means the payback time depends on the code’s age structure: a project that constantly rewrites young code will pay back more slowly; a project that maintains old code for a long time will pay back faster.
What relevant empirical research exists? The author says he knows of no data; the industry does have some correlational studies that provide circumstantial evidence for the “quality → speed” direction, but none can directly prove a 6–18 month payback period:
| Study | Sample | Conclusion | Limitations |
|---|---|---|---|
| Nagappan, Maximilien, Bhat, Williams (2008) | 3 Microsoft teams + 1 IBM team, comparing TDD vs. non-TDD | Defect density reduced by 40–90%; teams subjectively felt initial development time increased by 15–35% | Time data is subjective perception, not measurement; about TDD, not design investment |
| Tornhill & Borg (2022) | 39 proprietary codebases | “low quality code contains 15 times more defects”; fixing problems takes 124% more time | Quality metrics come from the authors’ company (CodeScene) |
| Borg, Tornhill, Mones (2023) | 40 proprietary repositories | In low-quality code, marginal owners (developers who contributed little to that code) take 45% more time for small changes and 93% more for large ones | Only about marginal owners; quality metrics also from CodeScene; all correlational studies |
These studies show the “direction” is credible, but the “magnitude” and “payback time” still depend on the specific project—consistent with the author’s honest declaration.
The tactical tornado: an organizational incentive problem
The tactical tornado exists in organizations and gets treated as a hero because it precisely caters to short-term visible metrics: commit counts, feature delivery speed, tickets closed. The value of strategic investment is long-term and invisible—no one gives bonuses for “the failure that didn’t happen” or “the complexity that didn’t accumulate.”
Therefore, solving the tactical tornado problem can’t rely on “educating the tornado themselves”; it requires changing metrics and incentives:
- Make “code review comments” and “design improvement PRs” part of visible output;
- Make the cleaner’s work visible (for example, track refactoring PRs separately);
- Evaluate engineers by the team’s long-term delivery rate, not individual short-term output;
- Explicitly reject “brilliant jerks” in the culture—Netflix’s 2017 culture memo is a famous example of this stance: “On a dream team, there are no ‘brilliant jerks.’ The cost to teamwork is just too high.”
What “technical debt is never repaid” means
The author says “most technical debt is never repaid,” and this differs from the financial debt analogy in one important way: financial debt has a clear principal and interest, while the “interest” on technical debt is paid in the speed of all future developers, and there is no moment of “paying it off”—you can only keep paying it (through continual refactoring) to keep the interest from snowballing. So the value of the “technical debt” metaphor is in explaining “why it keeps getting slower,” not in implying “you can pay it off once and for all.”
Extensions and additional examples
Proactive investment: two designs for the same requirement
Requirement: a notification service that initially only supports email; product says “we might add SMS later.”
// Design A: the first idea that comes to mind—hardcode the "channel" into the method name
public class Notifier {
public void sendEmail(String to, String subject, String body) { ... }
}// Design B: half an hour more—make "channel" an interface, with email as its first implementation
public interface Channel {
void send(Message msg);
}
public class Notifier {
private final List<Channel> channels;
public void notify(User user, Message msg) {
for (Channel ch : channels) ch.send(msg.forUser(user));
}
}
public final class EmailChannel implements Channel { ... }Design B’s “investment” is half an hour (defining the interface + moving the email logic into it); the “return” is that when SMS or push notifications arrive, you don’t need to change Notifier, don’t need to change callers—just add a new Channel implementation. This is exactly what “imagine how the system might need to change in the future, and make sure it’s easy” means—not writing the SMS feature in advance, but making the design not preclude it.
Reactive investment: the Boy Scout Rule
The “Boy Scout Rule” from Chapter 1 of Clean Code—“Leave the campground cleaner than you found it.”—is the most concise expression of reactive investment. Martin’s addition: “If we all checked-in our code a little cleaner than when we checked it out, the code simply could not rot.” Applied to a single PR:
// You came to fix a bug: the amount was calculated with double, causing rounding errors
- double total = price * qty;
+ BigDecimal total = price.multiply(BigDecimal.valueOf(qty)); // price is now BigDecimal
// While you're here (a few dozen seconds):
+ // Rename 3 occurrences of "price" to "unitPrice" (it was being confused with "totalPrice")
+ // Add a unit comment to qty: quantity, in piecesThe key is “while you’re here” and “small”: if a bug-fix PR turns into a 2000-line refactoring along the way, that’s not a small investment—it’s a different kind of risk. The correct use of the Boy Scout Rule is: each time, leave the code only a little better than you found it; don’t make one PR carry two jobs.
A tactical tornado’s day vs. a real hero’s day
Tactical tornado (Monday):
09:00 Requirement: "users can log in with their email"
09:30 Wrote LoginServlet, directly SELECT * FROM users WHERE email=? AND password=?
10:00 Passwords compared in plaintext ("we'll add hashing later")
11:00 SQL concatenated directly in the JSP ("just get it running")
12:00 Committed 800 lines, demo passed, praised in the group chat as "so efficient"
14:00 Next requirement...
Cleaner (three weeks later):
Read LoginServlet (no comments, no tests)
Found SQL injection vulnerability → changed everything to parameterized queries
Found plaintext passwords → introduced hashing + migration script
Found SQL in JSP → moved it to a DAO, added tests
Submitted PR: +300 / -600 lines, questioned in review: "why so many changes?"
This week's "tickets closed" count: 0Who looks more efficient in the metrics? Who makes the system healthier? This is exactly what the author means by “the real heroes look slower.”
Startups and the Technical Debt Quadrant
Martin Fowler’s “Technical Debt Quadrant” classifies debt along two dimensions: deliberate / inadvertent × prudent / reckless.
| Prudent | Reckless | |
|---|---|---|
| Deliberate | The team knows it’s taking on debt and weighs the benefit of shipping early against the cost of repayment: “to make the release before the trade show, we’ll do it this way and refactor in the second week after launch” | “decide to go ‘quick and dirty’ because they think they can’t afford the time required to write clean code” |
| Inadvertent | “while you’re programming, you are learning”—only while writing do you realize how it should have been done; Fowler considers this kind of debt unavoidable | “A team ignorant of design practices is taking on its reckless debt without even realizing” |
Use this framework to look at the chapter’s criticism of startups. The book doesn’t use this quadrant, but the positions line up: the “we’ll hire people to clean up once we succeed” criticized in section 3.4 is, in the quadrant, deliberate debt with no credible repayment plan; the reactive investment of section 3.2 (fix design problems when you find them) addresses exactly the inadvertent debt of “only while writing do you realize how it should have been done.” Prudent, deliberate debt is acknowledged in section 16.1: if the “right” refactoring would take three months and a stopgap fix would take two hours, in a crunch you may have to settle for the stopgap; but the author asks you to resist this compromise as much as possible—first see if there’s a nearly-as-clean solution that can be done in a few days, and if not, get your manager to set aside time to come back to it after this deadline. That is, the author doesn’t reject deliberate debt with a repayment plan; he just treats it as an unavoidable exception.
Putting 10–20% into daily practice: four approaches
| Approach | How | Type of investment |
|---|---|---|
| A “design day” per sprint | In a 2-week sprint, reserve 1 day (about 10%) specifically for design improvements, with no features scheduled | Reactive investment |
| Write two designs for a new module | For a new class or service, first write out two interfaces on paper or in comments, then choose | Proactive investment (Chapter 11) |
| A “small improvements” allowance in PRs | Allow each PR to include up to about 10% of unrelated small improvements | Reactive investment (Boy Scout Rule) |
| A problem list | When you find a design problem but can’t fix it now, file it as an issue and schedule it in the next sprint—rather than forgetting it | Keeps reactive investment “from getting lost” |
Connections to other ideas
| Idea | Main point | Relationship to this chapter |
|---|---|---|
| Technical debt (Cunningham 1992) | “Shipping first time code is like going into debt. A little debt speeds development so long as it is paid back promptly with a rewrite. … Every minute spent on not-quite-right code counts as interest on that debt.” | This chapter uses the metaphor directly, and adds a key difference: most technical debt is never repaid |
| Technical Debt Quadrant (Fowler 2009) | deliberate / inadvertent × prudent / reckless | Provides finer judgment for “startup debt” (see above) |
| Evolutionary design (Fowler “Is Design Dead?”, XP 2000 keynote) | “The design ends up being the aggregation of a bunch of ad-hoc tactical decisions, each of which makes the code harder to alter.”; continual investment needs testing, continuous integration, and refactoring as support | Highly consistent with this chapter’s “continual small investments”; both reject “big design up front” |
| Sustainable pace (Agile Manifesto 2001, principle 8) | “Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely.” | Corresponds to the conclusion’s warning about “after this crunch there will be another” |
| Boy Scout Rule (Martin, Clean Code 2008, Ch. 1) | “Leave the campground cleaner than you found it” | The most concise expression of reactive investment; Ousterhout and Clean Code agree on this point |
| Goodhart’s law | When a measure becomes a target, it ceases to be a good measure | Explains why “evaluating engineers by output” manufactures tactical tornados |
| Netflix culture memo (2017 version) | “On a dream team, there are no ‘brilliant jerks.’ The cost to teamwork is just too high.” | The same kind of organizational phenomenon as the “tactical tornado” |
| Google’s engineering practices (Software Engineering at Google, 2020) | “At Google, essentially every change is reviewed before being committed.”; plus dedicated readability reviews | A concrete piece of evidence for “Google took a more strategic approach”; the “The Genius Myth” section in Chapter 2 is comparable to the “tactical tornado” |
| Forgetting curve (Ebbinghaus 1885/1913) | After learning nonsense syllables, about 1/3 remembered after 24 hours, about 1/4 after 6 days, about 1/5 after a month | An analogy for “after a few months the developer forgot why they wrote it that way”—but the original experiment was one person memorizing nonsense syllables, so it can only serve as an analogy |
| Empirical TDD research (Nagappan, Maximilien, Bhat, Williams 2008) | Microsoft/IBM cases: defect density reduced by 40–90%; initial development time subjectively felt to increase by 15–35% | Not a direct study of “design investment,” but one of the few data-backed empirical studies of “up-front investment vs. long-term return” |
| Correlational studies of code quality and development speed (Tornhill & Borg 2022; Borg et al. 2023) | Low-quality code has 15 times more defects; in low-quality code, marginal owners are 45–93% slower | Provides circumstantial evidence for the “quality → speed” direction; all correlational, metrics from a commercial vendor |
Controversies and criticisms
| Point of contention | The chapter’s position | The challenge | My assessment |
|---|---|---|---|
| The basis for 10–20% | Invest about 10–20% of time, continually | Where does the number come from? Is it the same for different project types (prototype, long-term platform, embedded)? | The author gives a suggested value; the book has no data. Its value is in providing an actionable default, not a universal law |
| Payback time of 6–18 months | Personal estimate | No data; does it still hold for projects with a life shorter than 6 months? | The author explicitly declares “this is only my opinion”; for short-lived projects, tactical programming may indeed be rational |
| “Poor code slows development by at least 20%” | Rule of thumb | Also no data | The author suggests “ask someone who has experienced it”—an experiential argument, not a scientific one |
| Strategic vs. YAGNI | Imagine future changes and let the design accommodate them | Could this lead to over-design? | The author’s boundary is “accommodate,” not “implement”; but in practice the line is easy to cross |
| The Facebook case | Tactical programming damages the codebase | Facebook was enormously successful commercially; a company’s success has many factors | The author admits “both approaches can succeed”; his claim is about long-term cost and work experience, not business success or failure |
| “Companies with good design attract better talent” | Great engineers care about design | In a talent-scarce market, companies with messy codebases can still hire | This is a directional judgment, not a law; it holds better in talent-rich markets |
| Disagreement with Clean Code | This chapter agrees with Clean Code on “investment” | But the two differ greatly on “what good design is” (function length, comments, TDD) | What they agree on is the mindset; what they differ on is the means—also the subject of sections 9.8, 12.6, and 19.4 of the book |
The chapter’s argumentative style: among the chapter’s numbers, only the 6–18 month payback period comes with a “no data” declaration (the figure caption separately notes that the exact shapes of the curves have not been measured); 10–20% is the author’s suggested value, and “slows by at least 20%” appeals directly to experience. This is both a sign of honesty and a sign that the chapter is closer to an experience-based argument than an empirical conclusion. Readers should treat it as a “default strategy worth adopting,” not a “proven law.”
Checklist
As an individual developer
- When writing a new module, did I consider at least two designs? (Proactive investment)
- Did I spend a few minutes thinking “what future change would this design make difficult”? (Proactive investment)
- When I found a design problem, did I fix it, record it, or work around it? (Reactive investment)
- How many “small kludges” did this change introduce? Can I get that number to zero?
- Am I measuring myself by “output speed” while ignoring “what I’m leaving behind”?
As a team / lead
- Is there an explicit design improvement budget (about 10–20%) in the sprint?
- Are refactoring, documentation, and design discussions treated as “output,” rather than “not doing real work”?
- Do the metrics only look at short-term delivery? Is the cleaner’s work visible?
- Is there a “tactical tornado” being treated as a hero? Does the culture explicitly reject “brilliant jerks”?
- Does anyone say “we’ll clean up after this crunch”?—that’s exactly where the slippery slope begins
- Is there a “design problem list” so that discovered problems don’t get lost?
As a startup
- Does “we’ll clean up once we have money” have a concrete repayment plan? If not, it’s reckless debt
- New hires can push to production in their first week—is that empowerment, or a sign of missing design constraints?
- Is the messy codebase hurting hiring?
Key terms
| English | Chinese | Meaning in this chapter |
|---|---|---|
| tactical programming | 战术编程 | A mindset aimed at “getting the current feature working as fast as possible,” accepting a little complexity each time |
| strategic programming | 战略编程 | A mindset whose primary goal is “producing a great design,” making continual small design investments |
| investment mindset | 投资心态 | A bit slower in the short term, much faster in the long term |
| proactive investment | 主动投资 | Trying several designs before writing new code, considering future changes, writing good documentation |
| reactive investment | 被动投资 | Fixing design problems when found, rather than working around them |
| tactical tornado | 战术龙卷风 | A developer with extremely high output who works in a totally tactical fashion; treated as a hero by management in some organizations, but a disaster for maintainers |
| working code isn’t enough | 能跑的代码不够 | The first lesson of strategic programming |
| technical debt | 技术债 | Time borrowed by tactical programming; the interest is paid by future developers, and most of it is never repaid |
| crossover point | 交叉点 | The point where the strategic curve overtakes the tactical curve (the author estimates 6–18 months) |
| slippery slope | 滑坡 | “We’ll clean up after this crunch” → another crunch comes → postponement becomes permanent, culture slides toward tactical programming |
| kludge | 凑合的修补 | Avoidable complexity introduced to meet a deadline |
| Boy Scout Rule | 童子军规则 | Leave the campground cleaner than you found it (the most concise expression of reactive investment; an extended concept) |
| Technical Debt Quadrant | 技术债象限 | deliberate/inadvertent × prudent/reckless (an extended concept) |
Questions to think about
- Explain in your own words: why does “getting code working” sound reasonable as a goal, yet “almost never produce a good design”?
- Draw the vicious cycle of tactical programming, and identify which step in the cycle is a “locally optimal but globally worst” decision.
- The author says “the main goal is to turn out a good design that happens to work as well.” Is that putting the cart before the horse? How does he square it with “the code has to work”?
- Give one example each of proactive and reactive investment. Which is more easily neglected? Why?
- Why does the author oppose “a big up-front investment”? How does this relate to Chapter 1’s criticism of the waterfall model?
- What is the nature of the two numbers 10–20% and 6–18 months? If someone asked you to prove them with data, how would you respond?
- What arguments does the author use to rebut “startups can hire people to clean up once they have money”? Which do you find most persuasive? Which is weakest?
- Does the Facebook example support or weaken the author’s claim? Why does the author still cite it?
- Does “strategic programming” conflict with YAGNI? Where is the boundary?
- Think about your team: is there a “tactical tornado”? Is there a “real hero who looks slow”? Is the metric system rewarding the wrong people?
- The conclusion says “investment is something to do today, not tomorrow.” When was the last time you said “after this crunch”? What happened afterwards?
Next
Chapter 3 deals with the mindset question of “why invest in design.” Chapter 4 moves on to where the investment should go, and the first, and most important, direction is module depth: deep modules, whose interface is far simpler than the implementation behind it; shallow modules, whose interface is almost as complex as the implementation; and “classitis”—splitting things up for the sake of splitting them up.
Appendix: this chapter’s principles
- Working code isn’t enough (principle 2 in the book’s summary table)
- Make continual small investments to improve system design (principle 3)
This chapter introduces no new red flags, but it explains why red flags accumulate: every decision to “leave this red flag for now” is an act of tactical programming.
Sources
The book
- John K. Ousterhout, A Philosophy of Software Design, 2nd Edition, Yaknyam Press, 2021: Chapter 3 (3.1–3.5), Figure 3.1, section 16.1, the summary table of principles at the end of the book
Facebook mottos
- Zuckerberg’s founder’s letter in the 2012 IPO prospectus (“Move fast and break things”): https://mashable.com/archive/facebook-move-fast-break-things
- Interview after the F8 conference in April 2014 (“Move fast with stable infrastructure”): https://finance.yahoo.com/news/mark-zuckerberg-explains-why-facebook-221322783.html ; https://www.businessinsider.com/heres-facebooks-new-motto-2014-4
Technical debt and design methods
- Cunningham, W. (1992). The WyCash Portfolio Management System. OOPSLA ‘92 Experience Report. http://c2.com/doc/oopsla92.html
- Fowler, M. TechnicalDebtQuadrant (2009-10-14). https://martinfowler.com/bliki/TechnicalDebtQuadrant.html
- Fowler, M. Is Design Dead? (written for the XP 2000 keynote, revised May 2004). https://martinfowler.com/articles/designDead.html
- Martin, R. C. Clean Code (2008), Ch.1 “Clean Code” (the Boy Scout Rule). Excerpt: https://www.informit.com/articles/article.aspx?p=1235624&seqNum=6
- Agile Manifesto principles (2001). https://agilemanifesto.org/iso/en/principles.html
Organizational culture
- Netflix culture memo (versions from 2017 onward; the 2009 version was a 125-page slide deck). https://jobs.netflix.com/culture
- Winters, T., Manshreck, T. & Wright, H. (eds.) Software Engineering at Google. O’Reilly, 2020. https://abseil.io/resources/swe-book (“The Genius Myth” in Chapter 2 “How to Work Well on Teams”; Chapter 9 “Code Review”)
Empirical research
- Nagappan, N., Maximilien, E. M., Bhat, T. & Williams, L. (2008). Realizing quality improvement through test driven development: results and experiences of four industrial teams. Empirical Software Engineering, 13(3), 289–302. https://doi.org/10.1007/s10664-008-9062-z
- Tornhill, A. & Borg, M. (2022). Code Red: The Business Impact of Code Quality. arXiv:2203.04374. https://arxiv.org/abs/2203.04374
- Borg, M., Tornhill, A. & Mones, E. (2023). U Owns the Code That Changes and How Marginal Owners Resolve Issues Slower in Low-Quality Source Code (EASE 2023). arXiv:2304.11636. https://arxiv.org/abs/2304.11636
Psychology analogy
- Ebbinghaus, H. Über das Gedächtnis (1885); English translation Memory: A Contribution to Experimental Psychology (1913). https://psychclassics.yorku.ca/Ebbinghaus/