你一定要能生存10年,因为一年能卖10亿美元的软件都得花那么长的时间去写。
Make sure you can survive for 10 years, because the software products that bring in a billion dollars a year all took that long.
这本书一定要绝对用自己的观点写成,一定要绝对十全十美,这便是他不可能着手开始写的原因之一。
The book must be absolutely original, absolutely perfect. That is why, among other things, it is impossible for him to get started on it.
正如没有哪条规则告诉你代码里的注释一定要怎么写才正确,也不存在“正确”属性的一个普适的列表。
Just as there are no rules that tell you exactly what comments to write in your code, there is no universal list of the "right" attributes.
That goes back to that idea of sort of discipline coding. It's easy to have assumptions about what you think are going to come into the program when you writ it. If you really know what they are use them as search, but if you think there's going to be some flexibility, you want to prevent the user getting trapped in a bad spot, and exceptions as a consequence are a good thing to use.
这又回到了规范编码的想法上来了,在你写代码的时候考虑,什么会进入你的代码的思考是简单的,如果你真的知道,他们是用他们来做搜索的,而你希望有一定的灵活性,你想要阻止用户,陷入一个艰难的境地,那么异常是非常实用的。
应用推荐