As such, there isn't an easy ten step program to master it.
因此要掌握它不是一个简单的十步计划。
Extensibility: How easy is it to extend or adapt when the program changes?
可扩展性:程序变化时是否容易扩展或者调整?
It need not talk to the network, or understand the contents of the messages it writes to disk, making the program simple and easy to verify and thus hard for an attacker to break.
它无需和网络沟通,或者了解它写到磁盘上的消息的内容,使得程序简单并容易被验证,从而使得攻击者更难破坏它。
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.
这又回到了规范编码的想法上来了,在你写代码的时候考虑,什么会进入你的代码的思考是简单的,如果你真的知道,他们是用他们来做搜索的,而你希望有一定的灵活性,你想要阻止用户,陷入一个艰难的境地,那么异常是非常实用的。
应用推荐