Conservation of complexity

A significant part of what we do as programmers is manage complexity.

Broadly (and I'm simplifying), the complexity of the solution to a given problem is constant.

It's likely the solution will consist of multiple parts working together, and we decide which parts should be simple, with the knowledge that that will make other parts more complex.

Some examples:

The general pattern is that you can make it less complex here, but the complexity over there goes up. It's up to you to make mindful decisions about how to trade off the complexity of different parts of the system.

Just like real-world counterparts — e.g., conservation of momentum — this only holds to your solution in isolation. Over time you can find that the complexity of your solution needs to increase, because external forces (e.g., changing business requirements) require the solution to change. Rarely (and happily) you'll discover that you can reduce the complexity of your solution because, e.g., some other system has implemented part of the solution, so you no longer have to.