Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

A manager recently announced that were were spending far too much time fixing bugs. I guess he thinks we should write perfect code all the time (whilst still hitting those impossible deadlines of course!) and it made me wonder what the industry average of time spent bug fixing v writing new code was.

So does anyone have any metrics on time spent bug fixing against new code development? Or is there any empirical analysis of bug fixing time for the industry as a whole? Is 50% spent bug fixing too much, or about right? How about 20% or 33%?

I'm happy to accept anecdotal evidence from personal experience as that would form part of some statistics here that I could compare our performance against.

share|improve this question
8  
your manager sounds very ignorant. Suggested reading for cases like that: Facts and Fallacies of Software Engineering by Robert L. Glass, particularly "Fact 43. Maintenance is a solution, not a problem." Wikipedia article mentions 80% efforts spent on software maintenance –  gnat Feb 10 '12 at 15:02
2  
What is the real problem? Do you have a quality problem? Is your process really inefficient? Or is your manager just wishing that software didn't cost so much? –  kevin cline Feb 10 '12 at 16:47
    
@gnat: your comment is the best answer –  kevin cline Feb 10 '12 at 16:51
    
@kevincline thanks - converted comment to an answer –  gnat Feb 10 '12 at 17:21
    
Maintenance isn't only about fixing bugs (defects) and its amount greatly varies for individual projects (=no definite answer). To me it seems you have rather quality issues. –  MaR Feb 10 '12 at 17:46
show 2 more comments

3 Answers

up vote 8 down vote accepted

A manager recently announced that were were spending far too much time fixing bugs.

Above sounds very ignorant. Suggested reading for cases like that: Facts and Fallacies of Software Engineering by Robert L. Glass, particularly "Fact 43. Maintenance is a solution, not a problem."

Wikipedia article mentions 80% efforts spent on software maintenance.

my manager makes Dilbert's PHB look like a genius :)

Hm given above I'd also take some efforts in analyzing whether all the requests you do are bugs indeed.

In my experience it was way too often that requests for enhancements or new features were submitted as bugs. Good managers involve their programmers in finding out about that - bad managers, well, just keep complaining about too much time fixing bugs.

share|improve this answer
1  
+1: Ordered the book. –  kevin cline Feb 10 '12 at 19:03
    
Bug fixing != maintenance! Bug fixing means you coded faults in the system and they need to be fixed in order to restore correct functionality. By maintenance I would mean all tasks such as bug fixes, scalability improvements, hardware migration, and performance improvements etc. I would say more than 25-30% of the time being spent just on bug fixes needs a governance call immediately. Up to 40-50% of the effort spent on maintenance overall sounds reasonable for a mid-size enterprise system. –  Monster Truck Jul 29 '13 at 12:29
add comment

The first question to ask is if your "bug fixing" is actually fixing coding bugs or something else. The fixing of actual code bugs should be relatively small in most cases as long as you have a good code base. If you're working with a poor code base, extensive bug fixing is inevitable.

However, in the course of putting a program into production, you'll find requirements that weren't documented, unexpected user activity, data anomalies, hardware incompatibilities, installation issues and other problems that aren't strictly code bugs. Often managers and users will think of these production support/maintenance problems as bugs since they typically require code changes.

I've also encountered managers who would group what should have been termed as minor enhancement requests as bugs. Often these get entered into a bug tracking or problem reporting system and this can make your "bug" stats higher than they really are.

share|improve this answer
    
What you describe is what we have, but that doesn't change anything :( –  gbjbaanb Feb 10 '12 at 19:53
add comment

It depends on how much code you have out there, how long it has been out there, etc.

The time spent fixing bugs in software should be front-loaded to the first 6-12 months of release, however as time approaches infinity, the time spent on maintenance versus the time spent on initial development will exceed 100% - that's just the way things work.

While I don't have any hard statistics (Code Complete does, but I can't tell you exactly which page/section), in my experience roughly 40% of development (sometimes as high as 60%) is spent on maintenance. It's obvious that the more code you release, the more maintenance time you will have. Bugs are not always functional, and are as much a result of uncertainty as they are programmatical defects.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.