Complexity Is the Enemy
Complexity is anything that makes a system hard to understand or change. It rarely comes from one big mistake but from many small ones piling up. Treat each small shortcut as a real cost.
by John Ousterhout · 7 ideas
Complexity is anything that makes a system hard to understand or change. It rarely comes from one big mistake but from many small ones piling up. Treat each small shortcut as a real cost.
A deep module hides a lot of work behind a small, simple way to use it, like a light switch that controls a whole circuit. A shallow one asks you to learn almost as much as it does for you. Make parts that give a lot and ask little.
Each part of a system should keep its own decisions private, so other parts do not depend on them. When the same decision shows up in several places, changing it means changing all of them. Put each decision in one place.
Tactical work aims only to get the current task done, and its shortcuts build up into a mess. Strategic work spends a little extra time on good design every time. Invest a steady slice of effort in structure, not just features.
When something has to be complicated, it is better for the builder of a part to handle it than for every user of it. One person absorbing the difficulty saves many others from it. Take on the hard part so that those who rely on you do not have to.
Every special case and error state adds complexity for everyone. Often you can redesign so the problem simply cannot happen, like deleting something that is already gone counting as success. Remove the case instead of handling it.
Your first idea is rarely your best. Sketch at least two quite different approaches before choosing one. Comparing them reveals weaknesses neither shows on its own.