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

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

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

  • Let's assume, for sake of argument, the thing I'm looking for is bigger than this. In that case, I'm going to throw away all of this, I'm going to hit that bottom line of that code.

    让我们假定不是,假定要找的元素,比这个大,在这样的情况下,这些都擦掉,我要运行到代码的最后一行。

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

  • Now in fairness, that particular problem kind of happened because so many companies ended up running so much code for many more years than the programmers actually thought they would be running it, but the idea is still the same.

    公平起见,那个问题有时会发生,因为实际上,很多企业在这么多年里运行了,比程序员多得多的代码,虽然他们将运行它,但那个构想还是一样的。

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

  • And the problem is, that we want to build this abstract data type, but we'd like to basically know what kind of object is it, and what functions actually belong to it, how do we use them?

    然后我对它们运行了这个方法,就是这一小段代码这个方法,这有意义么?,当然没有了,对不对?,因为你知道,当你把两个极坐标,表示的点进行相加运算的时候?

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

  • Code is right here. And all it's doing is when I'm getting into the different places I'm simply printing out information about where I am. What I want you to see palindrome is notice what happened here.

    代码就在这儿,它的作用是当我运行到不同地方时,就输出我所在方位的信息,我想让你们看的就是注意这儿发生了什么,好了我调用了一个。

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

  • So if you're coming from prior background, your code might work a little differently on a different system if you don't use those flags.

    如果你来自一个先前的背景,如果你们没有使用这个版本标志的话,在一个不同的系统中,你的代码可能运行地不太一样。

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

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

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

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

  • I just reran make or GCC does it for me, and now I've got all these errors. Well, let's see.

    我刚重新运行了make,或者GCC为我编译了代码,现在我得到了这些错误,好的,让我们看看。

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

  • Let's run merge sort on it, and then we'll look at the code.

    让我们在这个列表上运行归并排序,然后我们在看一下代码。

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

  • So the interpreter is simply operating directly on your code at run time.

    因此解释器在运行程序的时候,会直接的对你的代码进行操作。

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

  • I guess it's not macho enough, John, to just, you know, you know, go off and do things by hand, you ought to just run them, but it's a valuable tool to get into, so let me do that here.

    我认为这不太男人了,John,你知道的,他们仅仅是认为比起用手做来,更应该直接去运行程序,但是这确实是调试代码的非常有价值的工具,让我在这里给大家演示下吧。

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

  • I'm binding a z to be some value, and then I'm going to run this.

    我把z绑定到一个值上,然后运行下代码。

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

  • And then you can delete it once you're sure your code is working right.

    当你们能够确定你们的代码运行正常的话,你们可以把这个“printf“,语句删除掉。

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

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

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

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

  • Why it's failing to work properly.

    因此验证可能会说,噢,代码没法运行。

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

  • Pseudo code. Now, you're all linguistic majors, pseudo means false, this sounds like code that ain't going to run, and that's not the intent of the term. When I say pseudo code, what I mean is, I'm going to write a description of the steps, but not in a particular programming language.

    伪代码,基于你们都是学语言的,伪代码意味着不正确,这听起来就像是没法运行的代码,这可不是我们学这个的目的,当我说到伪代码的时候,我的意思是要对步骤进行一个描述,而不是某种特定的编程语言。

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

  • And I've put it in my debugging code.

    调试的代码中去,然后运行看看结果。

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

  • Otherwise, what does that code say to do?

    另外,这段代码宣称是怎么运行的?

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

  • So, summarizing better, assert is something you put in to say to the user, make sure you're giving me input of this type, but I'm going to guarantee you the rest of the code works correctly. Exceptions and exception handlers are saying, here are the odd cases that I might see and here's what I'd like to do in those cases in order to try and be able to deal with them.

    所以更好的总结下,断言就是你放在那里告诉用户,保证你输入的是这种类型的,但我能保证剩下的代码运行正确,异常和异常处理做的事,这里有些我能预期的异常情况,并且这里有些情况,我能尝试处理。

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

  • So in other words, if you terminate these lines early, if you terminate the four loop early, if you terminate an if condition early with that semicolon, the code may very well work; and this is a common source -- of frustration and conundrum because you don't -- because your code looks right and yet it's misbehaving, but that semicolon means stop looking for subsequent lines of related code.

    换句话说,如果你用分号过早的终止了这些代码行,如果你过早地终止了那个for循环,如果如此,一个if条件,代码可能可以运行,这就是,挫折和问题产生的源头,因为你没有-,因为你的代码看起来是正确的,但是运行是错误的,那个分号的意思是,停止寻找后面相关的代码。

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

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

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

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