Well, the infinity mechanism, and many of you will be familiar with this from mathematics or computer science, is recursion.
这种无限机制是递归的,你们许多人会在数学与计算机科学中,熟悉这个词
So there're actually some really interesting computer science ideas underlying that we promised on Wednesday that computer science.
其实在我们周三,要上的课程中涉及很多有趣的,计算机科学的思想。
To do that, we need to describe: not only, what are the primitives, but how do we capture things legally in that language, and interact with the computer?
为了达到这个目的,我们需要描述:,包括程序基本的东西,以及怎么在这种语言中,做我们想做的事情并和计算机交互?
I was deciding between political science at the time and computer science because I have always been fascinated by cities and at some point want to maybe potentially go into government I'm still not quite sure if I have more effect there or more effect in programming.
我那时要在政治学和,计算机科学,中做出选择,因为,我一直为城市着迷,我潜意识里有些想去政府工作,我并不确定我以后在,政治上更有成就还是在编程上更有成就。
So the enrollment numbers are in and we thought we would share some statistics, as we like to do in this course; being computer scientists, we tend to gather lots of data.
登记加入我们的人数在这里,并且我们觉得我们能分享一些统计资料,我们在这次课程中也喜欢这么做,作为计算机科学家,我们要收集很多数据。
Okay. I didn't see computer science in his background.
在他的知识背景中并没有计算机科学。
But for those of you who decide to go on in computer science realize there is a whole interesting world that uses details like these in the world of networking, in hardware, to actually solve some real world problems.
而对于你们中想要在计算机科学,方面有所发展的人,将会遇到一个非常有趣的领域,在那个世界里,会有许多像网络世界,硬件界,这样或那样的小细节,但又往往是这些小细节才解决了许多真实世界里的问题。
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的平方不等于?
D-A-V-I-D Well, if I've got a five-letter word like D-A-V-I-D, well, that's like five bytes and yet we only have the ability thus far in this class to return one thing at a time I can't return five bytes to you, but wait a minute, those bytes by nature of a computer are just stored in RAM.
好的,如果有5个字母的单词,如,那是5个字节,我们只能返回一个东西,而不能返回5个字节,等一下,这些字节被计算机本能地,存储在内存中。
So what would be the letter A in binary inside of a computer's memory when you hit the letter A on the keyboard, for capital A?
当你敲击键盘上的字母A时,那么在计算机二进制的存储中,字母A是什么样的呢?
And if you ask the TAs in recitation tomorrow, they'll tell you that you see a lot of n log n algorithms in computer science.
如果你明天在复习课上问助教的话,他们会告诉你在计算机科学中,存在着非常多的n,log,n规模的算法。
A patterned series of these tiny charged berries on the disk represents a single bit of data in the binary number system used by computers.
这些在磁盘上的有序的小粒子,代表这个当代计算机中,二进制中单独的一位。
Well, we saw the teaser in terms of that animation that suggests this merge sort algorithm when implemented by a computer is absolutely faster.
我们从前面的动画中可以看到,这个归并排序算法在计算机上实现之后,绝对比其他算法更快。
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更强的,变量名称是很重要的。
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型数据时,那将会发生什么?
应用推荐