注意,上面显示的代码实际上只有一行。
Note that the code shown above is actually only a single line.
但反过来说,评审代码所花的时间不得低于五分钟,就算代码只有一行也是如此。
On the flip side, you should always spend at least five minutes reviewing code, even if it's just one line.
为只有一行代码的标记编写测试看起来似乎有些过分,但是很多时候问题的源头正是这一行代码。
Writing a test for a simple one-line tag might seem excessive, but you'd be surprised how many times the one-liners end up being the source of trouble.
您需要检查方法内部的代码行,并且确保其中只有一行代码。
You need to examine the lines of code within the method and check to make sure that there is only one line.
如果比较两个应用程序,就会看到清单5的步骤3中只有一行额外代码。
If you compare the two applications, you'll see that there is just one line of extra code in Step 3 of Listing 5.
服务器必须生成整个字符串,第一行和最后一行除外,因为当前的用户语言环境可能要求使用这些消息(并且只有服务器端代码能完成这项工作)。
The server must produce the entire string, except for the first and last lines, because the current user locale might require these messages (and only server-side code can accomplish this).
清单2是一个较长的ECMAScript例程,不像清单1一样,只有一行代码。
Listing 2 is a longer ECMAScript routine, not a single line, as is Listing 1.
清单2是一个较长的ECMAScript例程,不像清单1一样,只有一行代码。
Listing 2 is a longer ECMAScript routine, not a single line, as is Listing 1.
应用推荐