Just finished “A Philosophy of Software Design” by John Ousterhout. Some thoughts from the book mixed with mine ones.
Software design is to reduce software complexity. If the solution/design doesn't reduce the complexity, then don't use it.
Complex system is a system which is hard to understand and modify.
Systems, which are easier to understand aren't always the ones with less lines of code.
Complexity isn't caused by a single big event, it accumulates over time. Little changes increasing complexity only a little, over long time might make code unmaintainable. So we should be careful with changes, which increase complexity even a little.
Pressure to get features working ASAP might be big in business. Making a mess may lead to code being unmaintainable.
Working code isn't enough. It also shouldn't introduce unnecessary complexity.
Make improvements for problems as soon as you spot them. Refactor, clean, redesign, fix, etc. Leaving to deal with all the mess at once some time in the future doesn't work. It's the same as tidy your house twice per year; better a bit each time you see some dirt around.
Decomposing software into modules controls how much complexity developer faces at once.
Modules consist of interface (externally visible) and implementation (hidden from the module user). The smaller is the interface comparing to the functionality the module provides, the more complexity is hidden from the user (small interface and big functionality gives so called deep modules).
Make a common used case either a default one or as simple as possible. This reduces cognitive load for the users. They don't have to be aware of the parameters which in most cases are not needed and set to default behind the scenes.
I guess nobody would believe if I say that all points didn't fit here? :)
Come over to my website so I could share the rest!
Top comments (0)