Review of Debugging the development process 2. The Systematic Approach

Working smart, not working hard
A common problem for servers in coffee shops is remembering who's drinking regular coffee and who's drinking the decaffeinated stuff. A coffee shop manager with unlimited time and resources might send all the servers to Kevin Trudeau's Mega Memory seminar, where they'd learn to vividly imagine a calf with a hide that matches, say, the customer's paisley tie, so that seeing the tie at refill time would trigger the thought of the paisley calf—and decaf coffee. Most coffee shop managers
take a much simpler approach to the problem, though: they just tell the servers to give you a different kind of cup if you order decaf. The server need only look at your cup to know what type of coffee you're drinking.
很贴切的一个例子,当我们遇到问题的时候,也许只用一个微不足道的方法就可以解决,这样工作能够事半功倍,再也不用熬夜加班,也能如期完成项目。小小的改变可能产生惊人的效果,所以,仔细观察现有的作业方式,会很容易发生问题吗?耗费很多时间吗?如果是的话,找出一种简单又有效的方式改善这些情况。

针对问题寻求解决方案时,一遍又一遍地修正问自己的问题,培养自己能够提出精确的问题,想出更好的答案。但光是精确还不够,精确的问题也可能是错的问题,会得到没有帮助的答案。必须注意,问题是否切中要害,是否是真正想达到的目的,是否是理想状况。

Don't fix bugs later; fix them now.
* The constant message to programmers is that bugs are serious and must not be ignored. This point is emphasized right from
the start of the project and receives perpetual reinforcement.
* Programmers become solely responsible for fixing their own bugs. No longer do the careful programmers have to help fix
the bugs of the sloppy programmers. Instead, the careful programmers get to implement the features the sloppy programmers
can't get to because they're stuck fixing bugs in their earlier features. The effect is that programmers are rewarded for being careful. Justice!
* If programmers are fixing bugs as they're found, the project can't possibly have a runaway bug-list. In fact, the bug-list
can never sneak up and threaten your project's timely delivery. How could it? You're always fighting the monster while
it's little.
* Finally, and perhaps most important, requiring programmers to fix their bugs as they find them makes it quite apparent if
a particular programmer needs more training—his or her schedule starts slipping, alerting you to a problem that mightotherwise go unnoticed.
这个观点虽然也是很正确的,但是好像和本章的内容没有多大的关系。难道作者想说明这也是策略的一种?
及时发现并修改bug当然很重要,但我觉得更重要的是怎样防止出现bug。TDD(Test-Driven Development)就是一种相当好的方法。如果具有完善的测试用例,无论是开发或是以后的修改过程中都能大量减少bug出现的机会。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值