Tarek Chaaban

Tarek Chaaban, M.Sc's official blog. It contains current web project portfolio, posts regarding his Canadian army experience, news, sports articles, and web tutorials on programming and using social networking technologies.

Debugging Code

This is a recent quote that i got from a Manager

It costs 10 times as much for QA to find and get a bug fixed, than for the original developer to catch and fix the same bug in the beginning. It costs 50 times as much if a customer finds the bug.

While the numbers may not be exact, the concept is valid. If a developer takes a few extra minutes and finds the bug, he or she can probably fix it very quickly as the code is fresh in his or her mind. If QA finds the bug, the tester has to document the issue and submit it. It has to be reviewed and prioritized. It may be looked at by several people before it is finally assigned to a developer (some discussions go on for months or even years).

The developer is probably not the original developer. The newly assigned developer has to locate the code, study it to understand it, then fix it. It then must be retested. The difference in time spent is enormous. If a customer finds the bug, add the involvement of Customer Support and the project manager, additional correspondence between QA and the customer to replicate the problem, the fact that the fix must wait for the next official release, and the increase in resources spent is again enormous. Add to that the distraction of QA, Customer Support, and project managers from other thing that might be far more productive, the frustration of customers, the erosion of confidence in the quality of the applications, and the delay in the time it takes to stabilize a release, and you can see why it would be far better for the developer to take the additional time in the beginning to try to eliminate all bugs.

In construction, the saying is “Measure twice, cut once.” In the long run, eliminating waste can make the difference between breaking even and making a profit.

I just agree with every words in that quote, when we get a code that we have to debug it’s a real pain to understand what the other programmer was willing to do …

The Best Programming Methods :

- For each CLASS/FUNCTION write comments
- Make your code readable
- Follow Naming Convention

This post is not about Best Programming methods …. to know if you are doing good just open a project that you did 6 months ago .

Can you understand your code ?

Tagged as: , , , , , , ,

Leave a Response

Please note: comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.