Cobra Effect and Software Engineering Management

Smitha Mave
3 min readAug 2, 2020

--

I recently read about a curious incident during the plague pandemic in Vietnam in early 1900s. The colonial French government created a bounty program that paid a reward for each rat killed. It created a new phenomenon of rat breeding for killing and claiming the rewards. This is called the “cobra effect” — occurs when an attempted solution to a problem makes the problem worse. The name was originated from an interesting case in India during the British rule when the government offered a bounty for every dead cobra. Eventually, however, enterprising people began to breed cobras for the income.

I could relate to many such cases in software engineering management. In the early days, the testers and developers were evaluated for the number of bugs found and fixed respectively. “Enterprising” people used to “perform” extremely well as the Dilbert strip below illustrates :)

In this day and age we often reward long hours to fix critical issues in production, meeting seemingly impossible deadlines, etc. Though people may not actually be introducing issues, there is no incentive to achieve better quality code in production if people can be “heroes” by fixing a critical issue in production.

I have seen people wearing it as a badge that they stayed all night troubleshooting a production issue. My question always is how did that issue happen in the first place and why couldn’t it have been avoided.

Goals or OKRs in engineering should be around doing the right planning, identifying the risks at right time and mitigating them and to deliver features as planned without any firefighting. Success of an engineering (scrum) team should be the minimal delta between the committed features vs delivered. A right example of OKR for this would be:

Objective — improve product quality

  • Key Result 1 — Ensure code coverage of 90% for any code deployed to production
  • Key Result 2 — Automate 80% of regression tests executed in a feature pull request
  • Key Result 3— Reduce the no. of production incidents per quarter from x to x/2

Though it sounds very simple and basic concept of engineering management, many organizations inadvertently encourage the extra hours, firefighting and heroic efforts resulting in “cobra effect”. Successful organizations value the commitment and ownership in individuals and teams and reward the right behavior.

Disclaimer: Views expressed are personal based on what I have seen, heard and read.

--

--

Smitha Mave

Techie, believer of equality, follower of current affairs. Loves art, history and literature.