Because it said you didn't even take the time to make sure the syntax is correct.
因为那意味着你们根本没有花时间,去检查语法是否正确。
So I actually want to have type checking as much as I can early on.
因此我会在尽可能早的地方去,做一个类型检查。
They'll say, "Oh, he must think it's not-- He'll--He's going to check under the bed.
他们会说,"他正要去检查床下面"
They threw me up against the wall and checked me out, because I was a kid and I wanted to go there and see, just for the purpose of history, of being there.
他们把我推到墙上开始检查,因为我是个孩子而且我想去那看看,就是为了见证历史,亲身体验
And so, he has put this chemistry to use in this robotic arm and they call it Fido, because often dogs are the creatures that have to go out and detect these things, and it's not a great job if you're a dog to be sent out to see whether there was an explosive and discover yes, there was, a little bit too late.
因为通常都是派狗去检查这些东西,这个不是个好工作,如果你是一只狗,被派去检查是否有爆炸物,然后你发现有,那就来不及了,所以用机器手检查化学物质。
Suppose that there were some sort of genetic marker and, although we didn't have a tattoo that you would just have to look at, -- but you could have genetic counseling-- have your DNA examined and you could tell, if you had the DNA testing, how much time you had left.
假设有某种基因标记,虽然我们没有,让你不得不去看的在身上的标记了,但你可能会去做基因咨询-,检查你的DNA,如果你做了DNA化验的话,你就能知道自己还剩多少时间。
It tells you how you might test something but it doesn't tell you how to.
它告诉你怎么才可能去检查一些事儿,但是它没有说怎样检查。
And those are two things that you'd like to do with every looping construct you write: you'd like to be able to assure yourself that they will always terminate, and then the second thing you'd like to do, is to assure yourself that it does give you back a reasonable answer.
就是现在我有了能去检查程序,是不是做了正确的操作的能力:,这就是你们在写每个循环程序的时候,都要注意的两个事情:,第一件事情是要确保程序可以终结,第二件你要做的事情,就是要确保程序返回了正确的答案。
OK. All right, let me show you one other tool that I want to use. Which is, I've written that piece of code, I ought to check it. Well, I could just run it, but another useful thing to do is, I'm, especially as I want to debug these things, is to simulate that code.
好,那么,让我给大家讲下,我想用的另外一个工具吧,也就是,我已经写好了这一块代码,我应该去检查检查,那么我可以去运行它,但是特别是当我想要调试代码的时候。
So now, in this case, this code is going to, when we get here, check, and if you haven't seen that strange thing there, that exclamation point in bang computer-ese called a bang, it says x if ANS star ANS is not equal to x, all right?
那么现在,在这个例子中,当我们执行到这里,代码会去检查,如果你没有看到过这个奇怪的东西,这个感叹号在计算机学中被叫做,代码的意思是如果ANS的平方不等于?
I really do love these things. And is that right, John? OK, so my apologies that your handout is wrong. I did not think to check about the difference between these things.
我真的很喜欢这些东西,这样对不对John?,好,抱歉你们的课堂手册上面是错误的,我没想要要去检查,这些东西之间的不同。
I test an end test. So the flow chart says, and the tradition was to do this in a diamond shape, I'm going to check if ANS times ANS-- oh, which way did I want to do this x - is less than or equal to x. Now that's a test.
首先进行终结测试,因此流程图就的去,传统的做法是把这个放到一个菱形里面,检查下是否ANS乘以ANS-哦,我刚才是怎么说的来着-是不是小于等于。
But notice what this does. The first thing it does is, it says, let's check and make sure x is greater than or equal to 0. If it isn't, notice what's going to happen. None of that block is going to get executed, and it's going to come down here and print out a useful piece of information, which says, hey, you gave me a negative number. I don't know how to do this.
做的是和以前一样的事情,但是注释它做了什么,第一件做的事情就是,程序说,要去检查并且确信x是大于等于0的,如果不是的话,请注意会发生什么,下面的代码都不会被执行,程序会到这里来然后显示一些有用的信息,信息会说,嘿,你给了我一个负数,我不知道该怎么弄这个了。
应用推荐