Modifying old code adds the risk of breaking existing functionality.
修改旧有代码增添了破坏已有功能的风险。
One such example occurs when refactoring old code to help simplify it and make it more readable.
重构旧代码以进行简化并提高可读性就是这样一个例子。
In this case, the underscore in line 105 was just some easy-to-fix detritus from 10-year-old code.
在这个例子中,105行的下划线只是一个有10年之久的老代码中一些容易修正的小毛病。
So you generally work on an existing codebase, but yet it's easier to write all new code than it is to change old code.
所以,你通常基于现有的代码库进行工作,可是写全新的代码又比修改旧的代码容易得多。
Rewriting old code simply to change its style may result in the introduction of costly yet avoidable defects.
在重写代码的时候简单粗暴地改变原有风格,会导致代价惨重的缺陷,而其实这些完全都是可以避免的。
It's best to comment out the old code and add comments to the new code so it will be easier to track your modifications.
最好是注释掉旧代码并对新代码添加注释,这样可以更轻松地跟踪您的修改。
You'd be surprised at how old code can be resurrected into a possible and better routine, or maybe even an entire product.
你也许会惊叹,旧代码也能复活成为一种更好的程序,甚至是一个完整的产品。
Because large portions of the Mac OS were still based on creaky old code, Apple decided that it had to start from scratch.
由于很大一部分的MacOS仍基于陈旧的代码,苹果公司决定另起炉灶、从头开始。
Whether you need to double back and revisit some old code, write some more test cases, or even delay a deadline — do it.
无论你是否需要后退两步复查一些老代码,写更多的测试用例,或者甚至是推迟一个截止期限——做下去。
Its old code had warned employees against such things as greasy or highly gelled hair or wearing flowers as accessories.
该公司的旧规定警告员工不要让头发看起来油腻腻的,或上太多发胶,也不要将花作为装饰物佩戴。
The new hybrid method combines the best of new and old code cracking methods for "fingerprinting" the genetic basis of life.
此新方法吸取了新老密码破译方法的长处以解读生命的遗传基础。
Similarly, messages created by your new code can be parsed by your old code: old binaries simply ignore the new field when parsing.
类似地,你的新代码创建的消息也能被你的老代码解析:老的二进制程序在解析的时候只是简单地将新字段忽略。
After you have done this you can safely refactor code and implement new features and be confident that your old code has not broken.
在您这样做之后,您可以安全的重构代码、实现新功能,并确保不会破坏您的旧代码。
Since you started out valid, you can handle this incrementally, rather than dealing with both old code and your new code at the same time.
因为开始时是有效的,所以您可以逐步处理,而不是同时处理旧代码和新代码。
It's usually far easier for me to write all new methods and classes than it is to break into old code and find the sections I need to change.
通常对我来说写全新的方法和类要比深入旧代码中,找出我想要修改的部分容易得多。
There are various times when new code was introduced or old code was refactored away as indicated by sharp rises or drops in the lines of code count.
还有几次,新的代码被引入或者旧的代码被重构出去,这些可以从代码行计数的急剧升降上表现出来。
When you modify old code you have to both test your changes and then perform a set of regression tests to make sure you didn't break any of the existing code.
而当你修改旧有代码时,你不得不既要测试你更改的部分,还要进行一系列的兼容测试,以保证你没有破坏任何的旧有代码。
Linus noted that some people were thinking that 3.0 meant it was time to start with big new features (or removal of old code), but that's not what is meant to happen.
李纳斯指出,有些人认为,3.0意味着该加入一些重大的新功能了(或移除老的代码),但事实不是如此。
Linus noted that some people were thinking that 3.0 meant it was time to start with big new features (or removal of old code), but that's not what is meant to happen.
李纳斯指出,有些人认为,3.0意味着该加入一些重大的新功能了(或移除老的代码),但事实不是如此。
应用推荐