书名: Working Effectively with Legacy Code 作者: Michael C. Feathers 出版社/年份: Prentice Hall (Robert C. Martin Series), 2004 (本 PDF 版次 2005) 原文路径: dev/books/Working_Effectively_with_Legacy_Code_2005.pdf

阅读约定

每章按六段式中文模板输出:

  1. 章节概述 (5~10 条要点)
  2. 核心 Takeaways (是什么 / 为什么 / 解决什么 / 适用场景)
  3. 工程实践视角 (锁: Linux 系统开发 + 机器人软件)
  4. AI 时代视角 (含「AI 经常写错的地方」表 + 子段「AI 辅助遗留代码理解」)
  5. 实践行动项 (### A1 — 标题 格式, 必须可编译运行)
  6. 值得深入思考的问题

末尾追加 *下一章预告*

章节索引

章节标题PDF 页范围页数笔记
1Changing Software25-306pch01-changing-software.md
2Working with Feedback31-4212pch02-working-with-feedback.md
3Sensing and Separation43-508pch03-sensing-and-separation.md
4The Seam Model51-6616pch04-the-seam-model.md
5Tools67-7812pch05-tools.md
6I Don’t Have Much Time and I Have to Change It79-9820pch06-not-much-time.md
7It Takes Forever to Make a Change99-10810pch07-forever-to-change.md
8How Do I Add a Feature?109-12618pch08-how-do-i-add-a-feature.md
9I Can’t Get This Class into a Test Harness127-15832pch09-cant-get-class-into-harness.md
10I Can’t Run This Method159-17214pch10-cant-run-method-in-harness.md
11I Need to Make a Change. What Methods Should I Test?173-19422pch11-make-a-change-what-methods-to-test.md
12I Need to Make Many Changes in One Area195-20612pch12-many-changes-in-one-area.md
13I Need to Make a Change, but I Don’t Know What Tests to Write207-21812pch13-dont-know-what-tests-to-write.md
14Dependencies on Libraries Are Killing Me219-2202pch14-dependencies-on-libraries.md
15My Application Is All API Calls and No Logic221-23010pch15-application-is-all-api-calls.md
16I Don’t Understand the Code Well Enough to Change It231-2366pch16-i-dont-understand-the-code.md
17My Application Has No Structure237-24812pch17-my-application-has-no-structure.md
18My Test Code Is in the Way249-2524pch18-test-code-in-the-way.md
19My Project Is Not Object-Oriented. How Do I Make Safe Changes?253-26614pch19-not-object-oriented.md
20This Class Is Too Big and I Don’t Want It to Get Any Bigger267-29024pch20-class-too-big.md
21I’m Changing the Same Code All Over the Place291-31020pch21-changing-same-code-all-over.md
22I Need to Change a Monster Method and I Can’t Write Tests for It311-33020pch22-monster-method.md
23How Do I Know That I’m Not Breaking Anything?331-34010pch23-not-breaking-anything.md
24We Feel Overwhelmed. It Isn’t Going to Get Better.341-3466pch24-overwhelmed.md
25Dependency-Breaking Techniques (reference catalog)347-456110pch25-dependency-breaking-techniques.md

三大部分结构

  • Part I — The Mechanics of Change (PDF p.23-75, ch1-ch5): 概念框架
    • 改变的四种理由 / 反馈的工作方式 / 感知与分离 / seam 模型 / 工具
  • Part II — Changing Software (PDF p.77-344, ch6-ch24): 食谱 — 按”症状”分类的具体技巧
  • Part III — Dependency-Breaking Techniques (PDF p.345-435, ch25): 参考目录 — 25 个拆分依赖的手法