• You should acquire overtime this instinctive aversion to just code or programs that just look ugly because things that look ugly generally are not easy to maintain.

    对于代码和程序你会有一种本能的讨厌,这是因为这些代码和程序看起来很丑陋,并且不容易维护。

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

  • And notice because I have just one line of code inside of each of these branches, what have I clearly omitted?

    请注意因为我在每个分支中只有一行代码,显然地我省略了什么?

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

  • That is if I can write code that would solve all instances of smaller size strings, then what I just described isPalindrome will solve the larger size one.

    然后我会描述如何处理大字符串,事实上这正是我所做的,我希望你能看看这边的这段代码,就是这个。

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

  • And the robot or the computer or what have you is just automatically, mechanically following the code commands of the program.

    那些机器人,或叫做计算机等等,只是自动地,机械地执行程序的命令代码

    耶鲁公开课 - 死亡课程节选

  • I took those same references the exact opposite way, 'cause I thought that essentially he's referring to the temporality of our moral structure, and how it's just this arbitrary code which our society has decided upon.

    我对那些参考的理解完全不同,因为我认为本质上他提到了我们道德基准的暂时性,还提到它们如何只是我们社会,随意决定的准则。

    耶鲁公开课 - 1945年后的美国小说课程节选

  • It ultimately evaluates that line of code but just once the stuff inside the curly braces, but the semicolon on the end, essentially has the effect of this.

    它最终执行了那行代码,但是只有一次,当那个东西在花括号里,分号放在后面,本质上影响了这个循环。

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

  • We could certainly implement this much more efficiently by just writing this one line of code, but, again, the key here is to take this step toward decomposing our code into chunks of code.

    我们可以写这一行代码,使代码的执行更有效率,但是,这个关键字用来把我们的代码分解,成一段段的。

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

  • OK, so far though, I've just shown you what happens inside a peace a code. It raises an exception. It goes to that accept clause. We don't have to use it just inside of one place.

    好了,我已经给你们看了,代码内部发生了什么,它报了一个异常,然后就到了处理的片段,我们不该就在一个地方用它。

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

  • 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 the next little piece of code I've written here, just move down to it slightly.

    好,我可能想做的一件事情是,这两个点是不是同一个点呢?,因此我在下面写的。

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

  • And this starts to make our code more readable, more elegant, just a little more compact.

    这个使我们的代码变得更易读,更优雅,更简洁紧凑一点。

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

  • - Writing code that just looks-- I'm not even sure what this is supposed to look like, a little flower or pinwheel or something like that.

    这代码写出来有点像-,我不确定这像什么,像朵花,或纸风车,或其他什么东西。

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

  • You write the source code, the stuff that looks like this and then you save your file, and now you just have a text file.

    比如你们写出像这样的源代码后,保存,你将会得到一个文本文件。

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

  • So in your mind, if you are now the computer program and you are executing this thing from top to bottom, what just has happened verbally is we are stepping into the line of code that says sort left half of elements.

    在你们看来,如果你现在是计算机程序,正在从上到下执行一系列指令,刚才所发生的就是我们现在已执行到了这行代码,它告诉你要对左半部分的元素排序。

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

  • Anytime you find yourself in this pattern, odds are, what you're doing is a candidate for being factored out, hierarchal decompositions is the buzzword you'd see in the textbooks if you're following along with any of them, but it's really just the idea of taking out common code and putting it into just one place.

    任何时候你发现你处于这种模式中,可能,你所做的东西是可以提取改进的,体系分解是一个你在课本中看到的流行词,如果你遵循其中一个,这个实际上是一个把相同的代码,放到一个地方的思想。

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

  • Another way of saying it is, anything that uses get float doesn't care what the details are inside or shouldn't, and if I change that definition, I don't have to change anything elsewhere in my code, whereas if I just have the raw code in there, I have to go off and do it.

    换种说法就是,任何用到获取,输入这个功能的人不用担心具体的实现细节,如果我改变了这里的实现,我并不需要去改变我的代码,因为我的最底处的源码就在这里,我去改这里就可以了。

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

  • Today, I'm gonna start writing C code with you but I can't just write it and expect it to do anything.

    现在,我和大家一起写C语言代码,但我不指望写出来后就能跑起来。

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

  • Just like people have a genetic code, perhaps, that gives us various instructions that we begin to follow out, or certain innate psychology or what have you.

    就像人类拥有基因编码,给我们传达各种各样,得以遵循的指示,或者是某种与生俱来的心理,等等等等

    耶鲁公开课 - 死亡课程节选

  • And because there's nothing else in the code at that point, the program should just quit naturally in a good way. Yeah?

    因为在那个阶段的没有其它的代码了,这个程序将以一种比较好的方式自然地退出,请说?

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

  • Well just to see what we know what we're doing, let's look at this code here.

    我们下一步该去怎么做呢?,好,让我们来看看。

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

  • At least you maybe finding that and if not when you look back at the code you then have written you'll realize that in fact it just requires a few lines of code.

    至少你会发现这一点,不然的话,在你写完代码,返回去,看的时候你会意识到,实际上它只需要几行代码。

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

  • I want to just use it, I shouldn't have to worry about what variables I use inside of it, I have shouldn't have to worry about where that is in the code, I should be able to just abstract it away. And that's what we want to add today, are those two things.

    我只是想使用它,我不用考虑我在这段代码中,使用的是什么变量,我完全不用考虑代码的内容,只要抽象就好,我们今天想补充的内容就是这两点。

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

  • Maybe just reading the code and studying it and convincing ourselves that works.

    也可能仅仅就是读读代码做做研究,说服自己代码是可行的。

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

  • I keep seeing addition and I keep just copying my code, copying my code.

    我总是看到加法,我一直复制我的代码,复制代码。

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

  • OK. So if I look at this code, first of all I'm calling search, it just has one call, so looks like search is constant, except I don't know what happens inside of b search. So I've got to look at b search.

    首先调用一下搜索,就一步调用,看起来搜索是固定的,除非我不知道二分搜索的原理,那我们来看看二分搜索吧,所以让我们看看,第一行打印出来的内容。

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

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

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

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

  • Let me just clean up the code a little bit.

    让我停下来找找错。

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

  • stdio h This file here is called standard I/O or stdio.h and this is just another text file someone else wrote many years ago and by using that line of code there, I'm telling the computer, give me acces to this code that this other person wrote that's in that file.

    在这里的头文件称为标准输入输出文件或,这是由某位前人编写的文本文件,我们只需要刚才所述的一行代码,就能告诉电脑,让我连接到,这个前人在那个文件中写的代码。

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

  • Well, just this line of code here.

    看到这一行代码。

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

  • It's just a series of lines of code.

    那只不过是一系列一行行的代码

    耶鲁公开课 - 死亡课程节选

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

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

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