代码简单且无重复性。
编写测试要比编写模型代码简单得多。
根据这个指标,TDD版本比后测试代码简单三倍。
Gauging by this measure, the TDD version is more than three times simpler than the test-after code.
Alright, we are back so we just wrote a programming pseudocode or walk through a programming pseudocode.
继续上课,刚才我们只写了一个伪代码,或者说简单地过了一下。
And for reference, incidentally, in case you ever forget what the point of some exercise was, I'll almost always comment the code up top with a quick sentence or two that reminds you what this program does.
顺便作为参考,为了避免我们可能忘记一些代码的意思,我通常会用一两个简单的句子,在上面作出注释,那样会提醒我们这个程序是干嘛的。
And that then let's me get to, basically, base this code. Having done that, height I simply call base with get float, I call height with get float, and do the rest of the work.
现在让我们看看这段代码,其实已经写好了,我简单的调用下,用来得到一个浮点数,再调用下,来得到另外一个浮点数,然后做剩下的工作就可以了。
应用推荐