并且很难用集成测试模拟代码需要正确处理的所有临界情况。
It's also hard to use integration tests to stimulate all of the edge cases that your code should handle properly.
美国科罗拉多州国家大气研究中心的科学家宣布,他们计划与日本地球模拟中心合作,转换美国气象模拟代码,使之和这台新计算机兼容。
Research in Boulder, Colo., said they were planning to work with the Japanese earth simulation center to convert United States weather modeling codes to work with the new computer.
清单3给出模拟设备对象的代码。
What I mean by that is, pick a simple set of values, and let's walk through it to see what happens. And this is useful because it's going to allow me to A make sure that I've got something that's going to terminate, it's going to let me make sure that in fact I'm doing the right kinds of updates.
原因你们知道的,好,模拟代码,我的意思就是,选出一系列的值来,然后模拟下代码的执行来看看结果,这很有用因为这让我确保我的程序在某个地方,可以终止,还会让我确保实际上我。
And I'm going to do this because, as Professor Guttag noticed to me, students seem reluctant to do this.
另外一件十分有用的事情就是去模拟代码,我之所以要这么做,是因为Guttag教授,提醒过我,说学生们不是很情愿来做这个。
I spotted an error here, I could have spotted it by running it on different test sets, and using prints things, another way of doing it, but this idea of at least simulating it on simple examples lets you check a couple of important questions.
操作么?我在这里发现了一个错误,我也可以通过运行不同的测试集,或者运用print声明来发现这个错误,但是至少应该用简单的例子来手工模拟下,代码的思想可以让你,对一些很重要的问题进行检验。
应用推荐