知识卡片
坏味道清单是诊断起点
暴露细节、重复责任、含糊名称等是进一步调查信号,可形成明确改进待办。静态工具辅助发现局部问题,真正设计仍需理解职责;有注释不自动是坏代码,缺注释也不保证清晰。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
- · 重构与技术债
原书出处 · 1 处
- · 查看原书依据
3. List code smells. If you open a box of leftover dinner and something assails your sense of smell, it’s an indication that something has probably gone bad. Similarly, code smells are useful signals that point to deeper problems in the codebase. For example, a function with five lines of explanatory comments is a smell that suggests that the function could be convoluted, obscure (i.e.,
参考来源
- 位置:《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)
- 结论依据:摘录中关于坏味道清单是诊断起点的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:3. List code smells. If you open a box of leftover dinner and something assails your sense of smell, it’s an indication that something has probably gone bad. Similarly, code smells are useful signals that point to deeper problems in the codebase. For example, a function with five lines of explanatory comments is a smell that suggests that the function could be convoluted, obscure (i.e.,