10. 概念的定义 Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure. – MartinFowler Refactoring is typically done in small steps. After each small step, you're left with a working system that's functionally unchanged. Practitioners typically interleave bug fixes and feature additions between these steps. So refactoring doesn't preclude changing functionality, it just says that it's a different activity from rearranging code. 名词:对软件结构的一种调整;目的是在 不改变软件之可察行为 ,提高可理解性,降低其修改成本。 动词:使用一系列重构准则,在 不改变软件之可察行为 前提下,调整其结构。 两顶帽子:添加新功能,重构。交替进行。 重构不是灵丹妙药,不是什么银弹,但是它是一把银钳子 ,测试,小修改,测试,小修改 重构不只是整理代码,高效且受控的代码整理技术,有一定重构准则。 概念——判断——逻辑,概念是抽象的结果,使得我们可以忽略细节,使得我们有限的心灵可以记忆管理更复杂更多的事情,定义了概念也方便我们交流沟通 概念还是要知道地!!!!