It's important that you recognize that developers (the developers we know anyway) like to solve complex software design and code problems, not develop tests.
重要的是您得承认开发人员(我们所知道的开发人员)喜欢解决复杂的设计和代码问题,而不喜欢开发测试。
Save this file on your local machine (you can download the complete example source code from Download, but you should get used to working with these files yourself, anyway).
将这个文件保存到您的本机上(可通过下载 部分下载完整的示例源代码,但无论如何,您应该养成自己处理此类文件的习惯)。
It also lets them write code most of the time, which is what they like to do anyway.
它还让他们在大部分时间内编写代码,而这正是他们喜欢做的。
I called the phone company and asked for the pass code to his mobile - I was paying his account so it was in my name anyway.
我拨通了电话公司的电话,要了他手机的密码——我给他的手机交费,所以帐户就到了我的名下。
Since the macro expands to regular code anyway, you can always switch back to imperative programming if the declarative language doesn't suit your needs.
因为宏可以以任何方式展开常规代码,所以如果声明式语言不能满足需要,那么随时可以切换回命令式编程。
When deadlines approach, stick up for the team and fight for scope management over shipping badly written code just to make a (usually arbitrary, anyway) date.
当最终期限迫近时,要支持团队并为范围管理而努力,不要仅仅为了在期限内完成工作而交付差劲的代码(通常是武断地作出判断)。
In many cases, web service development is actually starting from existing code anyway, in the form of services implemented using some older technology.
在很多情况下,Web服务开发实际总是开始于现有代码,使用某种老技术实现服务。
The code in Listings 1 and 2 includes no Ajax support, but I'll dissect it anyway.
清单1和清单2中的代码不支持Ajax,但我还是会仔细分析该代码。
You never get it to be the same, and then you wonder whether the difference is a bug or a feature, and what did the old code do about this anyway, etc, etc, etc. Disaster.
这样绝对不会得到看上去一样的程序,你就开始想是个bug呢,还是原本特性如此呢,原来的代码到底对此事如何处理呢,等等。 绝对是灾难。
The general rule of thumb is that if there's more than one try-block's worth of code in a method, then the method is too big and should probably be broken up into smaller methods anyway.
主要的实践经验是:如果一个方法中存在多个try块,那么就表明方法过于庞大,应拆分为多个较小的方法。
I can now find the bug duh, what was I thinking when I wrote that code anyway?
我现在可以找到错误杜,什么是我想,如果我写的代码呢?
Please also note that in my original code we are doing type checking (on the object I am trying to mock) so I don't think that Interface mocking can help me in anyway.
请注意,在我的原代码,我们正在做类型检查(我想嘲笑的对象)所以我不认为接口嘲笑可以帮助我吧。
Please also note that in my original code we are doing type checking (on the object I am trying to mock) so I don't think that Interface mocking can help me in anyway.
请注意,在我的原代码,我们正在做类型检查(我想嘲笑的对象)所以我不认为接口嘲笑可以帮助我吧。
应用推荐