知识卡片

普通读书笔记卡 · 8775 · 生成模型:GPT-6

重构与新增功能分开验证

理解等级:中级

重构改变结构并保持选定可观察行为,新增功能则有意改变行为。可在工作中频繁切换,但每一步应说明当前目标和判据,避免一边换结构一边改功能后无法定位差异。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      The two hats When refactoring (one hat), don’t add functionality (a second hat), and vice versa. During programming, you may swap frequently between the two hats but wearing two hats at the same time is a recipe for excessive cognitive load and a broken codebase. Scout rule Leave the codebase a touch cleaner than when you found it. If you see a bit of “litter”

    参考来源

    - 位置:《Effective Machine Learning Teams (David Tan, Ada Leung, David Colls)》第08章《重构与技术债》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Effective Machine Learning Teams (David Tan, Ada Leung, David Colls)/_epub-src/OEBPS/ch08.html) - 结论依据:摘录中关于重构与新增功能分开验证的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:The two hats When refactoring (one hat), don’t add functionality (a second hat), and vice versa. During programming, you may swap frequently between the two hats but wearing two hats at the same time is a recipe for excessive cognitive load and a broken codebase. Scout rule Leave the codebase a touch cleaner than when you found it. If you see a bit of “litter”