Refactor when the code is difficult to understand and the team is not sure of what it does.
当代码难于理解,并且团队不能确定它做什么的时候进行重构。
Since I've captured early requirements in the form of test cases, I can easily refactor my code.
由于我已经通过测试用例捕获了早期需求,我可以轻松地对代码进行重构。
An important thing to note here is that you should either design and write new code, or refactor existing code.
这里要注意的重要一点是,您应该要么设计并编写新代码,要么重构现有的代码。
To make this program double-buffered, you need to refactor the code slightly.
为了让这个程序进行双缓冲,需要对代码略加重构。
For example, if they see an opportunity for abstraction, they refactor to remove duplicate code from concrete implementations.
例如,如果他们看到有抽象的机会,他们就会进行重构,从具体的实现中除去重复的代码。
You may not have success with test-first development, but accumulating test collateral gives you the freedom to refactor your code.
您可能还没有在测试第一的开发中成功过,但测试会间接给您带来重构代码的便利。
You can refactor the code to isolate the data access functions into a separate file as homework.
作为练习,您可以对代码进行重构以将数据访问函数分离到单独的文件中。
With this step, you refactor the code that causes the problem.
在这一步中,您将重构导致问题的代码。
This is the code I ultimately refactor into its own idiomatic pattern in "Leveraging reusable code, Part 1."
这就是在“利用可重用代码,第1部分”中我最终重构到它的惯用模式中的代码。
Tools can recognize errors and effectively restructure, or refactor, code.
工具可以识别错误和有效地重构代码。
Programmer tests also give developers courage to refactor the code, because a test failure tells the developer immediately if something's broken.
程序员测试还给予开发者重构代码的勇气,因为测试失败会立即告诉开发者是不是有地方出了问题。
There are several reasons that you might want to refactor code. The first is the stuff of legend: the hoary old code base for a venerable product is inherited or otherwise mysteriously appears.
您需要进行代码重构的原因可能有以下几个:传说中的第一个原因是:需要继承为某个古老产品而开发的年代久远的代码,或者突然碰到这些代码。
If you have 100 percent code coverage on your project, you can refactor your code with impunity.
如果您的项目的代码覆盖率达到了100%,那么可以安全地重构代码。
When we refactor the code this way, we realize that we don't really care about observing buttons; we care about observing clicks.
当我们开始用这种方式重构代码的时候,我们意识到我们实际上不关心“观察”按钮;我们关心的是“观察”点击。
They refactor code to make it more testable.
他们重构代码,让代码更加易于测试。
That's not a problem over the long term, as long as you go back later and refactor the code into smaller bites.
从长远来说,这并不是一个问题,但您要记得回过头来将它重构为更小的部分。
Given that everyone on the team will be going through the "write a test, fix the code, refactor" cycle frequently, it's essential that you can both write and run tests efficiently.
假使项目中的每一个人都在周而复始地重复“写测试,修改代码,重构”,当然有必要使你的测试工作更加有效。
Tested code is easier to refactor, maintain, and enhance than code without corresponding test cases.
与没有相应测试案例的代码相比,经过测试的代码更容易重构、维护和增强。
You should refactor the code to separate the various application layers.
应当重构代码以分离各个应用层。
It's far better to build code that's easy to refactor and exactly what you need.
最好是构建易于重构的并且完全是您所需要的代码。
重构代码。
Refactor your code and automate your tests.
重构代码并自动化测试。
Refactor and rename within user code
在用户代码内重构和重命名
Refactor your original code to look like this.
重构您的原始代码,使其看起来如下所示。
As with JBuilder, one of Eclipse's most powerful features is the ability to refactor code.
eclipse与jbuilder类似,其中一个最强大的特性就是对代码的重构能力。
Doing this puts your test data in one place and makes your code cleaner and easier to refactor.
这样做使得测试数据放在一个地方,从而使代码更干净,更容易重构。
Duplication harms projects because it resists attempts to make structural changes or refactor toward better code.
复制对项目有害,因为它不利于做出结构更改或重构为更好的代码。
However, I prefer to refactor existing code instead.
但是我更愿意重构已有的代码。
However, I prefer to refactor existing code instead.
但是我更愿意重构已有的代码。
应用推荐