欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Error Checking-gives you the opportunity to play code review

程序员文章站 2022-07-09 20:35:44
...
http://www.ddj.com/dept/embedded/193104891

看到的一篇文章,关于code review的一种“最佳实践”。引用了NASA太空船开发的例子,并给出了几个“几乎可应用于任何软件项目的建议”。

“Code reviews are just one means of detecting program errors. Ed looks closely at how errors evade detection and gives you the opportunity to play code reviewer.Even if your blunders are neither so costly nor public, what you see here may look disturbingly familiar.”

“In other words, when you're expected to work smarter, you must actually think about the project, preferably before you begin. Ignoring potential problems is not a strategy.”
--不要把一切都交给重构,事先还是要尽可能想清楚。

“We've found that bouncing your coding ideas off somebody else really is the first and best line of defense against errors. ”
--熟悉吧,结对编程的影子,庞大的项目照样有敏捷原则。

“The tests must match up with reality, rather than with an idealized model:”
--警言啊。测试必须合乎“事实”,而不是理想化的模型。