Write less code 写较少的代码
What is the technique for writing less code?
写更少代码的技术是什么?
Annotations: Doing more work with less code.
注解:用更少的代码做更多工作。
The less code you have to maintain, the better.
您需要维护的代码越少越好。
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.
实际上,如果你看看,你们课堂发的材料上面的代码,第一页上的,就是那-,大家请看看实现的这一部分代码,我不太关心,我们会怎么解释这个代码,首先让我们先看看。
00 Now I say while i is less than or equal to 100, I write my code, I sleep for a second.
现在我指明当i小于等于,我写下我的代码,我休眠一分钟。
So it feels a little backward mentally perhaps, 1 but this is saying, "do this block of code as long as n is less than 1."
所以它感觉可能有点迟缓,但是它指明,“只要n小于,执行这段代码“
应用推荐