If you have a computer that plays chess and you want to explain how the computer plays chess, it's impossible to do so without talking about the programs and mechanisms inside the computer.
如果你有一台能下国际象棋的计算机,你想要解释计算机是如何下国际象棋的,如果你不谈程序以及计算机的内部结构,那你就不能对它如何下国际象棋,给出解释。
Based on the lessons we've been telling if I say *, you know what I have a computer.
基于我们讲过的课程,如果我指明,我有一台计算机。
I've added the ability to have more complex data structures here. But I dropped a hint in the first lecture about what you could computer with things. In fact if you think for a second about that list, you could ask what can I compute with just that set of constructs?
我添加了使用更复杂的数据结构的能力,但是我在第一节课给大家了了一个,关于你可以用什么来做计算的暗示,实际上如果你思考,这个列表一会儿的话,你会问我可以用?
Jin says he is a sophomore in computer science and he has science fiction in mind and plus machines So you have some immersion in philosophy.
杰,他大二,学计算机科学,他满脑子都是科幻小说和机器,所以你对哲学有点了解。
And the thought, of course, is that the robot or the computer is a deterministic system and you can't have free will if you're a deterministic system.
那个想法,当然,是说机器人和电脑只是一种决定论的系统,而如果你是个决定论系统的话,就不可能有自由意志
Now, if you guys are using your computer or you have a pen, I'd just like you to write down what your estimates are of a few foods I'll show you and see what you say.
使用你们的电脑,或者拿起支笔,请写下对以下我展示的一些食物,卡路里的估测,让我们看看结果
But at the end of the day, and here's why we just went with binary and not decimal years ago, when you have one implement a computer with a physical device, it's actually really easy to represent the notion of on or off.
但是最终,之前我们采用二进制,而不是十进制,主要是因为当我们用一台实体机器运行计算机时,这实际上很容易用开或者关的概念来表示。
If unfamiliar, these are the mechanical computer devices that you have to use to buy a ticket on the T these days and there was one of these really awkward but touching situations where it was clear that this woman had no idea, you know, what to do, how to get from here to here, and I could see her just staring at the turnstiles that you're supposed to go through to get into the subway.
如果不熟悉,这是机械计算机设备,当今你必须使用它们来买地铁票,它们实在是难操作的,这个令人同情的情况是,明显这位老太太不知道怎样操作,怎样从这一步到那一步,我看见她只是凝视着,地铁的栅门口。
But because we're now programming a computer at a lower level and because as we said last week, you really have to be precise and then careful to instruct this machine, this fairly dumb machine that will only do what you tell it to do very specific instructions, do we have to use a more precise syntax than just a puzzle piece might have previously allowed.
但是我们是要在电脑的低平台上编程不是吗?,那我们就要像我上周提到过的那样,一定要小心,小心,再小心地,操纵这台又聋又哑的机器,它只会根据你敲进去的,特定指令来做事,所以我们必须使用非常精细的语法,而不是模模糊糊,让人费解的概念。
Because you can come up with an infinite number of values but if you have a finite amount of space and certainly a computer has a finite amount of disk space or RAM, you have to make approximations.
你可能会碰到一些无限的值,如果你只有有限的空间,废话,电脑当然只有一个有限的磁盘空间,或RAM,我们得做一些近似处理。
So you have what are called escape characters like backslash N that is the shorthand notation of telling the computer put a new line character here.
幸亏我们有一些类似反斜杠n的转义字符,这只是一种简化方式,用来告知电脑要在这新添一行。
A If you want to convert a number like 65 to the letter A, you just have tell the computer "cast that int to a char."
如果你要把一个像65这样的数字转换为字母,你只需要告诉计算机“把那个int型数据转换成char型处理“
Now, unlike high school math or in algebra Z where you call things X and Y and Z, in programming, in computer science, you're actually dealing with humans where it's useful to have a variable name that's more descriptive than X and Y and Z.
不像高中数学或者代数中,称为X和Y和,在程序设计和计算机科学里,你实际上是在和人打交道,在这里有个描述性比xyz更强的,变量名称是很重要的。
应用推荐