调试器,敏捷过程的害群之马
来源:互联网 发布:莆田高仿鞋淘宝店店名 编辑:程序博客网 时间:2024/09/21 10:35
当你习惯了测试驱动的开发(Test-Driven Development,TDD)之后,你会发现自己越来越少地使用调试器(debugger)——如果你发现程序里有什么问题,你不应该用调试器去抓bug,而是应该用一个单元测试用例来揭示问题的所在。由于存在细粒度、完整覆盖的单元测试用例,每个bug都相当清晰,于是很少会需要各种巧妙的调试手段了。
——————————
Uncle Bob's Software Craftsmanship Corner
Debuggers are a wasteful Timesink
by Robert C. MartinNovember 29, 2003
Summary
As debuggers have grown in power and capability, they have become more and more harmful to the process of software development.
Debuggers have become immensely powerful. A good debugger is a very capable tool. With it, an experienced developer can step through very complex code, look at all the variables, data structures, and stack frames; even modify the code and continue. And yet, for all their power, debuggers have done more to damage software development than help it.
Since I started using Test Driven Development in 1999, I have not found a serious use for a debugger. The kinds of bugs I have to troubleshoot are easily isolated by my unit tests, and can be quickly found through inspection and a few judiciously placed print statements.
I teach a lot of classes in C++, Java, C#, TDD, XP, Patterns, etc. In those classes I often have the students write code. It is not unusual for me to find a student with his or her nose buried in a debugger, painstakingly stepping from line to line, examining variables, setting breakpoints, and generally wasting time. The bug they are tracking could be found through simple inspection of the code.
I consider debuggers to be a drug -- an addiction. Programmers can get into the horrible habbit of depending on the debugger instead of on their brain. IMHO a debugger is a tool of last resort. Once you have exhausted every other avenue of diagnosis, and have given very careful thought to just rewriting the offending code, *then* you may need a debugger.
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>- 调试器,敏捷过程的害群之马
- 调试器,敏捷过程的害群之马
- 开发过程的敏捷开发
- 敏捷调试
- 快速排除网贷平台导航上的害群之马
- 敏捷过程!!!
- 敏捷过程
- 面向对象软件开发的敏捷过程
- 敏捷实践的一些过程项
- 敏捷开发的过程和理解
- 敏捷是如何优化需求过程的
- 敏捷开发过程的几个关键点
- rup,xp,敏捷过程的含义
- RUP、xp、敏捷过程的含义
- 有趣的调试过程
- 调试Crypt_GPG的过程
- 电子负载的调试过程
- 基于Petri网的敏捷开发软件过程模型及实践--3.敏捷开发软件过程网
- linux使用记录
- 面向对象编程:Java中的抽象数据类型——转载
- 正佳网16亿打造B2C门户 三年规划纳斯达克上市
- Java集合框架 (一)
- 快速配置你的Java程序到JAWS(Java Web Start)(2)
- 调试器,敏捷过程的害群之马
- Sun ONE Application Server 开发者指南
- PLEAC-Perl 教程 - String (Perl进阶者极力推荐)
- Sun ONE Application Server 开发者指南(2)
- Sun ONE Application Server 开发者指南(13)
- 满足你所有的研究需求的9大网站 转自yeeyan.com 译者: weekeeGG
- 利用XML数据绑定实现页面无刷新的数据浏览
- C#,asp.net实现邀请码机制
- 兔八哥笔记10:WebLogic的内置LDAP控制访问语法