He says he is sending the code back to the legislature for a second reading so that it can obtain the support and understanding of Mali's citizens.
VOA: standard.2009.08.27
But if I did have two lines of code or more, I would in fact need to put those back.
但是如果我的确有两行或更多的代码,我其实应该把花括号加上。
OK, what I would like you to see is I've been printing out, as I went along, actually let's back up slightly and look at the code. There's merge sort.
好的,我想让你们看就是我运行过后,打印出来的结果,我们再回头看一下这段代码,这就是归并排序,输入一个列表。
Mali's President Amadou Toumani Toure announced Wednesday that he is sending the family code back to the National Assembly for additional revisions to correct what he called "a few imperfections."
VOA: standard.2009.08.27
Well, if we look back at the code here, take a look at what we're really doing.
好的,如果我们回过头来看代码,看看我们到底做了什么。
It could be multiple versions. And we're going to come back throughout the term to think about how to code programs that reflect this.
可能是一种形式也可能是多种形式,我们再回到递归这个术语上来,用它来思考怎样编出。
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 will tell you that a good programmer, at least in my mind, may actually go back and modify the pseudo code as they realize they're missing things, but it's easier to do that when you're looking at a simple set of steps, than when you're in the middle of a pile of code.
至少我认为是这样的,如果他们发现遗漏了,一些步骤的话会,回过头去修改伪代码,但这当你面对一些大致的步骤时,这个过程就会比,面对一堆代码要简单的多。
Now, efficiency is obviously an important consideration when you're designing code, although I have to admit, at least for me, I usually want to at least start initially with code that works, and then worry about how I might go back and come up with more efficient implementation.
现在,当你设计程序的时候效率,是不得不考虑的问题,虽然我必须承认,至少对我来说,我是先担心程序能不能运行,再去把它的效率优化的,我喜欢可靠点的东西。
If I go back to that code from a moment ago, and I just rerun math3, notice how many places printed after the decimal point -- two?
如果刚才我回到那段代码中去,我们回到math3,请注意在小数点后面,会打印几位数呢--两位?
Meaning, I'm just going to write a little loop that does that. All right, so let's go back to our code. That's right, let me pull this over a little bit, so I can see it. And what I'd like you to look at, I'm going to highlight it just for a second here, is those two pieces of code.
意思就是我只需,写一个小循环就可以了,让我们回到代码,让我们向下拉一点,我才看得见,我希望你看看这里。
But here, if I decide I'm going to store things not in x and y, but with some other set of names, for example, I've gotta go back into these pieces of code that use the points, and change them. So I've lost modularity.
除了要改下借口,但是这里,如果我决定,我不把值放在x和y中,而是和其他一些变量名进行绑定,例如这样的话,我就得回到使用这个点的代码,那儿去做更改了。
So my challenge to you, and I know Professor Guttag can do this, my challenge to you is, a year from now, come back and look at code you wrote here.
因此我这里有个具有挑战性的任务,我知道Guttag也可能会说这个任务,我的这个任务就是,一年以后,回头来看,你之前写过的代码。
SRC back One is called SRC for Source and one is called SRC.back which was my backup of today's source code in case I screw up.
其中一个叫SRC,用来装源代码,另一个叫,用来备份源代码,以防我搞砸了。
And in fact, now let me ask those two questions about this piece of code. First question is, for what values of integers-- we're going to assume integers-- but for what values of x does this code terminate? And the second question is, for what values of x does it give me back the right answer?
实际上,让我关于这块代码问两个问题,第一个问题是,对于什么样的整数值,我们会假设是整数,对于x的什么值程序,会最终终止?第二个问题是,对于x的什么值程序,会返回正确答案?
应用推荐