Summary

Stella Wilson’s essay on how to think about code improvement without getting trapped by the anchor of how things currently are. The “magic wand” mental model: imagine the ideal design unconstrained by current reality, then use it as a target to identify what is necessary vs. accidental complexity, and chart an incremental path toward it.

Stella Wilson 關於如何在不被現狀錨定的情況下思考代碼改進的文章。「魔法棒」心智模型:想象不受當前現實限制的理想設計,然後用它作為目標來識別必要複雜性與偶然複雜性,並規劃漸進式的改進路徑。

Key Points

  • Big rewrites carry known risks: no guarantee of improvement, hidden edge cases, subjective bias toward your own code
  • The anchor problem (Adam Savage’s framing): existing code becomes an anchor on imagination — “what is” stops you from seeing “what could be”
  • Magic wand exercise: ask “if I could build this from scratch today, what would it look like?” — separates necessary from accidental complexity
  • Necessary vs. accidental complexity: the wand exercise reveals which complexity is inherent to the problem vs. which crept in through implementation history
  • Incremental path: once you have the ideal picture, you can identify individual components to improve without a full rewrite
  • This should be a regular exercise, not a one-time thought — the target evolves as you learn

Insights

The “magic wand” framing is a practical technique for escaping the status quo bias that makes codebases calcify. It’s more actionable than “write clean code” because it gives a concrete process: (1) imagine the ideal, (2) compare to reality, (3) identify the gaps that matter, (4) close them incrementally. The Spolsky/Netscape cautionary tale about big rewrites is the correct foil — this approach gives you the visioning benefit of a rewrite without the execution risk. The distinction between necessary and accidental complexity maps to Fred Brooks’s terminology and is a useful vocabulary for making the case for specific refactors.

Connections

Raw Excerpt

The goal is to separate yourself from how the project is now so you can consider a clear picture of what might be best. The reason this works is that it makes clearer what is the necessary complexity, and what is the accidental.