And I end up going back and doing unit testing anyway, to try and figure out why it doesn't work. So over the years, I've just convinced myself I might as well start where I'm going to end up.
第一次从来不会正常运行,因此无论如何我还要回头去做单元测试,找找哪儿出错了,因此经过这么多年,我已经说服自己既然一定要做单元测试,那么还是一开始就做最好了。
And as I'm going to do many times in 3.091, I'm going to start a unit like this with a history lesson.
在3。091这门课上我会重复很多次,我会像现在一样以一个历史的故事,来开始新的一单元。
There's unit testing, where we validate each piece of the program independently.
一种是单元测试,也就是,分别验证程序中的每一个独立部分。
Well, that's because it's actually not a gross constituent unit in a semiotic system, right?
哈哈,这是因为,红灯不是这一符号系统的一个完整单元?
We have the convention of music of writing this symbol indicating the beat-carrying unit of four so I'm writing a four underneath each of these.
我们有一个约定俗成的书写格式,来表示四拍一单元,所以我在每行这里的下面写上一个四
So, what you have are small, poor, weak units, and that's a miserable situation.
我们所看到的是微小的,贫穷的,虚弱的小单元,这是一种悲惨的境地
Because usually it doesn't work. And so one of the things that I think is very important is to always begin by testing each unit.
因此我认为非常重要的一件事情,就是开始测试的时候先对,每个独立单元进行测试。
What we're really getting at is the idea of saying I want to have a way of grouping together information into units that make sense. So I can go back to one of those topics we had at the beginning, which is the idea of abstraction, that I can create one of those units as a simple entity, bury away the details and write really modular code.
组合成为有意义的单元,那么这就让我们回到,一开始讲的话题之一了,这就是抽象的概念,也就是我可以以一个简单的,实体的形式创建这样的一个单元,把具体实现隐藏然后写一些,真正模块化的代码,我们在以后的课程中。
应用推荐