So today is about writing some programs and empowering you to write your own starting this coming week when Pset One goes out via the website tonight by 7:00 p.m.
今天我们将要写一些程序,并且让你们,在接下来的一周写你们自己的程序,今天晚上七点,习题集1会发布在网站上。
Some programs won't stop until you're old and gray. And these are really different efficiencies, and we want to give you a sense of how do you reason about those different kinds of programs.
头发花白之前是不会停的,这些是因为它们的效率不同,我们想要给你们理解,这些程序之所以,表现不同的原因。
You will be able to infer from some of our code how in fact you can implement some more sophisticated programs.
你可以从一些代码中推断出,应该要怎样实现一些较复杂的程序。
That ended some years ago when the best programs began to beat grand masters.
但是那种局面在几年前,以象棋程序击败象棋大师而告终
Yesterday, on M.L. King Day, I had the privilege of being on at least four radio programs about this new book I have out called A Slave No More, some of them quite terrific.
昨天是马丁·路德·金的纪念日,我有幸被超过四家电台的问答节目邀请去,介绍我最新出版的一本书《无奴之国》,有些问题很有深度
We want you to have a sense of why some programs complete almost before you're done typing it.
一些程序你输入进去它,就能给出结果而另外一些,却要整夜整夜的跑。
Some programs run overnight. Some programs won't stop until I'm old and gray.
有些程序知道我老之前是不会停的,甚至有些程序直到你们。
If we're going to write programs, we need at least two things: we need some representation for fundamental data.
如果我们要去写程序,我们需要至少两件事情:,我们需要一些能代表基础数据的东西。
So let me just to try something a little more interesting, and then we'll get to writing some simple programs.
让我们来试试更加有趣的,一些事情吧,然后,我们再去写一些简单的小程序。
Take your time. So, let's actually now take a 2-minute break, we're gonna change tapes and we'll come back and we'll actually write programs with a real computer and some real animated characters.
不急,现在休息2分钟,我们要换个录像带,一会再上课,等会开始写程序,构建一些动画人物。
Now we're gonna hand you some framework, that code that we wrote with some blanks to get you accustomed to the idea of one, writing larger programs than time might allow if you were doing it on your own.
现在就提供给你们一些框架,在代码中有些空白,是为了让你们了解其中的思想,如果是你自己,若时间允许,那就尽量写大的程序。
This is boring. In fact, you can do some nice things to prove what is the class of functions you can compute with straight-line programs, and what you'd see if you did that is, it's not particularly interesting.
这很无聊,实际上,你可以通过做一些很有趣的事情,来证明你可以通过直线程序,来做很多功能,但是你也看到我们之前讲过的了,这不太有趣。
But very soon will you find that if you're writing programs with lots and lots of functions, and some might call these, and these might call these, you can come up very soon with scenarios where you can not order them top to bottom, because everything is comingled, and there's a lot of cross talk among all of your functions.
但是不久后你们会发现你们写的程序中,有很多很多的函数,有的函数调用这些函数,这些函数又调用另外的函数,你不能用脚本,把它们从上到下排序,因为所有函数相互混合,在你的函数中也有很多交叉。
In the case of last year we did hand students some code with which they could write programs that talked to Yahoo Finance, finance.yahoo.com, free website.
在去年的情况下,我们给学生提供一些,能用来写程序跟雅虎财经的免费网站交互的代码,即finance。yahoo。com,一个免费的网站。
Alright, that's the end of my, maybe sermon is the right word on debugging. Polemic, I don't know. I hope it will be helpful. And I hope you'll remember some of these things as you try and get your programs to work.
这就是我有关调试好习惯的一些废话,也许你们会有争议,我希望这些对你们会有帮助,而且我希望你在调试的时候,会想起我今天讲的这些话。
So let's go a little science fictiony and think about some of the robots that have been shown in science fiction movies, some of the computer programs that have been shown in science fiction movies, science fiction novels, or what have you.
我们来谈一点科幻作品,想一想,在科幻电影中,出现过的一些机器人,在科幻电影,以及科幻小说等其他科幻作品中,出现过的一些计算机程序
应用推荐