Pareto Principle for Software

I expect that many of you are familiar with the Pareto principle (also known as the 80/20 rule), which states that 80% of effects come from 20% of causes. The Pareto principle can be applied in many areas and is espoused by individuals such as Tim Ferris, who applies the Pareto principle for learning new skills by identifying the 20% of building blocks that give you 80% of the benefit.

Recently, a friend of my shared with me a new application of the principle that I had not considered: the Pareto principle of software bugs. His version states: 80% of bugs come from 20% of a program's modules.

After reflecting on this idea and relating it to my own experience, I agree with the principle. Every project has its troublesome modules and files which you continually revisit and debug. As soon as you fix one bug, another pops up, and then another. You slowly build up a house of cards, but little niggling 0.1% failure rate problems still remain. Meanwhile, there are whole swaths of code that I never revisit again after initially developing the module.

What does this mean for our development processes?

By applying the Pareto principle, we can identify which portions of the program we should focus on to gain the most improvement. When you notice that you are continually fixing bugs in a particular module, its time to focus on what's fundamentally wrong in that area. Restructuring, simplifying, or re-writing that module will give you tremendous benefit over playing whack-a-mole with bugs.

I imagine the Pareto principle does not only apply to bugs. Here are some other areas I think it can be applied:

  • 80% of performance improvements can be found in a small subset of the program
  • 80% of a program's operating maps to a small portion of the software modules
  • 80% of a program's core IP or differentiation from the competition is only found in 20% of the code

What other areas do you think the principle might apply? Where should you focus your efforts to acheive for your particular goals? By focusing on the big wins you will gain for the largest return of investment on your time.

Further Reading