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

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

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

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

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

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

  • Alright, we are back so we just wrote a programming pseudocode or walk through a programming pseudocode.

    继续上课,刚才我们只了一个伪代码,或者说简单地过了一下。

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

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

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

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

  • Right. If you look at the rest of that code, gee, it looks a lot like what I had elsewhere.

    好了如果你看看剩下的代码,天呐,看上去就像我在别的地方过的。

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

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

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

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

  • We want to write a piece of code that helps these guys out, so I'm going to show you an example.

    通过一段代码,来解决一个这样的问题,接下来让我们来看个例子。

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

  • We won't make you write dramas like Pirandello, but we're going to try make you at least write good code.

    我们的函数中的东西,我们不会让你去皮兰德娄的荒诞剧,但是我们会教你漂亮的代码

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

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

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

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

  • So when you're writing a program in this language and many others, if you wanna make a comment to yourself or for other people who are reading this with their TF or fellow colleagues, you use what are called comments.

    当你用这样那样的语言程序时,为了便于自己或他人,阅读我们代码,我们必须得做一些注解,这就是所谓的注释。

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

  • And the second thing that we talked about is this idea that we want you to in fact learn how to relate a choice you make about a piece of code to what the efficiency is going to be.

    关于这个方法第二件事,就是我们实际上希望,你在写代码的时候,能做出优化效率的选择,因为此。

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

  • I know this is a simple example, but when you mature as a programmer, one of the first things you should do when you sit down to tackle some problem is write something like this pseudo code.

    我知道这是个很简单的例子,但是当你们成长为一名程序员后,当你们碰到问题后第一件事情就是,该一些类似于,伪代码的东西。

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

  • Now I mention this only because over time, this will become important when you're not reading in files necessarily but writing files.

    我之所以提到这个是因为久而久之,当你自己写代码而不是读代码时,这会变得非常重要。

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

  • We hand you a bunch of programming code that we wrote because this is very much the norm in the real world.

    我们给你们一些我们自己代码,因为在现实世界中这都是非常正常的。

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

  • Which is a way of reminding you that I need to think as I write the code about what are my expectations from the input, and how might I enforce them.

    通过这个我在提醒大家,在写代码的时候,要搞清楚对输入的期望,并思考下如何执行这些期望。

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

  • It's the same computation. But this is a nice way of writing it, often called defensive programming.

    这跟原来的计算过程没什么不同,但这是写代码的更优秀的一种方式。

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

  • You need multiple lines of code, you need these days to use something called a scanner class.

    你需要许多代码,你要学会使用扫描仪。

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

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

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

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

  • All right. The fourth thing I'm going to do, is I'm going to then construct the block of code.

    好,我要做的第四件事情就是,我会去这块循环代码

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

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

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

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

  • Right, so the things we want you to take away from this are, get into the habit of using pseudo code when you sit down to start a problem, write out what are the steps.

    好,这儿我想大家明白的就是,养成解决问题时先代码的好习惯,把步骤都出来,我想要告诉你们的是一个好的程序员。

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

  • And that then let's me get to, basically, base this code. Having done that, height I simply call base with get float, I call height with get float, and do the rest of the work.

    现在让我们看看这段代码,其实已经好了,我简单的调用下,用来得到一个浮点数,再调用下,来得到另外一个浮点数,然后做剩下的工作就可以了。

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

  • And it becomes a powerful way of reasoning about the code, a powerful way of using the code, so those notions of specs are really important.

    以保证你代码,这将成为分析代码,使用代码的重要手段,所以规范说明的概念。

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

  • 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年前的代码,就算是你自己代码,这也说明了你放进去的注释,已经非常好了,对不对?

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

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

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

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

  • When we start writing code, you're going to see that difference, but for now, don't worry about it, I just want to plant that idea.

    当我们开始写代码的时候,你就会看到区别了,但是现在别担心,我只是想让你们初步有个印象。

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

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

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

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

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

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

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

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

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

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

  • It's looking at the end test. It's looking at the kinds of conditions you're going to put in.

    写代码的方法了,也就是通过讨论终结测试,通过讨论放入的条件。

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

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

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

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