• It gives you a lot of expressive convenience, you can write the programs much more cleanly, but most importantly, it's fast.

    你可以把一些程序的更清楚,最重要的是,它的效率非常高。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • It's because the programmer or programmers that wrote that software might have been pretty specific but not specific enough.

    这是因为程序的软件,可能已经相当具体,但还是不够具体。

    哈佛公开课 - 计算机科学课程节选

  • So let me just to try something a little more interesting, and then we'll get to writing some simple programs.

    让我们来试试更加有趣的,一些事情吧,然后,我们再去一些简单的小程序

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • When we did the spring, we had this theory of Hooke's Law that told us something, and we built a simulation, or built some tools around that theory.

    当我们弹簧程序的时候,我们有胡克定律来告诉我们原理,然后我们建立了一个仿真模型,或者说是在这个理论基础上建立了一些工具。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Now just to get used to the conventions, 0 because this is the program you'll use not for problems at 0 but for 1 to start writing programs, notice at the top in this window just reminds you what you're working on.

    我们要入乡随俗,习惯这样的界面,因为这是你们将要用到的程序,不是为习题集0,而是0,而是为习题集1开始程序的,注意窗口顶部,这是用来提醒你,你工作在何种环境。

    哈佛公开课 - 计算机科学课程节选

  • Because the first time I wrote the program, I didn't have anything like that here and a stock could go to and then recover.

    因为我第一次这个程序的时候,我什么也没有,一只股票可以等于0然后再恢复。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Right, so the things we want you to take away from this are, get into the habit of using pseudo code when you sit down to start a problem, write out what are the steps.

    好,这儿我想大家明白的就是,养成解决问题时先伪代码的好习惯,把步骤都出来,我想要告诉你们的是一个好的程序员。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • So really, once we start writing more interesting programs, you would have to type out long annoying commands like that to just compile more sophisticated programs.

    实际上,一旦我们开始一些更复杂的程序时,你们可能要键入那样一些长的,讨厌的命令,来编译跟高级的程序

    哈佛公开课 - 计算机科学课程节选

  • 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会发布在网站上。

    哈佛公开课 - 计算机科学课程节选

  • 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.

    现在就提供给你们一些框架,在代码中有些空白,是为了让你们了解其中的思想,如果是你自己,若时间允许,那就尽量大的程序

    哈佛公开课 - 计算机科学课程节选

  • I could have just done this, and the only reason I didn't here is just because now I look - at this, and now it's just getting confusing for me -- even for someone who's been programming for a while.

    我本可以这样做,我之所以没有这样做是因为,现在我看着这个,它是我有点迷惑了-,甚至是对于某些已经了一段时间程序的人来说。

    哈佛公开课 - 计算机科学课程节选

  • Well, thus far, I haven't written any programs that themselves take any such arguments, and yet it turns out I can do exactly that.

    到现在为止,我还没有任何的,它们自己携带参数的程序,但是,我完全可以这样做。

    哈佛公开课 - 计算机科学课程节选

  • So I am going to on the fly write a very simple little main program that just illustrates some of the syntax that we can then visualize more interesting.

    我很快的了一个很简单地小程序,来说明一些语法,我们使它变得更有趣些。

    哈佛公开课 - 计算机科学课程节选

  • So I wrote a little program called "chart" that, based on some data I happened to hardcode into the program, shows us their numbers for the past several years.

    了一个叫做“图表“的小程序,基于我在程序中硬编码的一些数据,向我们显示在过去几年中我们课程的人数。

    哈佛公开课 - 计算机科学课程节选

  • Deep equality, we get to define, that's what I did by writing same point.

    我们需要自己定义,也就是我比较是不是,同一个点的那个程序

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • So now after all these stupid setup, we can finally dive in to the actual program.

    把这些规定的东西好后,我们才能真正的程序

    哈佛公开课 - 计算机科学课程节选

  • Now as an aside, I'll admit this is a completely useless program, much like the first couple of ones we did because why would you write a program just to solve this?

    说点题外话,我承认这是一个完全无用的程序,跟我们之前的两个程序一样,我们为什么需要程序来解决这个数学运算呢?

    哈佛公开课 - 计算机科学课程节选

  • And when we do a simulation, we're pulling the samples from some distribution.

    当我们一个仿真程序的时候,我们就是从一些分布中进行了采样。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • All you have to include in your own programs is the so-called header file.

    你们自己程序只需要包括,头文件就可以了。

    哈佛公开课 - 计算机科学课程节选

  • So, an alternative to that that is incredibly common in just the programming world and in industry is to actually not write programs on your own personal computer but to actually write and run them on a server, someplace where the software is all standardized.

    那么,在编程界和工业界普遍,使用的一个解决方案是,不在你自己的电脑上写程序,而是在服务器上编程运行,服务器上的软件都是标准化的。

    哈佛公开课 - 计算机科学课程节选

  • So let's go ahead and write a slightly more interesting program.

    好,我们继续,一个颇为有趣的,程序

    哈佛公开课 - 计算机科学课程节选

  • You'll see this was written by a former student of ours.

    你将会看到我以前一个学生程序

    哈佛公开课 - 计算机科学课程节选

  • I stress it in particular because I know you're all going to get into this stage; you've got a problem set due in a couple of hours, you're still writing the code, you don't want to waste time, and I'm going to use quotes on "waste time", doing those extra things to do the defensive programming, you just want to get the darn thing done.

    我特别强调了这一点,因为我知道你们都会慢慢成为程序员;,你在代码过程中造成了一系列的错误,你还在代码,你不想浪费时间,我想把“浪费时间“用引号圈起来,浪费时间来做因为防卫性程序设计,而带来的这些额外的事情,你只想赶紧把程序完,这不是一个好习惯,因为当你做完回头。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • All the supreme court justices would share our social values. And most importantly, our programs would work the first time we typed them. By now you may have noticed that we do not live in an ideal world.

    符合我们的社会价值观,但是最重要的是,我们好的程序,第一次就能顺利运行,如今你可能已经注意到了,我们生活的并不是一个理想的世界。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • So this first little piece of code right here says, ok you give me 2 points, I'll create another 1 of these lists and I'll simply take the x, sorry I shouldn't say x, I'm going to assume it's the x, the x-values are the two points, add them together, just right there, the y-values, add them together and return that list.

    好,为了来认识到这一点,让我们来看一个简单的小例子,在你们的课堂手册上,你可以看到我了一个小程序,它假设我得到了,这些点中的一些,我想对它们做一些操作,例如我想把它们加到一起,那么这里的第一小片,代码的意思是,好给我两个点,我会再创建一个数组。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • I've certainly written code that has this problem, I've tried to use my own code that has this problem, and good to us, right, good hygiene, I'm going to use that word again here, of getting into the habit of writing defensive code up front, it's part of that collection of things that you ought to do is a great thing to do.

    我举手了吧?,我当然过犯这种错误的程序了,我也尝试过应用含有这种错误的代码,不错,好的卫生,我还是要用这个词,对我们有帮助,养成防卫性,代码的好习惯,是你应该做的,一系列事情之一,也是我们日后要做的主要的事情。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • I can't give it what it wants," know that when you're writing code and the problems that will remind of this, if you absolutely have to kill your program, you don't have to close the window, CTRL+C reboot crazy stuff like that, generally you can hit CTRL+C and it will just abort the program right where it is, in case you ever get trapped in some awkward situation.

    我不能给它所要的“,当你在代码时,程序将,提醒这个问题,如果你不得不,关闭这个程序,你不需要关闭这个窗口,重启像那样的疯狂举动,通常你可以敲,它将会在这个地方终止那个程序,假使你陷入了尴尬的处境。

    哈佛公开课 - 计算机科学课程节选

  • 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.

    但是不久后你们会发现你们程序中,有很多很多的函数,有的函数调用这些函数,这些函数又调用另外的函数,你不能用脚本,把它们从上到下排序,因为所有函数相互混合,在你的函数中也有很多交叉。

    哈佛公开课 - 计算机科学课程节选

  • And this is useful because if you're actually writing a program that's interactive or that you want to change overtime much like you would a game, hopefully, the game is not going to have the bad guys, for instance, always standing in the same place or the rocks or whatever it is falling from the sky in the same place 'cause it would very quickly become a very tedious game.

    这是很有用的,因为如果,一个交互的程序或者,希望每次游戏都不一样,我们希望,游戏中的坏人物,别老是站在同一个地方或者同一块石头上,或者从天空中同样的位置落下,因为这立刻会使游戏变得乏味。

    哈佛公开课 - 计算机科学课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定