Clean code: can we learn from altruism & evolution?

Eliot Sober studies the role of altruism in evolutionary biology and psychology. In the paper Kindness and Cruelty in Evolution he observes that in evolution a group of altruists outperforms a group of self-oriented individuals.

Can we translate that to writing code? Let's compare two extremes:

  • A team of altruistic devs: each dev writes code so that other devs can understand the code easily. The focus is on clean code and helping others.
  • A team of self-oriented devs: each dev writes code so that they, individually, deliver features as fast as possible. The focus is on immediate short-term gains.

Now, as years go by, which team, codebase and product has a higher chance of survival? And if so, what is it that incentives us to be self-oriented?

Would you like to connect? Subscribe via email or RSS , or follow me on Twitter!