• The other person receives a text message with a code to take to the local M-Pesa agent to get the money.

    VOA: special.2009.11.02

  • So I'm going to comment those out, and let's go down to this piece of code, and uncomment it.

    那么我会把这些注释上,让我们看看这段代码,取消注释。

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

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

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

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

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

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

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

  • I'm going to start somewhere near the middle of the code. Again, a lot of times, people don't do that.

    我会在代码中间的某个位置开始,再说一次,很多时候人们不会这么做。

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

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

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

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

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

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

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

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

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

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

  • That was the kind of thing you saw. Asserts said here are some conditions to test. If they're true, I'm going to let the rest of the code run.

    这就是你看到的,断言是一些测试条件,如果他们为真。

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

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

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

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

  • If I come into this code, I'm going to check this branch first, if it's not true, ah, there's a return at the end of that branch. If it is true, I do that, and then I've got a second test. If it's true, return I return, otherwise a return.

    但是如果我们看看这里,如果我看这段程序,我会先检查这一部分,如果它是假的,啊,这部分分支结尾有一个。

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

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

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

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

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

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

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

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

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

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

  • And the code over here says, OK gee, if I'm in the base case do something.

    如果我属于基础事件就进行一些操作,而我不是,所以往下看这儿。

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

  • It's okay. So this first line of code, I will get it started but then I'm gonna have you take over and actually instruct Philip what to do here.

    第一行代码就从这里开始,接下来我会让你,接管并指导飞利浦。

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

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

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

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

  • And to do this, I'm going to use some code that I've already typed in.

    为了达到这个目的,我会去使用一些,我已经写好的代码。

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

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

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

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

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

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

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

  • And when I'm starting to write lots of lines of code, you know, it's frankly kind of useful to be able to see more on the screen at once without having to scroll.

    当我开始写很多行代码的时候,你们懂的,这明显是有用的,当你可以在屏幕上看到更多的代码,而不用滚动屏幕。

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

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

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

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

  • Yeah, if my machine will come back up, there we go. So, I'm going to now go ahead and write a little piece of code, and I put it here and I hope you can actually see these better this time, let me uncomment that region.

    让我们写出代码来吧,好,如果我的电脑能回来的话,好了,那么,我要去写一小块代码,我把它放在这里以期望大家这次,能看的更清楚点。

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

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

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

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

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

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

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

  • And in particular, if I think about that problem - actually I want to do this- if I think about that problem, I'm going to write a little piece of pseudo code.

    关于这个问题尤其要注意的是,实际上当我考虑这个-,问题的时候我想这么做,我会去写一点伪代码。

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

  • Again, imagine if I'm a writing a piece of code.

    请再次想象一下我正在编写一段代码。

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

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

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

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

  • OK? And in fact, if you look at the code up here, and it's on your handout, the very first one, x 1, right here- if I could ask you to look at it-- is a piece of code to do it. And I'm less interested in the code than how we're going to analyze it, but let's look at it for a second.

    实际上,如果你看看,你们课堂发的材料上面的代码,第一页上的,就是那-,大家请看看实现的这一部分代码,我不太关心,我们会怎么解释这个代码,首先让我们先看看。

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

  • I stress it in particular because I know you're all going to get into this stage; you've got a problem set due in a couple of hours, you're still writing the code, you don't want to waste time, and I'm going to use quotes on "waste time", doing those extra things to do the defensive programming, you just want to get the darn thing done.

    我特别强调了这一点,因为我知道你们都会慢慢成为程序员;,你在写代码过程中造成了一系列的错误,你还在写代码,你不想浪费时间,我想把“浪费时间“用引号圈起来,浪费时间来做因为防卫性程序设计,而带来的这些额外的事情,你只想赶紧把程序写完,这不是一个好习惯,因为当你做完回头。

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

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

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

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