Most Read Latest News Blog Resources

WHAT PRICE PREVENTION?




March 4, 2004 — 
Michael Lutz’s recent Guest View ["Analyzers: What’s the Business Value?" Jan. 15] raises a very important issue, one that lies at the core of the problems we face in the software industry: What value do we place on error prevention?

Modern static code analyzers are not designed to detect errors, but rather to prevent errors by warning developers about dangerous constructs that can lead to errors.

For an example of how static code analyzers provide value by preventing errors, consider the first warnings that Mr. Lutz received when he applied CodeWizard, Parasoft’s C/C++ static code analyzer, to his own code—warnings about a few parameters where const might be used. Mr. Lutz analyzed a relatively small piece of code (about 3,000 lines), but assume that this code is later extended to the point where many people are working on the code and no single person understands the entire piece of code. Then, if the members of the class are not explicitly constant, there is a possibility that other developers will modify them. This can lead to an error that will have to be identified and removed, costing the team time, effort and money.

For another example, consider the warnings Mr. Lutz received about classes with dynamically allocated memory that did not explicitly define a copy constructor or assignment operator. If one of Mr. Lutz’s colleagues takes over his code or tries to extend it, that developer might decide to use the class to create new objects. At that time, the developer is going to get a default copy constructor. Will this be the right copy constructor for this class? Maybe, or maybe not. This problem will not lead to memory corruption, but it can lead to a serious functional error when the code is writing to the same piece of memory. This could lead to a very infrequently occurring error, which could take weeks to diagnose.

I could go on and on with each violation that CodeWizard reported. Yes, there is a great business value in this. Each time you prevent an error, you save yourself (and your team) the time, money and effort it would otherwise cost to chase and repair that error. Of course, prevention is not free. But is error prevention more economical than the industry’s current strategy of trying to find and remove all the bugs in the code? I believe so.

CEO Parasoft Corp.


Share this link: http://www.sdtimes.com/link/27723
 

Add comment


Name*
Email*  
Country     


  • Comment
  • Preview
Loading



 
 
 
 
News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 
Download Current Issue
ISSUE 3/15/2010 PDF

Need Back Issues?
DOWNLOAD HERE

Receive the print Edition?


 
blogs tab
Google Code turns 5
Google Code Turns 5, and adds a Paxos Algorithm to make the system more stable and reliable.
03/17/2010 11:16 AM EST

Test your Visual Studio 2010 know-how
Microsoft is offering free beta certification exams for Visual Studio 2010.
03/17/2010 11:08 AM EST

Microsoft lifts the hood on IE9
Microsoft is previewing IE9.
03/16/2010 01:10 PM EST

 

Events calendar tab
3/22/2010 to 3/25/2010
Santa Clara, Calif.
The Eclipse Foundation

4/12/2010 to 4/14/2010
Las Vegas
Penton Media

4/12/2010 to 4/15/2010
Santa Clara, Calif.
O'Reilly Media

4/19/2010
New York City
Flagg Management

4/25/2010 to 4/28/2010
Overland Park, Kans.
IIUG