This may not be a great title for the concept, but my idea is this: You’ll solve the pain you feel. What’s important is making sure the right people feel the right pain so we all solve the right problems.

It’s related to Measure What’s Meaningful and Make Doing the Right Thing Easy.

Code Coverage

Consider the example of code coverage. The purpose of code coverage is not actually about covering code with tests. It’s about ensuring all behavior is tested. Code coverage is just the percentage if lines that were run during tests. It’s easy to measure. We could run every line but assert nothing. All we’d know is that we can run every line. We’d have no little idea whether the behavior is what we want it to be.

So let’s say as an organization, we know that if we test all the behaviors of our system, we can make changes quickly and confidently. We make it the engineering manager’s job to push for high test coverage. He decides to Stop the Bleeding by making a rule in CI that says engineers can’t merge their code without 100% code coverage.

(TODO: Reframe as the EM’s pain ☝)

Now our engineers are forced to write tests to get 100% coverage. This is can be hard. This is pain. So now they’re incentivized to optimize for executing more code during tests instead of asserting that the behavior we care about is tested thoroughly. The two concerns are related, and the difference will be subtle most of the time, but the engineers are no longer solving the original pain the EM felt.

(TODO: Be…clearer… ☝)