Pitfalls of Measuring Developer Productivity

Still staying on the McKinsey topic – feel like I could write a dozen post on this 😂


Goodhart’s Law is a concept that originated in the field of economics but has since found relevance in various aspects of life, including software development. This law states that “When a measure becomes a target, it ceases to be a good measure.” In other words, as soon as you start using a specific metric as a goal to optimize, people will find ways to manipulate it, often leading to unintended and undesirable consequences. In the context of software development, this law has profound implications for how we measure and manage developer productivity.

Developer pitfall

The Obsession with Metrics

In recent years, there has been a growing trend in the software industry to quantify and measure every aspect of the development process. Metrics like lines of code written, bug fix rates, feature delivery timelines, and code review completion times have become the gold standard for evaluating developer productivity. While the intention behind these metrics is often to improve efficiency and accountability, they frequently fall victim to Goodhart’s Law.

The Harmful Consequences

  • Gaming the Metrics: Developers are intelligent problem solvers. When they are faced with metrics as targets, they tend to optimize for those metrics rather than the actual quality of their work. For example, if lines of code become a key performance indicator, developers may write more code, including unnecessary or redundant lines, just to meet the quota, even if it doesn’t contribute to the overall quality of the software.
  • Neglecting Code Quality: Quality often takes a backseat when metrics like bug fix rates are emphasized. Developers may rush to fix bugs without thoroughly testing their solutions, leading to more bugs and technical debt in the long run. This can result in a vicious cycle where the rush to meet metrics causes more issues than it solves.
  • Demotivation and Burnout: Constantly measuring and evaluating developers based on metrics can create a culture of stress, competition, and burnout. Developers may feel pressured to meet unrealistic targets, leading to decreased job satisfaction and creativity. This can have a detrimental impact on the overall health of the development team.
  • Focusing on the Wrong Goals: Metrics tend to measure what is easy to quantify, not necessarily what is most important. Focusing solely on metrics may divert attention away from critical but less quantifiable aspects of software development, such as design quality, user experience, and long-term maintainability.

A More Holistic Approach

Instead of solely relying on metrics to measure developer productivity, a more holistic approach should be adopted:

  • Quality over Quantity: Emphasize the importance of code quality, design, and user satisfaction over arbitrary metrics like lines of code or bug counts.
  • Continuous Learning: Encourage developers to learn and improve their skills rather than pressuring them to meet short-term targets.
  • Team Collaboration: Foster a culture of collaboration and knowledge sharing within development teams, which can lead to better outcomes than individual performance metrics.
  • Flexible Goals: Recognize that development is a creative process, and set goals that can adapt to the unique challenges of each project rather than one-size-fits-all metrics.


Goodhart’s Law reminds us that measuring developer productivity solely through metrics can lead to counterproductive behaviors and harm the overall quality of software. Instead, we should focus on fostering a culture of quality, continuous improvement, and collaboration within our development teams. By doing so, we can achieve better outcomes while avoiding the unintended consequences of misguided metrics.

One thought on “Pitfalls of Measuring Developer Productivity

  1. Pingback: Dew Drop – September 6, 2023 (#4019) – Morning Dew by Alvin Ashcraft

Leave a Reply

Your email address will not be published. Required fields are marked *