本文由 AI 分析生成
建立時間: 2026-03-28 來源: https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/
Summary
Joel Spolsky’s classic 2000 essay arguing that rewriting software from scratch is the single worst strategic mistake a software company can make. Uses Netscape 4 → 6 as the primary case study, alongside Borland and Microsoft examples. The core insight: “it’s harder to read code than to write it,” and old code carries invisible accumulated bug fixes.
Joel Spolsky 2000 年的經典文章,認為從頭重寫軟件是軟件公司可能犯的最嚴重戰略錯誤。以 Netscape 4→6 為主要案例,並引用 Borland 和微軟的例子。核心洞察:「讀代碼比寫代碼難」,舊代碼攜帶著無形的累積錯誤修復。
Key Points
- Never rewrite from scratch — the single worst strategic mistake a software company can make
- Why engineers want to rewrite: “it’s harder to read code than to write it” — old code looks like a mess because you can’t read what you didn’t write, not because it’s actually bad
- Old code has value: every weird line is a bug fix. “Those are bug fixes. One of them fixes that bug that Nancy had when she tried to install the thing on a computer that didn’t have Internet Explorer…”
- What you’re throwing away: years of bug fixes, market leadership, 2-3 year competitive gift to rivals
- Three kinds of “mess”: (1) architectural problems — fixable by careful refactoring, (2) performance — only affects small parts, (3) ugly code — fix in five minutes with a macro
- Historical cases: Netscape (lost market share during 3-year rewrite), Borland Quattro Pro (rewrite let Excel win), Microsoft Word Pyramid project (killed before shipping)
- The alternative: refactor incrementally — rearchitect one component at a time without throwing away the codebase
- “Build one to throw away” is dangerous at commercial scale (fine for experimental code, fatal for products)
Insights
This essay remains required reading 25 years later because the instinct to rewrite is so deeply wired into programmers. The key mechanism Spolsky identifies — “harder to read than to write” — explains why every programmer thinks the previous programmer was incompetent. The bug-fix accumulation argument is underappreciated: every cryptic one-liner or conditional that seems redundant likely exists because something broke in production. Refactoring is the correct response to architectural debt; rewriting is the ego response. The Netscape case is historically confirmed: Mozilla’s rewrite from Netscape 4’s codebase took until 2002 to ship, by which time IE had won the browser war.
Connections
Raw Excerpt
When you throw away code and start from scratch, you are throwing away all that knowledge. All those collected bug fixes. Years of programming work. You are throwing away your market leadership. You are giving a gift of two or three years to your competitors, and believe me, that is a long time in software years.