软件编程21法则
时间:2010-10-06 来源:bookcold
- Any given program, once deployed, is already obsolete.
- It is easier to change the specification to fit the program than vice versa.
- If a program is useful, it will have to be changed.
- If a program is useless, it will have to be documented.
- Only ten percent of the code in any given program will ever execute.
- Software expands to consume all available resources.
- Any non-trivial program contains at least one error.
- The probability of a flawless demo is inversely proportional to the number of people watching, raised to the power of the amount of money involved.
- Not until a program has been in production for at least six months will its most harmful error be discovered.
- Undetectable errors are infinite in variety, in contrast to detectable errors, which by definition are limited.
- The effort required to correct an error increases exponentially with time.
- Program complexity grows until it exceeds the capabilities of the programmer who must maintain it.
- Any code of your own that you haven’t looked at in months might as well have been written by someone else.
- Inside every small program is a large program struggling to get out.
- The sooner you start coding a program, the longer it will take.
- A carelessly planned project takes three times longer to complete than expected; a carefully planned project takes only twice as long.
- Adding programmers to a late project makes it later.
- A program is never less than 90% complete, and never more than 95% complete.
- If you automate a mess, you get an automated mess.
- Build a program that even a fool can use, and only a fool will want to use it.
- Users truly don’t know what they want in a program until they use it.
中文翻译:
- 任何程序一旦部署即显陈旧。
- 修改需求规范来适应程序比反过来做更容易。
- 一个程序如果很有用,那它注定要被改掉。
- 一个程序如果没用,那它一定会有很好的文档。
- 任何程序里都仅仅只有10%的代码会被执行到。
- 软件会一直膨胀到耗尽所有资源为止。
- 任何一个有点价值的程序里都会有至少一个bug。
- 原型完美的程度跟审视的人数成反比,反比值会随着涉及的资金数增大。
- 软件直到被变成产品运行至少6个月后,它最严重的问题才会被发现。
- 无法检测到的错误的形式无限多样,而能被检测到的正好相反,被定义了的十分有限。
- 修复一个错误所需要投入的努力会随着时间成指数级增加。
- 软件的复杂度会一直增加,直到超出维护这个程序的人的承受能力。
- 任何自己的程序,几个月不看,形同其他人写的。
- 任何一个小程序里面都有一个巨大的程序蠢蠢欲出。
- 编码开始的越早,花费的时间越长。
- 一个粗心的项目计划会让你多花3倍的时间去完成;一个细心的项目计划只会让你多花2倍的时间。
- 往大型项目里添加人手会使项目更延迟。
- 一个程序至少会完成90%,但永远完成不了超过95%。
- 如果你想麻烦被自动处理掉,你得到的是自动产生的麻烦。
- 开发一个傻瓜都会使用的软件,只有傻瓜愿意使用它。
- 用户不会真正的知道要在软件里做些什么,除非使用过。
英文原文:http://www.devtopics.com/21-laws-of-computer-programming/
相关阅读 更多 +