• And so you'll learn over time both by seeing and by doing that there are generally some good ways, some okay ways, and some bad ways of actually writing code.

    久而久之,你们将通过看和实践来学习到,这里通常有很好的方法,行的方法,很烂的方法来编写代码

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

  • If you can read the code a year later, even code you wrote yourself, it's a good sign that you put good comments in, right?

    如果你能读懂1年前的代码,就算是你自己写的代码,这也说明了你放进去的注释,已经非常好了,对不对?

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

  • Again, I want you to start seeing how to map the characteristics of the code- the characteristics of the algorithm, let's not call it the code-- to the complexity.

    是算法中的那些特性,我们是别说代码了,转化为复杂度-,我一会儿会再讲点儿这个的,但是我们再看一个例子。

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

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

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

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

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

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

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

  • Remember last time, I said that there's different kinds of complexity in our code, and I suggested for simple branching programs, the amount of time it takes to run that program is, in essence, bounded by the number of instructions, because you only execute each instruction at most once.

    但是这里有个很重要的点,记得上节课,我提过在我们的代码中,有不同种类的复杂度,而且我说了对于简单的分支程序,运行这种程序需要的总体时间,大体上,是和指令的数目相关的,因为每个指令只会被执行最多一次。

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

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

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

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