• PROFESSOR: I want to take a few minutes at the start of today's lecture to wrap up a few more things about debugging.

    教授:想在今天讲座的开头,再花几分钟讲完调试的剩余内容,然后们再讲主要内容。

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

  • You find some way of systematically going through the list. Yet, I often see people, when they're debugging, proceeding at what, to me, looks almost like a random fashion of looking for the bug.

    是不是目标元素,们有一种系统化的,遍历数组的方法,然后经常看到,有些人调试的时候。

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

  • I emphasize this because it often leads to a different debugging strategy.

    因为这会导致不同的调试策略,所以要强调这一点。

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

  • So one of the things I want you to notice here is that testing and debugging are not the same thing. When we test, we compare an input output pair to a specification.

    这里想大家注意的一件事,就是测试和调试是不同的两件事情,们测试的时候,们把输入输出,跟程序的规格说明书对比下。

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

  • Patience is an important part of the debugging process. I have not rushed.

    耐心是调试过程中的一个重要部分,没有着急,冷静的慢慢的。

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

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

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

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

  • Since I'm not sure I won't need to go back to it.

    注释掉了之前的调试语句。

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

  • There's a lecture I've given several times at hospitals, to doctors, on doing diagnosis of complex multi illnesses. And I go through it and almost the same kind of stuff I'm going to talk to you about, about debugging.

    一个实验室内的实验,为什么实验不对呢?,也在医院给医生关于,诊断复杂的多种疾病做过很多讲座,想了想,那和给你们讲的,关于调试其实都是一回事。

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

  • In line with what I said about debugging.

    这和在讲调试的时候是一致的。

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

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

    这就是有关调试好习惯的一些废话,也许你们会有争议,希望这些对你们会有帮助,而且希望你在调试的时候,会想起今天讲的这些话。

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

  • 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,你知道的,他们仅仅是认为比起用手做来,更应该直接去运行程序,但是这确实是调试代码的非常有价值的工具,让在这里给大家演示下吧。

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

  • So I'm going to have an assignment of y, I'm going to have an assignment of iters left, I've got a comment that I had borrowed in order to do some debugging, and then what do I want it to do?

    因此需要对y进行赋值,需要对iters,left进行赋值,还有一个用的别人的,用来调试的一些注释,那么接下来希望程序怎么运行呢?

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

  • How to fix it. When I think about debugging, I think about it in terms of what you learned in high school as the scientific method.

    怎么来修复bug,当谈论到调试的时候,认为你们应该依照在高中,在科学方法学中学过的。

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

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

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

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