i If I'm going to keep that item, item i, if I'm going to take it, I give it a 1.
如果我想要保留这个物品,如果我打算带走它。
I also think that if you were to go a little bit lower than that in terms of like...
我还想,如果你想要比它稍微档次低点儿的,比如……
But although that's, I think, the sketch of where Socrates wants to go, it doesn't quite give us what we want.
不过虽然那是,苏格拉底思路走向,我认为它没有提供太多我们想要的
I study speech, I study speeches, and if I do so, and if I keep thinking about it in a variety of ways, all sorts of frameworks jostle for attention.
我就必定要研究话语,如果我想要从尽可能多的角度研究它,那么各式各样的的语言结构令我眼花缭乱。
And check the answers, and say yeah that's what we expected. But it also involves reasoning. About why that's an appropriate set of inputs to test it on it.
然后说对,这就是我想要的结果,但是它跟推理也有关系,表现在关于为什么这是一个,测试我们程序的适合的输入集。
It's less of an opening argument than it is something that I want to convince you of.
我不是想要说服你们,而是想要让它成为一个公开的讨论。
Maybe it was because it was filling in gaps in my knowledge-- things I've always wanted to know and was always curious about.
也许是因为它弥补了我知识上的缺陷,那些知识是我一直想要了解的
That's where I want to tell you that it's actually more complicated than that.
我想告诉你的是,它远比这要复杂
Well that's a--so it's sort of tongue in cheek, 'you know this is really good, I love to eat this, but I'm doing it because it's good for me' is the message there.
它有种特别的口感,"你知道这真的非常好,我喜欢吃它,但我吃它更是因为它对我有益",这就是我想要表达的
If I consume Bud Light, then I have to pay for the Bud Light, I think it typically costs less, the price, the raw price is less than Guinness but I also pay an additional cost from the fact that Bud Light, when I drink it, causes me "disutility": we'll put it politely like that.
如过我买百威淡啤酒,我必须要支付百威淡啤酒的价格,我想它会便宜点,原材料的价格比吉尼斯低,但我同样要支付附加成本因为百威淡啤酒,当我喝它的时候,味道一般,我表达得委婉一点
The other thing I wanted to mention and I'm not sure if the exhibit's still there.
另外一个我想要指出的事情就是,我不确定它是不是还在展出。
I need access to more memory, and I need it fast.
我需要使用更多内存,想要它更快点。
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?
这是一个简单的例子,我同意,但是请注意我刚才是怎么做的,我通过它想要强调,代码是做了正确的?
That is, if I want to combine two things together in a particular way, I need to make sure that I give it the kind of operand it expects.
也就是,如果我想以一种特定的方式,把两个东西组合到一块,我需要确定,给了运算符它想要的输入。
So although I don't like, I don't believe the argument is sound-- Premise one doesn't happen to be the premise I myself would want to reject.
尽管我不喜欢,或是我不认为这条论证可靠,但前提一恰是我想要反驳的,它作为前提并非偶然
To help you know sort of ahead of time quickly what those views are, I want to start by describing a set of views that many of you probably believe.
让你们稍微提早点儿知道,那些观点是什么,我想要从描述它开始,可能你们有些人会相信。
It takes the number whose Fibonacci memo I want plus a memo.
它将我想要的斐波那契数,的值加上了参数。
So if I were to solve this problem, here's the way I would do it. I would say, first thing I want to do, is I want to input a value for the base as a float.
如果我想要解决这个问题,这就是我要解决它的方式了,第一件我要做的事情就是要,输入一个浮点数作为三角形的底。
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.
好,那么,让我给大家讲下,我想用的另外一个工具吧,也就是,我已经写好了这一块代码,我应该去检查检查,那么我可以去运行它,但是特别是当我想要调试代码的时候。
But here I want it to be determined, chosen at run time.
但是在这里我想要让它是一个由运行时间。
It says, if I want to print out something I built in Cartesian form up here, says, again, I'm going to pass it in a pointer to the instance, that self thing, and then I'm going to return a string that I combine together with an open self and close paren, a comma in the middle, and getting the x-value and the y-value and converting them into strings before I put the whole thing together.
这不仅仅是个列表,它是怎么来做的?,流程是:如果我想要返回,一些已经在笛卡尔模式下建好的值,好,再说一遍,我首先要传入一个,指向实例的指针,也就是,然后我会返回一个,由开括号,闭括号,中间的一个逗号,以及提前转换为字符串格式的。
It's going to make a lot more sense later on when we introduce mutation into our language, but I want you to start thinking of it that way.
这个功能在我们以后介绍突变的时候,会有更大的作用,但是我想要大家,现在就开始思考它。
So you can think of it, if we were to just think of it as a straight line that we were going across, essentially what we're saying is that we're getting from point a to point c without ever getting through point b.
你们可以来想想看,如我我们把它想成是一条直线,我们要沿着这条线经过,这就是说我们要从a点,不经过b点而到c点。
I think the easiest way to look at what this does, is let's take a really simple example- I want to make sure I put the right things out- I've got a simple little list of values there.
到底做了什么,就是让它跑一个简单的例子,我想要确信我找到了正确的元素-,这里我用一个简单的小的列表-,如果我去代码里面看。
OK, and if I wanted to look at it, we can come back over here, and we can see what does c p 1 look like, interesting.
现在对于这里的每个实例,我都赋了x和y值,好,那么如果我想要研究下它,我们可以回到这里来。
If they type in bogus characters, it's going to yell at them and make them retry, and eventually I'm going to get handed back an int, which I'm storing in n. Well, if I actually want to judge this number based on its magnitude, well, I can say now, "If n is greater than or equal to one."
如果他们键入了不合法的字符,它将对他们叫喊,然后叫他们重试,最终我将,得到一个int数,它是存储在n中的,好的,如果我的确想要根据它的量级来判定这个数字,好的,现在我可以指明,“是否n大于等于1“
I would say, okay, this guy wants me to find a function which reduces to the number a when I take two derivatives, and I know somewhere here, this result, which says that when I take a derivative, I lose a power of t.
出题者想要我找出一个函数,它在经过两次求导后得到数字a,我知道这里的某个地方,这个结论告诉我,我每求一次导,t就降一次幂
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.
请告诉我你想要几个头,设为,然后告诉它你想要几条腿,设为,最后它会打印结果,哇哦。
It says if I want to get the length of a segment, going to pass in that instance, it says from that instance, get the start point, that's the thing I just found.
它的意思是如果我想要,得到一个线段的长度,首先要把这个实例传进来,然后对于这个实例,从开始点,取得x坐标,然后通过同样的操作。
应用推荐