• So we can see what it's doing is it runs. So let's try fib it here with Fib of 6.

    我们可以看到它在,运行的时候做了什么,让我们试试。

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

  • So in general, when you're running command line programs, they can take input or arguments or parameters or switches or flags.

    一般而言,当你运行命令行程序时,可以把把这些当做输入,像什么参数啊,或开关啊,或标志啊等等。

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

  • All right. Then we're going to set low to-- low and high, and we're going to perform exactly the process I talked about.

    不满足条件,我们就可以直接停止运行了,好,接下来我们要定义边界值,然后按照我之前。

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

  • Now,having said that,let me just say as an addendum -- and this is my opinion,you could ignore it-- that things work in France.

    根据前面提到过的,再谈一点补充,这是我自己的看法,你们可以忽视,法国社会运行顺利

    耶鲁公开课 - 1871年后的法国课程节选

  • And now since it's reversible, we can run it forward or backward.

    因为它是可逆的,所以可以正方向运行

    麻省理工公开课 - 热力学与动力学课程节选

  • How many steps does it take for this function to run? Well, you can kind of look at it, right?

    这个方法运行了多少补?,你可以看看代码?

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

  • OK, says it says enter a float. I give it something that can be converted into a float, it says fine. I'm going to go back and run it again though. If I run it again, it says enter a float.

    好了,看到他说输入一个浮点数,我输入它可以转换为浮点数的值,那没问题,我回过来再运行一遍,如果我再运行一遍。

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

  • OK. Having done this now, I can simply go ahead and run this, and in fact if I go up here to run, you'll see I've got both an option to check the module, though in this case I'm just going to run it.

    好,讲完了这些,我可以去执行程序了,实际上如果我在这里运行,你们会看到我同样得到了,一个可以同时检查模块的选项,虽然在这个例子中我就是直接去运行程序了。

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

  • But it turns out that on Macs and if you have the right software on PCs, you can kind of get a teaser of what this environment tends to look like and be forewarned, what you're about to see is intentionally very underwhelming.

    事实上,它是运行在苹果机上的,如果你在电脑上有正确的软件,可以去看看这个环境大致是怎么样的,提前说下,这个程序不会让你印象深刻,我是故意这样做的。

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

  • So you can imagine that this is a very powerful mechanism. So let's look what happens when I run-- start to run this.

    因此你可以想到这是一种很强大的机制,让我们看看让我开始运行,这个程序的时候会有什么结果。

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

  • - These ones should curl, see if I can - oh, not bad. Let's run it.

    这些东西可以卷上去,让我们看看,结果不错,让我们来运行一下程序。

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

  • And then I could do things like again, say, okay having done, that let me just run it here, run that, so I've now got polar point 1, and polar point 2.

    然后给它们赋值半径和角度,然后我可以进行刚才的操作,也就是说,对刚才的笛卡尔坐标进行的操作,让我们来运行下它吧,运行下,现在我有一个极坐标点。

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

  • And that does two things: bug one, it helps catch bugs in your code, and secondly it often converts it into a more efficient sequence of instructions before you actually go off and run it. All right?

    这有两点好处:,第一是可以帮助你发现程序中的,第二是把你的代码,在运行之前,转换为更有效率的指令的集合,对不对?

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

  • Well, you could just try it and see if it works, right? That's what testing is all about.

    可以仅仅的去试试运行程序,然后看看结果对不对?这就是测试的内容。

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

  • I can tell you the answer, but that's because I've cheated, run the program before.

    可以告诉你答案,但这是因为我作弊了,我之前运行过一次程序。

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

  • Not just the one where it didn't work, but also the ones where it did.

    因为可能程序对一些输入可以,正确运行但对另外一些却不能。

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

  • And if your program doesn't work, that should be your first guess.

    如果你的程序无法运行的时候,它们可以成为你的第一猜测。

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

  • One of the inputs to the problems we're gonna be working on this semester and if you continue on in this world how much thought it takes to implement something, how much time it takes to run something, how much space it takes to run something?

    我们将在本学期集中探讨这些问题,或者在课程之后你们也可以继续研究,为实现一些功能要有多少想法,在运行过程中又将花费多长时间,需要多大的空间?

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

  • You could run through a little loop to say keep trying until you get one. But one of the ways I could deal with it is what's shown here.

    可以运行一个小循环来不断地做,直到得到一个输入,但你应该做的是弄明白这里到底要干什么。

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

  • OK. All right, let me show you one other tool that I want to use. Which is, I've written that piece of code, I ought to check it. Well, I could just run it, but another useful thing to do is, I'm, especially as I want to debug these things, is to simulate that code.

    好,那么,让我给大家讲下,我想用的另外一个工具吧,也就是,我已经写好了这一块代码,我应该去检查检查,那么我可以运行它,但是特别是当我想要调试代码的时候。

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

  • Suppose instead, I want a machine that can take a recipe, the description of a sequence of steps, take that as its input, and then that machine will now act like what is described in that recipe.

    假设换成这个,我想要一台可以安装描述,一系列步骤的结果的方法的机器,把那个当做输入设备,然后那台机器可以像方法中,描述的那样运行了。

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

  • Now, the things in green are special things that I ran.

    其中绿色的文件是可以运行的。

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

  • GCC We start at this lower level with GCC.

    我们可以在低平台上运行

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

  • And we must know what the result is supposed to be. Typically when you run an experiment, you say, and I think the answer will be x.

    这样我们可以来查看代码的进程,我们还必须清楚结果应该是怎么样的,比如当你运行一个实验的时候。

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

  • Well, what I always do in anything like this is, the first thing I do is, I run it on something where I can actually compute the answer in my head. So I get a sense of whether or not I'm doing the right thing.

    好的,我常常在,这种问题中会做的是,我会做的第一件事是我,会先带入我可以心算的值来运行,因此我能够知道我是否做对了。

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

  • I could run it, it'll do the right thing.

    可以运行这个程序,程序没错。

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

  • The format is the same. I'm going to ask for some input, and then I am going to use that procedure to check, is this the right type of value. And I'm trying to use that to do the coercion if you like. Same thing if it works, I'm going to skip that, if it not, it's going to throw the exception.

    格式是一样的,我需要一些输入,然后我要用一个过程来检查,是否是正确的值,然后你就可以做强制转换了,如果能运行,那是一样的,我打算跳过这段,如果不正确,那就会抛出一个异常。

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

  • You're doing work on the environment.

    可以驱动汽车运行

    麻省理工公开课 - 热力学与动力学课程节选

  • You can very quickly drive yourself nuts by sitting down, thinking, oh, I can write this program, no sweat, and then you write it and then there's a tiny little mistake here, but then there's a tiny little mistake here and here, and all of these stupid little things cascade until you try running your program, and the thing just doesn't work.

    如果你只是仅仅干坐着,不费吹灰之力,凭空幻想着我可以把这个项目搞定,你会想地发疯的,也许你会写出一点东西出来,可能会有一点点错误,紧接着这或那又出现一点小错误,这些小错误一点一点地堆积了起来,直到你开始运行你整个项目,你会发现这堆东西根本就不工作。

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

  • That's the question we're going to try and address. If we can do this, this is good, because first of all, it removes any questions about what machine I'm running on, it's talking about fundamentally, how hard is this problem, and the second thing is, it is going to do it specifically in terms of the input. Which is one of the things that I was worried about.

    这是一个我们接下来要去,尝试和解决的问题,如果我们能做到的话会很不错,因为首先,它解决了结果可能和我,运行的计算机有关系的问题,因为这从根本了告诉了,我们这个问题的复杂度,第二件事情,就是这种方法可以依据输入的大小来计算,而这正是我最担心的地方。

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

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

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

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