Unit tests give me the confidence that my code works and that I can change it, at a moment's notice, without the fear of it breaking.
单元测试给我信心,让我相信我的代码能够工作,而且我只要看一下,可以修改它,就不会害怕它会崩溃。
Often, code that works in a local workspace turns out to break (or break some other code) at build time — an everyday cause of delays on most projects.
常常,在本地工作区可以工作的代码在构建时刻就出现失败(或者破坏其他代码)——这是大多数项目每天延迟的原因。
One of the easiest ways to determine how a piece of code works is to look at an example, so including an example or two of how to invoke a member function is quite helpful.
确定一块代码如何工作的最容易方法之一就是看一下示例,所以包括如何调用成员函数的一个或两个示例是十分有用的。
Now, efficiency is obviously an important consideration when you're designing code, although I have to admit, at least for me, I usually want to at least start initially with code that works, and then worry about how I might go back and come up with more efficient implementation.
现在,当你设计程序的时候效率,是不得不考虑的问题,虽然我必须承认,至少对我来说,我是先担心程序能不能运行,再去把它的效率优化的,我喜欢可靠点的东西。
应用推荐