那就是说,如果函数有确定的有效值集合或范围可作为参数,可以将检验参数是否有效的断言放在该函数代码的第一行。
That is, if a function has a certain set or range of valid values for its arguments, an assertion to this effect can be placed as the first line of code in the function.
当处理规则表达式时,将它作为它自己的编程问题来处理,即使只涉及一或两行代码;这些行有效地构成了一个小程序。
When approaching a regular expression, treat it as its own programming problem, even though only one or two lines of code may be involved; those lines effectively form a small program.
软件包的代码行增加了,但是没有为新代码编写相应的测试(或者是新增加的测试不能有效地覆盖新代码)。
The package grew in terms of lines of code, but no corresponding tests were written for the new code (or that newly added tests do not effectively cover the new code).
使用下面的一行代码来读取DataObject的有效负载
我们可以写这一行代码,使代码的执行更有效率,但是,这个关键字用来把我们的代码分解,成一段段的。
We could certainly implement this much more efficiently by just writing this one line of code, but, again, the key here is to take this step toward decomposing our code into chunks of code.
我们可以写这一行代码,使代码的执行更有效率,但是,这个关键字用来把我们的代码分解,成一段段的。
We could certainly implement this much more efficiently by just writing this one line of code, but, again, the key here is to take this step toward decomposing our code into chunks of code.
应用推荐