This failure says that I haven't tested the code using a zero-length array. That's easy enough to fix, so I can just add a quick test and move on to the next failure, shown in Listing 4.
这个失败说,我没有用长度为零的数组测试该代码。
Listing 3 shows the code for using such a library.
清单3展示了使用这样一个库的代码示例。
Using DI, the container can inject the code for a particular persistence framework using container configuration.
使用DI,容器可以利用容器的配置来注入特定持久性框架的代码。
Right, so the things we want you to take away from this are, get into the habit of using pseudo code when you sit down to start a problem, write out what are the steps.
好,这儿我想大家明白的就是,养成解决问题时先写伪代码的好习惯,把步骤都写出来,我想要告诉你们的是一个好的程序员。
And it becomes a powerful way of reasoning about the code, a powerful way of using the code, so those notions of specs are really important.
以保证你写对代码,这将成为分析代码,使用代码的重要手段,所以规范说明的概念。
At the end of the day, you can implement the exact same program using a while loop that you can using a for loop, it's just your code is going to look slightly different.
最终,你可以执行这个程序,再使用for循环的地方使用while循环,这只是使你的代码看起来稍微有点不同。
应用推荐