Software complexity is software entropy

Entropy is a thermodynamic term, and I regard it a very profound insight applicable outside physics. For example, things in the world get worn over time. I’d describe that as a process of increasing entropy, which is basically irreversible unless some external, accurate force (such as repair) is applied.

Clothes wore out as its “entropy” accumulated. Well-made clothes are more durable, but it’s still a matter of time. Buildings, paintings, televisions, cars or batteries are all the same. So are your household chores – it takes a lot of energy to keep the house clean and organized. Have you ever sorted the LEGO bricks for kids? My son can mess up all the LEGO bricks in seconds, and it takes way longer to undo that. Generally, it’s very arduous to decrease the entropy of a system.

Low entropy – fresh, ordered, fully charged, …
High entropy – worn out, chaotic, dysfunctional, …

Back to software. Software complexity is more like the entropy in the second law of thermodynamics. Changes made to the software usually increases its complexity as we add new features or fix bugs. When checking in new code, unless it’s really one-off, ensure its good quality otherwise you’ll pay higher total cost in the long run. All our software engineering endeavors and disciplines are centered around managing complexity, or decreasing entropy.

You know it’s such a pain to work on a high entropy system. When a software component becomes too complicated, fragile that everyone avoids to touch, it’s probably coming to an end.

Solution? Like our house, constantly cleans it before it buries you.

This entry was posted in Software, Trait and tagged , , . Bookmark the permalink.