Goodhart's Law Is a Math Problem - And We Can Prove It With 10 Lines of Python
Your dashboard is lying to you - and we can prove it mathematically. physically disturbs the other. This isn't a limitation of our instruments - it's a property of the universe. SymPy library, which has a quantum mechanics module for working with non-commutative operators. The key idea: if two quant

Your dashboard is lying to you - and we can prove it mathematically. physically disturbs the other. This isn't a limitation of our instruments - it's a property of the universe. SymPy library, which has a quantum mechanics module for working with non-commutative operators. The key idea: if two quantities are represented by operators that don't commute (i.e., the order in which you apply them matters), then they are subject to an uncertainty principle. Velocity*Quality - Quality*Velocity - is not zero. This is the mathematical signature of non-commutativity, and it carries an enormous consequence. generalized uncertainty principle kicks in: must fluctuate. why they don't commute: You optimize for Velocity first, then measure Quality.Engineers ship fast. They cut corners. Quality measurement reveals high defect rates. You now try to "fix quality," but the engineering habits, tech debt, and expectations set by the velocity push are already embedded. The system has been irreversibly altered. You optimize for Quality first, then measure Velocity. Engineers write thorough tests, refactor extensively, do careful code reviews. Velocity measurement reveals "low output." Management panics and starts pushing for more shipping speed. But the careful engineering culture is already established - and now it's being disrupted. The order matters. The end state is different depending on which metric you optimize first. That's non-commutativity in action. The Uncertainty Constant: ℏ_org The symbol ℏ_org (we might call it the "organizational Planck constant") represents how tightly coupled two metrics are in a specific organization. It's not a universal constant - it depends on your team, your product, your culture. High ℏ_org: The metrics are deeply entangled. Optimizing one severely disrupts the other. (Example: "move fast and break things" vs. "enterprise reliability SLAs" - these are almost maximally non-commutative.) Low ℏ_org: The metrics are weakly coupled. You can optimize one without much disturbance to the other. (Example: "documentation coverage" and "deployment frequency" - these are roughly commutative.) Zero ℏ_org: The metrics fully commute. Measuring one has zero effect on the other. They can be independently optimized. (This is rare in practice for any metrics that involve human behavior.) Which of Your Metrics Are Non-Commutative? Here's a practical framework. Ask yourself: "If I aggressively optimize metric A for 6 months, then try to optimize metric B - would I get a different outcome than if I'd done them in reverse order?" If yes, they don't commute. Here are common non-commutative pairs: | Metric A | Metric B | Why They Don't Commute | | Sprint velocity | Code quality / defect rate | Shipping fast creates tech debt that degrades quality measurement | | Feature output | System reliability (SLA) | Feature churn introduces instability; stability-first limits feature throughput | | Hiring speed | Team cohesion | Rapid hiring dilutes culture; culture-first slows hiring | | Revenue growth | Customer satisfaction | Aggressive monetization erodes trust; trust-first slows revenue | | Individual performance | Team collaboration | Individual KPIs create competition that undermines collaboration | | Short-term profit | Long-term R&D investment | Profit pressure cannibalizes R&D budgets | And some (roughly) commutative pairs - metrics you can track simultaneously: | Metric A | Metric B | Why They Commute| | Test coverage | Documentation coverage | Both are "completeness" measures that don't interfere | | Uptime | Response time | Both align in the same direction for the same work | | Security audit score | Compliance score | Both are checklist-style measures with minimal behavioral distortion | So What Do You Actually Do? If simultaneous optimization is mathematically impossible for non-commutative metrics, how do you manage a company? Rotate Your Observation Basis In quantum mechanics, physicists deal with non-commuting observables by choosing which basis to measure in - and accepting uncertainty in the other. Apply the same principle: Quarter 1: Optimize for quality. Measure defect rates, tech debt ratios, code review thoroughness. Accept that velocity metrics will look bad. Quarter 2: Optimize for velocity. Measure throughput, cycle time, deployment frequency. Accept that some quality metrics will regress. This isn't "giving up on quality" in Q2 - it's acknowledging the mathematical reality that you can't have perfect information about both simultaneously. Measure the Commutator, Not Just the Metrics Before deploying a new KPI, estimate its ℏ_org with existing metrics. Ask: "If we aggressively optimize this new metric, which existing metrics will it disturb?" If the commutator is large, you need a conscious tradeoff strategy - not a dashboard with both metrics side by side pretending they're independent. Use Conjugate Metrics Instead of Individual Metrics In physics, instead of tracking position and momentum separately, physicists often track phase space- a combined representation that respects the uncertainty bound. The organizational equivalent: composite metrics that encode the tradeoff. Instead of tracking velocity and quality independently, track something like: Effective Output = (Features Shipped) × (1 - Defect Rate) × (1 - Rollback Rate) This single metric respects the non-commutativity by building the tradeoff directly into the measurement. Accept Irreducible Uncertainty This is the hardest one. Some aspects of your organization are fundamentally unknowable if you're optimizing for others. That's not a failure of your management system - it's a mathematical property of the system you're managing. The most important things in your company are the things you cannot continuously measure. The Uncomfortable Conclusion Goodhart's Law isn't a bug in human nature. It's not about gaming, or laziness, or misaligned incentives. Those are symptoms. The root cause is mathematical: certain pairs of organizational metrics are non-commutative operators on the state of your organization. Optimizing for one irreversibly alters the other. The act of measuring one disturbs the measurement of the other. No dashboard, no OKR framework, no "north star metric" strategy can violate this bound. The uncertainty principle doesn't care about your management philosophy. The question isn't whether Goodhart's Law applies to your organization. The question is: which of your metrics don't commute - and what are you going to do about it?
Key Takeaways
- •Your dashboard is lying to you - and we can prove it mathematically. physically disturbs the other
- •This story was reported by Dev.to, covering developments in the dev space.
- •AI advancements continue to reshape industries — read the full article on Dev.to for complete coverage.
📖 Continue reading the full article:
Read Full Article on Dev.to →


