More failing tests could be written for those pieces of code until a reasonable specification begins to take shape.
可以为那些代码片段编写更多的失败测试,直到一个合理的规范开始成形。
Even better if the specification is actually executable code instead of pages of prose.
如果该规格是可执行的代码而非文字说明,那更就好了。
In a top-down approach, one would start with a service specification (for example, a WSDL file) and then implement the underlying code to match that specification.
在自上而下方法中,首先从一个服务规范(例如一个WSDL文件)开始,然后实现底层代码以匹配规范。
And notice, by the way, if I do that, and I type sqrt and open the paren, ah-ha! It shows me what the creator, in this case actually I stole this from John so what Professor Guttag put up as his specification for this piece of code.
它需要什么养的输入和其它我想传达的信息,如果我这么做了,我将会到这里打上sqrt并且加上括号,啊哈!这里告诉我这段程序的创建者,事实上这是我是从约翰那里偷来的,所以也就是Guttag教授在它的。
应用推荐