principle-subtract-before-you-add
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSubtract Before You Add
先做减法,再做加法
When evolving a system, remove complexity first, then build. Deletion gives you a simpler base, which makes the next addition smaller and less brittle.
Why: Adding to a complex system compounds complexity. Removing first cuts the surface area, reveals the essential structure, and usually makes the next design obvious. Default to subtraction.
The pattern:
- Sequence removal before construction
- Cut before you polish (get to the minimum before investing in quality)
- Design for observed usage, not speculative edge cases
- No speculative validators, parsers, or guards beyond what the spec demands
- Out-of-spec features drag validators behind them. Persistence, retry-on-startup, and schema migration each need guards to defend their inputs.
- Simplify prompts (remove redundant instructions, excessive templates)
- When a reference has no novel content, delete it rather than leaving a stub
在迭代系统时,先移除复杂度,再进行开发。删除冗余内容能为你打下更简洁的基础,让后续新增的功能更轻量化、更不易出问题。
原因: 向复杂系统中添加功能会加剧复杂度。先做减法能减少系统的维护面,揭示核心结构,通常也会让后续设计方向变得清晰。优先选择减法。
模式要点:
- 先执行移除操作,再进行构建
- 先精简,再优化(在投入精力提升质量前,先缩减到最小必要规模)
- 基于实际使用场景设计,而非假想的边缘情况
- 不添加超出需求规格的校验器、解析器或防护逻辑
- 超出规格的功能会带来额外的校验需求。持久化、启动重试和 schema 迁移各自都需要防护逻辑来确保输入的有效性。
- 简化提示词(移除重复指令和冗余模板)
- 当引用内容没有新信息时,直接删除而非保留存根