1·Because of this I really like to use patterns after the fact, refactoring to patterns.
正因为如此,我喜欢在事后使用模式,重构程序,让模式显现出来。
2·If you run the program now, it produces exactly the same result as before, like any proper refactoring should.
如果您现在运行程序,那么将产生与以前完全相同的结果,像任何适当的重构应该的那样。
3·However, these differ from refactoring in that they add new functionality.
不过,这些特性与重构不同,因为它们添加了新功能。
4·One way is to have a thorough set of unit tests for the code: the code should pass the tests both before and after refactoring.
第一种方法是对代码进行一套完全彻底的单元测试:在重构之前和之后都必须通过这样的测试。
5·This refactoring of the class also improves the code so that we have separated the initialization code from the object construction code.
类的这种重构也会改进代码,因为我们将初始化逻辑从对象的构造函数分离出来了。
1·Long range, we should look for even more sophisticated tools, such as "pattern savvy" refactoring browsers that recognize USES (or potential USES) of design patterns in a program and apply them.
从长期来看,我们应寻找更卓越的工具,如“以模板为导向”的重整浏览器,它承认设计模板在程序中的使用(或潜在使用)并应用它们。
2·Therefore, a refactoring browser could potentially leverage the unit test suite to determine what aspects of behavior are important.
因此,重整浏览器可以潜在地利用一组单元测试来确定行为的重要方面。
3·Two of the most powerful forms of control are unit testing tools and refactoring browsers.
最强有力的两种控制形式是 单元测试工具和 重整浏览器。
4·Other aspects could be aggressively modified by the refactoring browser at will, in order to simplify the code.
其它方面应可以被重整浏览器积极地随意修改,以简化程序。
5·Continued improvements in refactoring tools.
重整工具中的持续改进。