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 to any domain. For example, Tim Ferris espouses the principle to learning by identifying and focusing on the 20% of the building blocks that give you 80% of the benefits.
A friend of mine shared a new application 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. 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 build up a house of cards through incremental patches, but 0.1% failure rate problems still remain. Meanwhile, there are whole swaths of code that we never revisit again after initial development.
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
- Alternative perspective: 80% of the value comes from 20% of the code
- In either case, the other 80% of the code is scaffolding and infrastructure that should be purchased or pulled from open-source
What other areas do you think the principle might apply? Where should you focus your efforts to achieve for your particular goals? By focusing on the big wins you will gain for the largest return of investment on your time.
- Grammar/spelling improvements
- Added suggested rule of thumb from the Memfault team