• All right, you can see that this little piece of code, it's got a loop in there, and what's it doing?

    好,你们看到的这一小块代码,做了一个循环吧?,他在做什么?

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

  • Chapters 17 through 26 then are a block of material that's referred to as the "Holiness code" because of its special emphasis on holiness.

    7章到26章一块,被称为“神圣的代码“的内容“,因为它侧重于神圣。

    耶鲁公开课 - 旧约导论课程节选

  • Up on the screen, I've got-- I commented it out, but I've got a piece of code that you've seen before, right up here. OK?

    我现在在大屏幕上标出来的,你们以前看过的一段代码,就在这儿?

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

  • So the open curly brace followed by the closed curly brace means everything inside of these curly braces should get executed, but only if that first condition is actually true.

    所以左花括号后面跟着,右花括号,这意味着花括号里面所有的代码,都应该要被执行的,但只有当第一个条件正确的。

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

  • It could be, preconditions I want to have on input It could be, explanations of specific things you're doing.

    也可以我对输入的预期什么,也可以,对代码,正在进行的特定操作的解释。

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

  • What is that? It's the piece of code we wrote for computing square roots, square roots of actually perfect squares.

    对吧?这什么呢?,这我们写的计算平方根的代码,计算完全全平方根的。

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

  • In general, good programming style says you put in comments that are going to be valuable in helping you as a reader understand what's going on inside of the code.

    通常来说,优秀的编码风格意味着,你要放进去的注释,在帮助代码阅读者,理解代码内部,怎么工作的。

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

  • But the things we were trying to stress were that it's an important design decision when you are coming up with a piece of code, as to what kind of efficiency your code has.

    我们这里要强调的,当你写代码的时候,决定你的代码的效率的很重要的事情,就你的设计决定。

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

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

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

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

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

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

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

  • The only thing that compiler needs to know is kind of what pattern to look for in the rest of your code.

    编译器需要知道的唯一的东西,用来在剩下的代码中寻找的函数形式。

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

  • So things break if you try-- if the computer tries to take you too literally so it would not be correct generally to do something like that.

    如果你把它分开-,那么电脑会逐字逐句地解析,你拆开写的代码,由此得到的结果一般都错误的。

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

  • And I want to remind you, that block of code is a set of instructions, the same set of instructions that are going to be done each time through the loop.

    我想提醒大家,这块代码是一个指令集,一个每次循环都会被执行的相同指令集,会变化的仅仅变量的值。

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

  • OK. So. Why did I do it? It's a simple example, I agree, but notice what I just did. It allowed me to highlight, is the code doing the right thing?

    一个简单的例子,我同意,但请注意我刚才怎么做的,我通过它想要强调,代码是做了正确的?

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

  • So a couple of commands and then an interesting code and then the teaser, that's a teaser.

    总结起来,就几个命令,一个有意思的代码,然后那个小技巧,那一个小技巧。

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

  • Second thing to notice, is that little piece of pseudo code is telling me things about values.

    然后需要注意的,这些伪代码告诉了一些关于值方面的事情,我需要一个浮点数。

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

  • But now at least we're a step closer to doing something that's a little bit more compelling, but this isn't always a good thing.

    现在至少,向更引人入胜的代码靠近了一步,但这并不总好事。

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

  • That code says the following: the IF says, I've got an expression, I'm going to evaluate it.

    代码的含义这样的:,我有一个表达式,我会去对这个表达式求值。

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

  • It's words to you, or to the reader of the code, that are telling you what's going on inside of this code. OK?

    注释一些对你,或者对代码阅读者说的一些话,告诉你这段代码,干什么的,对不对?

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

  • This chunk of code and this chunk of code, they're really doing the same thing.

    这一块代码和这一块代码,它们实际上相同的功能。

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

  • This little set of code here from create insert and number. What's create do?

    这一小段代码是创建插入和编号的,创建做什么的?

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

  • So, it frees you from some of Apple's tethers and this was the code that circulated on the Internet iPhone with which people could crack their iPhones.

    这样我们就从苹果的约束下解放出来,这些代码是在网站上流通的,使用它们可能损坏你们的。

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

  • So, I'm getting a string and so what really am I doing in this line of code?

    那么,我得到一个字符串,这行代码实际上干什么的呢?

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

  • Because there will not be time to look at that code for the first time during the quiz, and figure out what it's doing.

    因为在考试中,没有时间去第一次看代码,并弄懂它的意思的。

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

  • But in general, the choice of variable name is a great way of commenting your code.

    通常来说,变量名称的选择,评论你的代码的,一个重要方式。

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

  • Those are fancy terms. Decomposition is a way of putting structure onto the code.

    这些都诱人的术语,分解一种将代码结构化的方法。

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

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

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

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

  • copy1 So this is the code that we had a moment ago for copy one.

    我们之前的那个代码

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

  • I'm going to use my own special program that will color code things for me in class, but the idea is the same; it's a text editor.

    我将用我自己专门的程序,那个会分类为我标出代码的颜色,但那个思想一样的,这一个文本编辑器。

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

  • You want to write the specs so that everybody does in fact know what this piece of code is doing, and you're writing it each time around.

    你得养成良好的习惯和编程风格,你得撰写规范说明从而保证,每个人都知道这段代码是干什么的。

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

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

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

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