但在自己的内部代码中,尽量尝试高效的实现。
But in your own internal code, you should try and be as efficient as possible.
最大一类重构是实现了类内部代码重组的重构方法。
The largest variety of refactorings are those that reorganize code within a class.
如果我涉及到内部代码本身,那所有的制造商都会反对。
Had I gone for the internal code itself, all manufacturers would have rebelled.
In general, good programming style says you put in comments that are going to be valuable in helping you as a reader understand what's going on inside of the code.
通常来说,优秀的编码风格意味着,你要放进去的注释,在帮助代码阅读者,理解代码内部,是怎么工作的。
OK, so far though, I've just shown you what happens inside a peace a code. It raises an exception. It goes to that accept clause. We don't have to use it just inside of one place.
好了,我已经给你们看了,代码内部发生了什么,它报了一个异常,然后就到了处理的片段,我们不该就在一个地方用它。
We're going to call binary search, it's going to take the list to search and the element, but it's also going to say, here's the first part of the list, and there's the last part of the list, Well, it checks to see, is it bigger than two?
我们将要调用这个二分查找,它将会在列表里面搜索元素,假定这里是,列表的第一个元素,那里是列表的最后一个元素,代码内部到底做了什么?
应用推荐