Divide and conquer to make our programs modular so we can write them a little piece at a time and understand them a little piece at a time.
我们把程序分解为模块逐个击破,以便我们能一次写一小段,一次理解一点儿,现在我觉得。
Well as we'll see later in the term, we're going to use a lot of randomness in a lot of our programs. Where we essentially do the equivalent of flipping coins or rolling dice.
我们会在晚些时候学到,我们会在很多程序中,用到一系列的随机检验,这跟掷骰子或者扔硬币差不多。
And we'll see why this is increasingly useful as our programs get more and more interesting.
我们将会看到这和我们的程序一样,变得越来越有趣了。
The long-term fiscal challenge is largely a product of promises in our entitlement programs, medicare, medicate and social security that we have made the future generations that we cannot afford to keep.
长期财政挑战很大一部分原因,是我们承诺了很多津贴项目,我们承诺给下一代的,医疗保险和社会保险,而现在我们又没法兑现。
But in fact warranted confidence in our programs.
实际上我们的程序中有保证的自信。
All the supreme court justices would share our social values. And most importantly, our programs would work the first time we typed them. By now you may have noticed that we do not live in an ideal world.
符合我们的社会价值观,但是最重要的是,我们写好的程序,第一次就能顺利运行,如今你可能已经注意到了,我们生活的并不是一个理想的世界。
Why our programs don't work.
为什么我们的程序不能正常运行呢?
You will be able to infer from some of our code how in fact you can implement some more sophisticated programs.
你可以从一些代码中推断出,应该要怎样实现一些较复杂的程序。
Remember last time, I said that there's different kinds of complexity in our code, and I suggested for simple branching programs, the amount of time it takes to run that program is, in essence, bounded by the number of instructions, because you only execute each instruction at most once.
但是这里有个很重要的点,记得上节课,我提过在我们的代码中,有不同种类的复杂度,而且我还说了对于简单的分支程序,运行这种程序需要的总体时间,大体上,是和指令的数目相关的,因为每个指令只会被执行最多一次。
应用推荐