writings

Metrics

published on : Tuesday, April 30, 2024

If you’ve ever worked at any organization which does software development, you’ve almost certainly come across various metrics your team, org (or the company) wants to optimize. A few examples I’ve seen where this can be beneficial are: build speeds, page speeds, accessibility scores, time to deploy, etc etc.

Notice that most of the above metrics are almost purely technical and there is almost a universal consensus on what these things measure and why we should measure them and try to improve them. The trouble starts when companies start to be more “data-driven” in realms where correlation and causation are non-existent or not particularly easy to derive, and start applying the philosophy of “better metrics are always good” to things which are not so straightforward to measure. A few examples are: number of lines of code, number of pull-requests raised, number of bugs created versus resolved, most of the stuff that traditional “performance evaluation” measures, etc.

I’ve seen situations and teams where developers and QA teams fight over jira tickets and their whole argument is about whether the given item under discussion is supposed to be considered a “bug” or an “improvement” or an “enhancement” or whatever other term they prefer. Likewise for most of the “goals and milestones” which managers may set during performance reviews. Even the bug count optimization may mean (in dysfunctional organizations) that, instead of reducing the number of bugs by fixing them, people just declare some bugs to not be bugs or do something that makes them/their teams look good, but is actually detrimental to the user.

A relevant example of this metrics-driven-development culture in today’s times is this excellent piece on how google search was deliberately made useless by Ed Zitron. Go read the above article if you’ve not read it yet and come back here.

Any discussion about metrics is incomplete without the mention of Goodhart’s law which states that:

“When a measure becomes a target, it ceases to be a good measure”.

Here are some real world situations I’ve seen where this has happened in companies that are considered quite successful:

A lot of other scenarios come to mind where I’ve seen people either ignore metrics, or selectively remember them and try to use them to further their own ends within companies. It seems like everyone measures everything these days, but very few people actually think about what they are measuring, and more importantly why something would be a reasonable thing to measure, and what the second and third order consequences of “optimizing” something may result in.

It’s a hard problem to solve, so most people don’t even try and just keep doing what everyone else is doing.