• If my code is correct, what should the average price be, after say, 100 days, if there's no bias. Pardon?

    如果代码没写错的话,如果没有偏向值那平均价格会是多少呢,如果没有偏向值,请说?

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

  • I'm not going to do it for you, but what would I think about doing when I change the code?

    要改变代码应该做什么呢?,不会帮你们做这些,但是在改编代码的时候会想什么呢?

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

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

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

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

  • When I started off I was programming for Sygen and I wrote the first version.

    一开始为网站写代码的时候,写了第一个版本。

    斯坦福公开课 - 扎克伯格谈Facebook创业过程课程节选

  • Right now, I have to take that piece of code and replicate it everywhere I want in my larger file.

    现在要把这段代码,复制到,大文件中的各个部分。

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

  • I will be posting code that you can play with, and I suggest you go through exactly this kind of exercise.

    给你一些你用的上的代码建议你们,多进行一些这种实验。

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

  • I've written a little for loop, which is going to iterate over all of the elements in the list.

    们先看看这儿的代码已经写了一个循环语句,用来迭代处理数组中所有的元素。

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

  • What happens now after we've executed this third line of code, what happens next in the story?

    执行完第三行代码会发生什么呢,在这之后会发生什么呢?

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

  • I was being a little lazy on Wednesday in the interest of simplifying the code as much as possible.

    在周三在那个网站上尽可能地,简化代码的时候,有点偷懒。

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

  • Because I might have written some code in which I'm expecting that integer particular variable to have an integer value.

    因为可能写了一些代码,来把一些,变量的类型,指定为。

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

  • But if I did have two lines of code or more, I would in fact need to put those back.

    但是如果的确有两行或更多的代码其实应该把花括号加上。

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

  • And then what I get to do inside the curly braces is literally line by line enumerate the cases that I want to apply to the following code.

    然后们在花括号中要做的是,逐行地列举接下来想要,应用的代码

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

  • I've read through the same thing twenty times and I've missed something obvious. Someone who's never seen it before looks at and says, did you really mean to do this?

    但是它们有一双旁观者之眼,把同一段代码读上20遍,都会漏掉一些很明显的错误,从没看过这段代码的人会告诉

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

  • Thing I've got a little procedure that could do that, but you know the simplest thing I could do is to say well, gee, wait a minute, why don't I just check to see if these are the same thing?

    这两个点是同一个点么?,已经写了一小块代码,可以提供这个功能,但是你知道的可以做的,最简单的事情就是说好,嗯?,等等,为什么不直接去看看,这两个东西相等不相等呢?

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

  • And we hope that at the end of the class, every time you're confronted with some technical problem, one of your first instincts is going to be, "How do I write the piece of code that's going to help me solve that?"

    并且们希望到了期末,每当你要面对一些,技术问题的时候,你们的本能之一将会是:,“怎么才能编写一个代码,来帮解决这问题?“

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

  • And to see that I've written another version of this, which I'm going to use here, where I'm going to give it a little indentation.

    已经写另一个版本的代码,将把它用在这儿,会在这儿加一点儿缩进。

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

  • But I got a couple of other of these strange looking things in there with underbars to them.

    可以在这片代码中看到这些,然后需要一些可以给,返回这些信息的东西,但是这里还有一些看起来。

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

  • Well basically, all I'd have to do is go through and find every place I checked the constraint, and change it. To incorporate the new constraint.

    比较简单,在最上方,基本上,做的所有事情就是遍历,整段代码然后找到对比。

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

  • What does that say? It says if in the code up here I get an exception of that sort, I'm going to go to this place to handle it.

    这意味着如果在代码中,得到一个这样的异常,能到这里来处理它。

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

  • Important lesson, so that there would be some predictability in the results and I would have some, if you will, smoke test for knowing whether or not I was getting, my code seemed to be working.

    这很重要,因为这样就可以预测,结果会是多少了,如果你愿意,们可以做烟气试验,来看代码是否工作正常。

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

  • Right now, what my code is doing is, it's printing them up for me, which is useful.

    它的所有的除数,现在,代码要做的就是。

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

  • Because if I don't specify a name for this input, I have no way of actually referring to it in subsequent lines of code.

    因为如果不给这个输入定义一个名字,在随后的代码中,就没有办法使用它。

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

  • And in the process of tidying it up and making it prettier, I'll often by accident find the bug.

    的程序更漂亮些,在这个清理美化代码的过程中,常常无意中发现的错误。

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

  • So you know from algebra I can't actually solve this. There may be multiple solutions to this. What would I have to do to change my code? And the answer is fortunately not a lot.

    解不出来方程,可能会有多组答案,需要怎样修改代码呢?,很幸运的,答案是不用修改很多。

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

  • I'd really like to have that modularity that says, I'm only going to get access to the values, not by calling their names, but by calling some specific method to get access to their names.

    这样们就丢掉了代码的模块化,很希望代码有这样的模块化:,访问变量的值,不是通过直接调用它们的名字,而是通过调用某个可以,访问这些变量名的方法来访问。

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

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

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

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

  • The only thing I've done in this part of the program, now I'm going to go and read the code, is I've gotten the user to input a bunch of data.

    现在去读读这里的代码,是会让用户输入一些数据,然后根据用户输入的数据。

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

  • Well, the first line of code, I'll fix the purple next time around so it's more legible.

    第一行代码用紫色标记,这样增加了可读性。

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

  • This also, by the way, in some sense, gives me the beginnings of my comments for what the structure of my code is going to be.

    顺便说一句,在某种意义上这也是,对于代码结构的,讲解的开始。

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

  • And for reference, incidentally, in case you ever forget what the point of some exercise was, I'll almost always comment the code up top with a quick sentence or two that reminds you what this program does.

    顺便作为参考,为了避免们可能忘记一些代码的意思,通常会用一两个简单的句子,在上面作出注释,那样会提醒们这个程序是干嘛的。

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

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

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

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