Agile development methods, which add program features iteratively, depend on refactoring as a technique to alter and extend a program's design.
敏捷开发方法采用迭代方式增加程序特性,因此需要依赖于重构技术来改变和扩展程序的设计。
For really critical sections of your code, you might consider adding some functional tests as a safety net before you start refactoring.
对于代码中真正关键的部分,可能需要在进行重构之前添加一些功能测试作为一种安全保障。
As mentioned previously, in cases where this refactoring results in an error, whether flagged or not, you can continue by simply correcting the errors on a case-by-case basis.
前面提到过,在重构引发了问题的情况下,不管问题是否被标出,您都可以一个一个地修正这些问题,以继续下去。
Therefore, this preview does not only serve as a warning as to whether the refactoring should be performed at all.
因此,这个预览图不仅仅是对是否应该执行所有重构的警告。
He pioneered the use of refactoring as a vehicle for a VB 6 code upgrade to VB.net.
他首创了利用重构完成代码从VB6到VB.NET的升级。
As you'll see, db4o's ability to silently roll with updates and ensure consistency from code to disk takes a lot of the stress out of refactoring the persistence portion of your system.
您将看到,db4o能够静默地处理更新,并确保代码与磁盘的一致性,这大大减轻了重构系统中持久性存储的压力。
Adept refactoring folks will note that I could apply Extract Method as a further refinement to the code.
一些熟悉重构的人可能会说我应该使用ExtractMethod进一步对代码进行优化。
I'm going to stick with the simple solution for now, but I'll mentally flag the FrequentFlier field as a future refactoring point if requirements change.
现在我将使用简单的解决方案,但是如果需求发生了更改,我会将FrequentFlier字段标记为未来的一个重构点。
As of version 6.1, db4o automatically recognizes and handles three different kinds of refactoring: adding a field, removing a field, and adding a new interface to a class.
自6.1版开始,db4o能自动识别和处理三种不同类型的重构:添加字段、删除字段和添加一个类的新接口。
In this installment, I started the discussion about using refactoring as a tool to help understand and identify emergent design.
在本期文章中,我首先讨论了使用重构作为手段来帮助理解和识别紧急设计。
Tip: If you want the closed models to be considered, you need to perform a refactoring (as shown in Figure 16), not a simple rename.
提示:如果您想考虑这些封闭模型,您需要执行一次重构(如图16所示),而不是一次简单的重命名。
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.
从长期来看,我们应寻找更卓越的工具,如“以模板为导向”的重整浏览器,它承认设计模板在程序中的使用(或潜在使用)并应用它们。
The refactoring tool won't do this because it can't take account of the serious implications — such as threading concerns, naming, and availability in other methods — that such a decision entails.
重构工具做不到这一点,因为它不能考虑到这样一个决策细节的严重影响 —比如线程问题、命名和在其他方法中的可用性。
If a particular piece of source code exceeds a given threshold, it is flagged as a candidate for refactoring to improve maintainability.
如果特定片段的源代码超出了给定的范围,它会标示为重构的候选部分,以提高维护性。
XP as a discipline assumes a team is using all of the practices all of the time, but a team can pick a few practices and use them successfully (such as refactoring or pair programming).
作为规则,XP假设团队一直使用所有实践,但团队可以挑选几个实践,并成功使用它们(诸如重构或结对编程)。
Refactoring must become a key part of your software development activity, done in a methodical way using appropriate tools so as to progressively improve the quality of your code.
重构必须是软件开发活动中一个关键的环节,通过合适的工具,并采取系统的方法,可以逐步地改善代码的质量。
In some cases, the refactoring that needs to happen is a bit more drastic, such as changing the name of a class entirely (meaning either the class name or the package it lives in).
在某些情况下,需要发生的重构可能更剧烈一些,例如整个更改一个类的名称(可以是类名,也可以是类所在的包的名称)。
Along with the new refactoring functionality, a link is provided to change the binding style for the interface, as shown in Figure 8.
除了新的重构功能之外,还提供一个修改接口的绑定风格的链接,见图8。
As the name suggests, the convert local variable to field refactoring takes a local variable and converts it to a private field of the class.
正如其名称所示,这个ConvertLocalVariabletoField重构能够获取一个本地变量并将这个变量转换为此类的一个私有字段。
A similar refactoring of a Web method also needs to be applied in cases where an update operation is supported over HTTP GET, as shown in Listing 4.
当支持通过HTTP GET执行更新操作时,也需要应用类似的Web方法重构,如清单4所示。
So, once again, you can always "call back" old values by refactoring the field to the original value, which can either be viewed as a feature or a bug, depending on your point of view at the time.
因此,通过将字段重构回初始值,总可以 “回调”旧值,取决于观察问题的角度,这可以说是一个特性,也可以说是一个bug。
In his book, Refactoring, Martin Fowler describes the issue with the long Method code smell quite nicely as "the longer a procedure is, the more difficult it is to understand."
MartinFowler在他撰写的Refactoring这本书中,对代码中存在冗长方法的气味这个问题做了精妙的描述——过程越长,越难理解。
I use Eclipse refactoring features (such as the ability to propagate a package change) to rename some of those classes. (See Figure 1.)
我使用Eclipse的重构特性(比如传播包的变化)来重新命名其中的一些类(参见图1)。
Bill Venners: in Refactoring, you write: "I write tests to improve my productivity as a programmer." What about robustness, quality, and reliability?
比尔:在《重构》这本书中,你写道:“通过写测试,我提高了作为一个程序员的工作效率。”能谈谈对鲁棒性、质量和可靠性的影响么?
Refactoring is the process of rewriting a piece of code so as to leave its execution behavior intact, but improve it in some other way.
重写一段代码保留其运行的外部特性,但在某些方面有所改进,这样的过程称之为重构。
Encapsulate field USES the comma as a boundary between fields, and initiates refactoring on the field that is nearest the cursor and on the same line as the cursor.
“封装字段”使用逗号作为字段之间的边界,并对与光标位于同一行且距离光标最近的某个字段启动重构。
As far as breaking a piece of secret code-that tells me their testing wasn't strong enough. Testing is a very important underpinning to refactoring.
至于说保密代码与其他部分代码不一致的问题,这正说明了他们的测试不是很严格。测试对于重构来说,是非常重要的支撑。
In a sense, design pattern as the goal of guiding the conduct of Refactoring.
在某种意义上,设计模式作为重构的目标指导重构的进行。
In a sense, design pattern as the goal of guiding the conduct of Refactoring.
在某种意义上,设计模式作为重构的目标指导重构的进行。
应用推荐