• Imagine instead, you're writing code that's a hundred thousand lines, a million lines, of code. You don't want to write it in this form. All right, and the reason you don't want to do that is, well, several.

    换一个角度来思考,你正在写的代码有几十万行,近百万行,你绝对不想写成这种格式,好吧,你不想这么做的原因有以下几个。

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

  • Once you hear that description, it's easy to write the code, in fact. This is a place where the recursive version of it is much easier to think about than the iterative one.

    实际上一旦你听到了大致描述,就能很轻松的写出代码来,在这一点上应用递归来解决问题,比用迭代要容易理解多了。

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

  • So write the so called source code which is in a specific language.

    用指定的编程语言,写出所谓的源代码。

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

  • You want to write the specs so that everybody does in fact know what this piece of code is doing, and you're writing it each time around.

    但是你得养成良好的习惯和编程风格,你得撰写规范说明从而保证,每个人都知道这段代码是干什么的。

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

  • In the case of last year we did hand students some code with which they could write programs that talked to Yahoo Finance, finance.yahoo.com, free website.

    在去年的情况下,我们给学生提供一些,能用来写程序跟雅虎财经的免费网站交互的代码,即finance。yahoo。com,一个免费的网站。

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

  • First one, when I write a piece of code, especially code that has branches in it, when I design test cases for that piece of code, I should try and have a specific test case for each possible path through the code.

    第一点,当我们写代码的时候,尤其是一些含有分支语句的代码的时候,当我为这些代码,设计测试用例的时候,我应该为每一个可能的程序路径,都设计一个特别的用例。

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

  • What that basically says is the following: in an interpreted language, you take what's called the source code, the thing you write, it may go through a simple checker but it basically goes to the interpreter, that thing inside the machine that's going to control the flow of going through each one of the instructions, and give you an output.

    也就说,如果是解释语言的话:,你要写一些叫做,源码的东西,你写的东西会经过一个简单的过滤器,然后解释器会处理你的源码,解释器会产生一个,逐条读取你的源码的,控制流,然后返回一个输出结果。

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

  • And you can write your source code in it but to compile something you don't run a command like GCC and then the name of the file, you instead click a button.

    你们可以在上面写源代码,如果要编译的话,不用像GCC这样要输入命令,文件名,只需点击按钮就可以了。

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

  • OK, so how can I code this up? Well, you might think, let's just jump in and write some code, I don't want to quite do that though, because I want to show you another tool that's valuable for thinking about how to structure the code, and that is a something called a flow chart. Now.

    好,那么我怎么把这个以代码实现呢,你可能会想,让我们进去直接写代码把,但是我不想这么做,因为我想教给大家另外一项很有价值的,用来组织代码的工具,叫做流程图,现在,像Guttag教授,和我这么大岁数的人。

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

  • We don't expect everybody to be a course six major, contrary to popular opinion, so for those are you not in that category, the second thing we want to do is we want to help students who don't plan to major in course six to feel justifiably confident in their ability to write and read small pieces of code.

    和大众意见正相反,我们不希望所有人都变成course,six的主修学生,所以对于那些不在第一梯队里的人来说,我们想做的第二件事情就是,希望帮助还不想,主修这门课的人,都能获得在自己能力范围内,读写小编码的自信。

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

  • So really, the rule of thumb if you think back to Scratch is -- that any time you write a statement -- -- something that does something in one line of code -- you generally need the semicolon there.

    实际上,根据经验,你们回忆一下在Scratch中,任何时候你们写一条语句-,处理一些操作的一行代码-,你们通常需要在那里加个分号。

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

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

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

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