Debugger, agility process harmful horses

zhaozj2021-02-08  423

When you are used to Test-Driven Development, TDD, you will find yourself to use the debugger (DEBUGER) - if you find any problems in the program, you should not use the debugger Go to the bug, but should use a unit test to reveal the problem. Due to the presence of fine-grained, completely covered unit test cases, each bug is quite clear, so it will require a variety of clever debug structures.

------------

Uncle Bob's Software Craftsmanship Corner

Debuggers Are A Wasteful Timesink

By Robert C. Martin

November 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 offen Have The Students Write Code. It is not unusual for me to find a student with his or her nose buried in a DEBUGER, PAINSTAKINGLY Stepping from line to line, Examing Variables, Setting Breakpoints, and generally Wasting Time. The bugs.................

转载请注明原文地址:https://www.9cbs.com/read-733.html

New Post(0)