帕累托原则:二八法则
很多结果由少数关键原因产生,常见的近似表达是 80% 的结果来自 20% 的原因。
显示原始英文内容
Pareto Principle (80/20 Rule)
80% of the problems result from 20% of the causes.
Takeaways
- Identify the top 20% of factors that contribute to 80% of whatever you care about. This could be 20% of features that account for 80% of usage, or 20% of bugs that cause 80% of crashes. Prioritize your time and resources on those vital few for maximum impact.
- Don't spend the same effort on everything. If a particular area of code is rarely run, it probably doesn't need the same optimization or attention as a hotspot.
- It's not always exactly 80/20, but the idea is the same. Use profiling, analytics, and data gathering to empirically identify where the imbalances are.
- On a personal level, as an engineer or manager, identify which tasks produce most of your value. It might be coding core features or coaching team members.
Overview
The Pareto Principle is more of an observation than a law, but the 80/20 pattern (or similar ratios like 90/10) appears frequently.
In the domain of software engineering we say that, "80% of the time in a program is spent in 20% of the code." This insight is significant for optimization: instead of micro-optimizing everything, profile to identify the hot 20% and optimize that.
The principle influences product development too. Often, a few core features satisfy the majority of user needs. When planning an MVP, teams focus on that core set rather than trying to do everything. It is an essential check against equal prioritization: everything is not equally important.
The Pareto Principle encourages strategic allocation of effort to maximize outcomes by investing where returns are highest.
Examples
Microsoft found that around 20% of bugs in Windows and Office caused 80% of all crashes, and a tiny 1% of bugs caused around 50% of errors. By focusing on the critical 1-20% of bugs, they dramatically improved stability. This is textbook Pareto: address the small set of high-impact issues to make most users happier quickly.
A software team analyzed usage analytics and discovered that out of 50 features, only 5-10 (10-20%) were used by 80%+ of users. This guided them to simplify the interface around core features and remove unused ones.
Hot spots in code follow the Pareto pattern. A small part of the codebase drives most defects, slowdowns, and "scary to touch" work. Track commits plus incidents to find them, then pay down debt where it compounds: add tests, simplify paths, reduce coupling, tighten interfaces.
Origins
The principle is named after Vilfredo Pareto, an Italian economist who in 1906 noted that about 80% of Italy's land was owned by 20% of the population.
In the 1940s, quality management pioneer Joseph M. Juran adopted the idea when analyzing industrial defects, calling it the "vital few and trivial many" rule. Juran observed that by focusing on the vital few quality issues, one could improve quality with less effort than trying to tackle all problems at once.
核心含义
问题、缺陷、用户需求和收益通常不会平均分布。找到影响最大的少数因素,再集中资源处理,往往比平均地优化所有事情更有效。
80/20 不是必须精确成立的比例,重要的是通过数据找到“关键少数”,而不是凭感觉套用数字。
实践例子
分析线上故障后发现,少数几个模块造成了大部分回归问题。优先为这些模块补测试、降低耦合并改善监控,通常比平均修补整个代码库更有价值。
来源与边界
经济学家 Vilfredo Pareto 观察到财富分布中的不均衡,后来被质量管理领域广泛应用。不同系统的比例可能是 70/30 或 95/5,应以测量结果为准。