Avoid excessive generality
If it’s good for everything, it’s good for nothing.
Principle of escalating complexity
Adding a requirement increases complexity out of proportion.
问题的复杂度一般不和其规模成正比,往往存在指数关系。
The law of diminishing returns
The more one improves some measure of goodness, the more effort the next improvement will require.
要想提高资源利用率,问题的复杂度通常加倍甚至呈指数增长。
The unyielding foundations rule
It is easier to change a module than to change the modularity.
更改modularity(修改接口)往往涉及更改多个module。
The robustness principle
Be tolerant of inputs and strict on outputs.
The safety margin principle
Keep track of the distance to the cliff, or you may fall over the edge.
Decouple modules with indirection
Indirection supports replaceability.
The incommensurate scaling rule
Changing any system parameter by a factor of 10 usually requires a new design.
Design for iteration
You won’t get it right the first time, so make it easy to change.
Keep digging
Complex systems fail for complex reasons.
Adopt sweeping simplifications
So you can see what you are doing.
The principle of least astonishment
People are part of the system. The design should match the user’s experience, expectations, and mental models.