And it's hard to imagine a simpler program than this. So we very quickly realize that exhaustive testing is just never feasible for an interesting program.
更简单的程序了,因此我们很快的意识到,对一个程序来说详尽的,测试是永远不可行的。
And that's because it's easier to test small things than big things. And it's easier to debug small things than big things.
这是因为对小一点的对象,进行测试比对大一点的对象进行测,试要简单多了,调试也是如此。
Just so you know." Unbeknownst to the teachers, the actual test which was given to those students was a regular off-the-shelf IQ test.
只有你们知道就好“老师们不知道的是,对学生进行的测试,只是普通的现成的智商测试。
Well, for our purposes, both are correct and we'll know how to figure this out on tests.
这个,对课堂而言,两种都正确,我们会在测试中明白原因的
And each proposes to Socrates a test that he will have to pass in order to prove the value of justice and the just life.
每一个建议对苏格拉底都是一次必需通过的测试,以证明,正义与公正人生的价值。
That means that a group of people who were identified and then re-measured every other year on -to getting blood tests and other biological markers, as well as doing assessments of their lifestyle behaviors and a number of other things.
就是说有一群特定的人,然后每隔几年,就要接受血液及其他生物学测试,还要对他们的生活方式等进行评估
You pretest to make sure that the person doesn't like any M&M more than the other.
你预先测试过,这个人对所有M&M巧克力豆都一样喜欢。
Well, you could just try it and see if it works, right? That's what testing is all about.
你可以仅仅的去试试运行程序,然后看看结果对不对?这就是测试的内容。
Because usually it doesn't work. And so one of the things that I think is very important is to always begin by testing each unit.
因此我认为非常重要的一件事情,就是开始测试的时候先对,每个独立单元进行测试。
So before I try and run my program, I test each part of it independently.
因此在我尝试运行我的程序之前,我都会对它的每个部分进行独立的测试。
We're checking the end test and incrementing, actually I was going to, I commented that out for a reason you'll see in a second, but I, normally I would keep this on, which would let me, at each step, see what it's doing. If I ran this, it would print out each step. Which is helping me make sure that it's incrementing the right way.
对不对?进行终结测试然后递增,实际上我要,因为某些你们,马上要明白的原因我把这里注释了,但是我通常会一直这么做,这样能让我看到每一步都做了什么,如果我运行这个程序,它会在每一步都,进行显示,这能帮助我让我确信程序是,在以正确的方式递增。
For the latter, this is a place where running test cases would do a good job of helping with that. Nonetheless, having done that, let's look at a better way to write this. Which is right here it is also, I think, on your sheet, I'm going to uncomment that, and comment this one out, yeah. All right?
对于后者来说,运行测试用例,对它会有很大的帮助,尽管如此,讲完了这些,让我们再来看看更好的,来写这个程序的一种方法吧,也就是这里,我想这程序也在,你们的课堂手册上面,我得先把这里取消注释,然后注释掉这里,是的,对不对?
A food frequency--by the way, you also have the issue of whether the particular twenty-four hours that a person is interviewed is representative of their diet overall, because you can imagine how much your food intake varies from day to day.
食物摄取频率,顺便说下,还有一个问题,就是在选取的24小时里,测试者,是不是对总体有代表性,因为你可以想象,每天事物的摄入量都是不同的
One is called the twenty-four hour recall and that's either done by a computer, or done by a trained interviewer who would sit down with you and say, 'Let's reconstruct everything you've eaten in the last twenty-four hours.' And so then you have to recollect everything you ate in the last twenty-four hours.
其中之一被称为24小时回顾法,可由计算机完成,也可以由专业测试人员,坐在你面前并对你说,"让我们记录所有,最近24小时你所吃的东西",然后你需要回忆,最近24小时内吃了什么
All right, so we've tested it, and we haven't tested it yet we have tested it but, we haven't seen it, well, you know what I'm going to do?
好,我保存下,这有点儿烦,不过能让字体更大点儿,好,我们已经得到了要比较的对象了,但是还没对它们进行比较测试?
It's Bush economics. OK? I know.
啊,测试答案为否了,因此我返回5,对,没错。
Yeah, I've still got a binding for z and I'm giving it the same test, but notice now I've got the two same commands but they have different indentation.
对,我还是对z进行了绑定,我还是要对它进行同样的测试,但是请注意现在我有了两个同样的命令,但是它们有不同的缩进。
It's not how well you can memorize facts: John in fact, I think both John and I are a little sensitive to memory tests, given our age, right John?
这实际上不是考察你们的记忆能力的:,实际上,我想我和,因为我们年纪的原因,对记忆力测试都有点敏感,对不对John?
应用推荐