Everything like just the design and also the structural part was really well made, so I like it for that.
设计和结构部分都做得很好,所以我喜欢它。
I think it speaks very highly of what we all do as entrepreneurs and what we all do as creators and builders of things.
我觉得它高度赞扬了,我们企业家在做的事情,和我们作为创造者和建设者所做的事。
And maybe it does it kind of the same way that I do it but my computer doesn't have feelings in the same sense.
也许它做这些事情的方式和我是一样的,但我的电脑却并不能,像我一样,拥有情感
Well, I could look at the value here, and compare it to the value I'm trying to find, and say the following; if the value I'm looking for is bigger than this value, where do I need to look? Just here.
然后把它和目标数做个比较,然后做出如下的判断:,如果目标值大于这个值;,那么我应该去哪找呢?对,应该在这里,对不对?不可能在那儿。
In Judges 1:8 and 21, we read that the people of Judah did this and that despite that victory they failed to actually drive out the inhabitants, the Jebusites, who lived there.
士师记》第1章8和21节,我们知道犹大人这样做,它描述了这一胜利,他们实际上并没有将那些居民驱逐出去,耶布斯人,他们住在那里。
And so what I'm really doing is inviting you to take a good, cold, hard look at death, and to face it and think about it in a way that most of us don't do.
那就是我要你们做的,认清,死亡的好和坏,面对它,然后思考它,用我们从没用过的方式。
And just as with variables, you should use some common sense, some style here, and the function's name should X Y communicate what it does, calling it X or Y or Z is generally not all that helpful.
就像变量,你使用一些常识,一些类型,和函数名需要,传达它所做的事情,把它叫做,或者Z通常是没有什么用处的。
So, you can see, it's much easier to describe that as one term, r here, instead of using both y and z.
所以,你们可以看到,用r而不是y和z来做描述,使得它变得更为简单。
because what you have to do is you have to describe it to the person you're talking to.
因为你要做的是向正在和你交谈的人描述它。
or at least one mechanism, I shouldn't say -- the only one-- one mechanism for doing that is going to be to add functions is that it's going to provide both of these things, so the first thing it's going to do is, it's going to let us break up into modules.
我们处理这些的机制--至少一种机制,我不会说只有一种,一种机制是在我们的语言中增加函数,函数的关键是它要提供分解和抽象,所以第一件要做的事,就是将代码分解为模块。
And as a starting point there's a lovely quote from the psychologist and philosopher William James that I want to begin with.
作为开始,有一个可爱的引言,是心理学家和哲学家,威廉,詹姆斯说的,我想用它做开始。
We want it to be about how people are using it and how people are fitting it into their lives and what they're doing with it.
我们想让它成为关于,人们怎样使用它和人们怎样,让它融入生活,人们用它做什么。
Did the same thing with c p 2, 2 2 0 Again, remind you, c p 2 is a different instance of this data type.
建立了一个x变量,我也把它赋值为,因此cp1内置有了x和y值,然后对cp2做同样的操作。
It's only got two things to do, except what it really says is, that the complexity of search 1 is the same as the complexity of b search, b search because that's the call it's doing.
它只有两件事要做,其实实际上是1,它的复杂度和b,search的复杂度是相同的,因为它调用了。
STUDENT: Let me compare y to Yeah, it's not doing all of the comparisons.
学生:让我把y和【不可闻的声音】做比较,对了,它并没有对所有的情况作比较。
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的,如果不是的话,请注意会发生什么,下面的代码都不会被执行,程序会到这里来然后显示一些有用的信息,信息会说,嘿,你给了我一个负数,我不知道该怎么弄这个了。
应用推荐