But imagine I actually wanted to gather them together. I wanted to collect them, so I could do something with them.
把那些除数都显示出来,这很有用,但是请想想下我想要,把它们放在一块。
Before I do that though, let me try and give you an analogy to keep this in mind of why we want to basically build these abstractions and what we need in order to have them work together.
在我们看例子之前请让我打个比方,以便你们能记住我们,为什么要建立这些抽象,以及要使它们协调工作,我们需要做些什么。
So let's do a quick clicker question, and you tell me how many valence electrons does fluorine have? Remember, valence electrons are different from core, they're only the outer-most electrons in the outer-most shell.
那么让我们来做一个小选择题,请大家来告诉我,氟有多少个价电子,要记得,价电子与芯电子不同,它们是在最外壳层的最靠外面的电子。
What I'm inviting you to think about is which one, if you had to choose between these two gruesome scenarios, which one would you rather save?
这里我要请大家思考的是,哪一个,如果你必须在这两个残忍情境中作出抉择,你会救哪一个?
And again if you don't, and you feel like you'd like a review session on this please send me an email and I'll set one up next week.
如果你还不大懂,觉得你想要这方面的综述,请电邮我,我会在下周给出一篇综述
If you can introspect and ask, why is it that I vote?
那请扪心自问,我为什么要投票
Welles said, forgive me for repeating myself from a previous class, Welles said the problem with Citizen Kane is that it just look like a young film maker trying to set proof to the world that he can make movies. That's exactly what it was.
请原谅我,又要重复上次课上的话,威尔斯说,《公民凯恩》的问题在于,它看起来就像是一个年轻的电影制作人,试图去向世界证明,他能够做电影,的确是这样。
OK. So. Why did I do it? It's a simple example, I agree, but notice what I just did. It allowed me to highlight, is the code doing the right thing?
这是一个简单的例子,我同意,但是请注意我刚才是怎么做的,我通过它想要强调,代码是做了正确的?
Now I call that, and it says, 20 tell me how many heads you want, give it a 20, and tell it how many legs 56 you want, give it 56, and it prints out the answers. I know, whoop-dee-doo.
请告诉我你想要几个头,设为,然后告诉它你想要几条腿,设为,最后它会打印结果,哇哦。
if at any point you've got something you want to ask about or some two bits you want to add, raise your hand, wiggle it around, make sure I see you.
任何时刻如果你有想问的东西,或者你想要加上什么东西,请举手,摇晃起来,确保我能看见。
So notice what I'm going to do.
请注意我要去做的操作。
When I think about what I want-- and I'm just going to invite you to,each one of you, to ask yourself what is it that you want, what matters to you in survival?
我思考自己想要什么这个问题时-,我也请你们每个人都,问问自己这是不是你们想要的,你们想要存活是为了什么?
In some sense, strictly speaking they shouldn't be necessary because the fact that my specification starts with an assumption, says, hey you, who might call square root make sure that the things you call me with obey the assumption.
在某种意义上严格的来讲,它们不是必要的,因为我已经对假设做了声明,也就是说,如果你要调用我的,求平方根的函数,请确保你传递给我的,参数满足假设条件。
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进行了绑定,我还是要对它进行同样的测试,但是请注意现在我有了两个同样的命令,但是它们有不同的缩进。
应用推荐