• What I'm more interested in here than in the result of the simulation, is the process of creating it.

    然后你们可以进行思考,我对这些过程,比对仿真程序结果更感兴趣。

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

  • Why does agreement to a certain procedure, even a fair procedure, justify whatever result flows from the operation of that procedure?

    为什么只要经过了特定程序,公平的程序,不管任何结果都可以视为正当呢?

    耶鲁公开课 - 公正课程节选

  • And if the test is true, it will change the value of this program counter to point to some other place in the memory, some other point in that sequence of instructions, and you'll keep processing.

    如果测试结果为真,它会改变程序计数器的结果去,指向记忆存储器里的其他地方,指令序列里的其他地方,然后你会继续这个过程。

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

  • So, we'll talk about this other axis of style on the course, writing code that looks pretty and as well aesthetically laid out.

    我们来讨论一下这个中心对称的程序,这程序写出来的结果很漂亮,完全按照美学角度摆放。

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

  • We want you to have a sense of why some programs complete almost before you're done typing it.

    一些程序你输入进去它,就能给出结果而另外一些,却要整夜整夜的跑。

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

  • So when someone comes to me, and they're about to do a test, I ask them, what do you expect your program to do?

    因此当很多人找到我想要,做一次实验的时候,我问他们你期待你,的程序返回什么结果呢?

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

  • I'm going to go over here, and let me define a couple of these things.

    仅仅是用来显示值的,好,让我们看看如果,我运行这个程序会有什么结果

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

  • Well, you could just try it and see if it works, right? That's what testing is all about.

    你可以仅仅的去试试运行程序,然后看看结果对不对?这就是测试的内容。

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

  • So the end result, because someone wrote this function years ago is that printf takes this thing, takes this thing, David plops David inside the middle of that formatted string and then renders the whole result.

    基于这是某人多年以前写的程序,最终的结果是打印出这个,这个,在格式化字符串中间的,然后返回结果

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

  • So in fact, it is the case, if you look at data, and by the way, that's the way I ended up setting a lot of these parameters and playing with it, was comparing what my simulation said to historical stock data.

    所以实际上,在这个例子中,如果你看到数据,顺便说一下,这就是我设置很多变量,然后编程的方式,也就是把我的仿真程序得到的结果,和历史股票数据进行比较。

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

  • So you can imagine that this is a very powerful mechanism. So let's look what happens when I run-- start to run this.

    因此你可以想到这是一种很强大的机制,让我们看看让我开始运行,这个程序的时候会有什么结果

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

  • We knew this was trying to do squaring, so intellectually we know we can square -4, it ought to be 16, but what happens here?

    我们知道程序是用来求平方数的,那么按理说我们可以来求-4的平方,也就是16,但是程序结果是怎么样的呢?

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

  • - These ones should curl, see if I can - oh, not bad. Let's run it.

    这些东西可以卷上去,让我们看看,结果不错,让我们来运行一下程序

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

  • Let's modernize this program in main, boy, this is a lot easier it turns out.

    让我们把这个程序现代化,小子们,结果这个容易很多。

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

  • But I would choose to sit down for these particular projects right around midnight so that when I woke up my program was giving me the results I wanted.

    我可能会,为了这些特殊的项目一直等到半夜,这样我醒来时,程序就能给我想要的结果

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

  • Well, you'll know when it crashes, that doesn't help you very much, but you can't always tell whether something's stuck in an infinite loop or whether it's simply taking a long time to compute.

    好,你将学到它在什么时候会崩溃,这对你帮助并不大,但是你不能辨别出到底是在一个循环中,有什么东西卡住了呢,还是程序需要很长的时间来计算一个结果呢。

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

  • What I mean by that is, pick a simple set of values, and let's walk through it to see what happens. And this is useful because it's going to allow me to A make sure that I've got something that's going to terminate, it's going to let me make sure that in fact I'm doing the right kinds of updates.

    原因你们知道的,好,模拟代码,我的意思就是,选出一系列的值来,然后模拟下代码的执行来看看结果,这很有用因为这让我确保我的程序在某个地方,可以终止,还会让我确保实际上我。

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

  • so let's run this and see what happens.

    让我们试试运行程序看看结果

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

  • But that little short hand there is doing exactly the same thing. It is adding that value into some digits and putting it back or signing it back into some digits. And I'll walk through that loop and when I'm done I can print out the total thing does. And if I do that, I get out what I would expect.

    加上得到的这个数的,但是这个缩写声明其实是进行了同样的操作,它把我们得到的这个数加到一个数上面去,然后用和对这个数进行了重新赋值,在循环中会去遍历字符串,当完成循环后,程序会显示数字的总和,如果我运行,这个程序的话,我会得到我期待的结果

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

  • I'm gonna run a.out and your teaser for the kinds of programs you can write after years and years and years of practice will give you output like this.

    运行a,out,这类麻烦的程序,你多年多年之后也能写,因为最后的结果是这样的。

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

  • It turns out that in a lot of languages, C included, you the programmer knowing a bit about how the computer works and the language works, can exercise more fine-grained control.

    结果在包括C语言的很多语言当中,你作为一个程序员懂得了一些计算机的工作方式,和语言的处理方式,可以更精确地控制运用它。

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

  • So I tried running a program in this little black and white window called GCC and we'll see it today working properly that is a so called compiler.

    在一个名为GCC的黑色小窗口里,运行我们的程序,然后得出想要的结果,这就是所谓的编译器。

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

  • So it turns out there's a program called sleep, just like there's a program called Nano, a program called GCC -- that is not what I want.

    所以结果这个有一个sleep程序,就像这个有个叫做Nano的程序,一个叫做GCC的程序--那不是我想要的。

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

  • And this is a little different from what happened ten or so years ago, but the so-called Y2K problem was essentially the result of programmers not really having the foresight to realize, "Maybe we shouldn't use so few bits or so few digits to represent a year because eventually this will be a problem."

    这个跟10年前发生的事情有点不一样,那个所谓的“Y2K“问题,本质上的结果是,程序员没有真实地预见和认识到,“可能我们没必要用到这些位数或数字,来表示一年,但是最终这个将会,是个问题“

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

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

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

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