And just as a fun aside, we also realized as computer scientists that sometimes technology is not the answer.
抛开趣味性不提,我们意识到作一个,计算机科学家来说技术,并不是我们要的最终答案。
I'm not one of the, you know, forty thousand computer science people here.
我不属于那四万个计算机科学专业的人。
People tend to think, because the computer says it's so, it must be so. That the computer is- speaks for God. And therefore it's infallible.
那么一定就是这么回事了,他们认为计算机代表着神一样的存在-,因此是不可能犯错的。
Okay, so while not equal to, so bang equals, exclamation point equals is computer science syntax for saying not equal to, 0 while not equal to 2 which it is not, it is equal to 0.
好的,尽管不等于不是相等的反写,但惊叹号在计算机科学的语法是不等于的意思,尽管不等于2,但它是等于。
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.
如果你有一台能下国际象棋的计算机,你想要解释计算机是如何下国际象棋的,如果你不谈程序以及计算机的内部结构,那你就不能对它如何下国际象棋,给出解释。
Two pieces of memory actually touching each other or you touching memory that you don't actually own, in which case the computer doesn't really know what to do and just, bam.
两块内存相互覆盖,或者你覆盖了不存在的内存,那样的话计算机不知道,该怎么做,只有崩溃。
What happened? I'm down here and try, I'm trying do get grades, which is a call to that function, which is not bound in my computer.
尝试着读取成绩,这被称为函数,是不被我的计算机局限的。
One of the discomforts, one of the reasons that I think so many people in society and even in this class are uncomfortable when it comes to computers and intimidated by technology and kind of throw up their hands when things go wrong that you don't understand is frankly not necessarily your fault.
当我想到在社会中,即使在这个班级上,有那么多的人,使用计算机时是不舒服的,他们被这种科技吓到了,束手无策,当发生故障时,你也不知道,其实,这也不是你的过错。
If history is any indication 72% of the people ; in the theater have no prior programming experience; despite what you may think and despite the fact that some of you may very well be thinking, odds are I know the least about computers than anyone in here, I'm actually a little scared of my computer.
以往的经验表明,大讲堂里72%的人没有任何编程经验;,不管你们怎么想,有些人可能现在就在考虑了,奇怪的是比起在座的各位,我最不了解计算机,我甚至有点怕我的电脑。
Right, it's a syntactic error, because it doesn't know how to deal with this.
好,这是个语法错误,这是因为计算机不知道怎么来解释着个。
Computers smart though they may be and intimidating though they may be, they cannot yet think for themselves.
计算机可能是智能的,也可能是可怕的,但计算机还不具备自我思考的能力。
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的平方不等于?
They're still there, but the computer has forgotten what is, in fact, there.
他们还在那里,但是计算机不记得那是什么,实际上,在那里。
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.
如果不熟悉,这是机械计算机设备,当今你必须使用它们来买地铁票,它们实在是难操作的,这个令人同情的情况是,明显这位老太太不知道怎样操作,怎样从这一步到那一步,我看见她只是凝视着,地铁的栅门口。
I mean what if you're running so many things, what if the user has copied and pasted their thesis and just pasted it at the blinking prompt such that you're now out of memory because your computer is somewhat limited in memory so get string cannot possibly return all those characters or fit all of those characters in memory and return to you the address of the first.
如果你运行了很多程序,假使用户复制粘贴了他们的论文,只是粘贴在光标提示符那里,这样就出现了内存不足,因为你们的计算机的内存是有限的,所以GetString不可能返回所有的字符,或者保存这些字符到内存中,并且返回第一个字符的地址。
But one of the teaching fellas also passed long to us recently, a little real world example of what happens when you're not mindful of various data types and you're not mindful of the imprecision that's inherent in representing data in a computer, at least using a language like C and low level primitives like floats and even doubles.
最近有个助教告诉我们,一个现实世界中的例子,当你不注意各种各样的数据类型,也不注意在计算机中表示数据时,其内在的不精确性,至少在用像C语言,和float甚至double型数据时,那将会发生什么?
应用推荐