Coding Benevolently

I just finished off near-total rewrite of a python module. Near the same time, I also just finished reading Scientific American’s year-end tribute to human evolutionary biology.

The module is simple enough, all it does is extend a Moodle activity so that our school can use it to do daily notices. For months I had it working just dandy, without a lick of need for maintaining it or for adjusting it in any way. The excuse was that this one adjustment would mean five or ten happier users, and I had my excuse to clear the cobwebs and refactor away. Sort of like how you end up spring cleaning when all you needed was to move the couch.

But the only benefit through all that to me some of my users get one crummy feature adjusted. Soon enough two days had passed.

It’s fascinating because evolutionary biology has a term for this: supercooperation. The same reason the “taking one for the team” works in higher-order evolution works in programming. Supercooperation also helps explain how frameworks such as Django that deploy a very similar logic became so popular: The “don’t repeat yourself” mantra probably served to spread it.

Comments are closed.