One of the most profound insights I have learnt about OO is that software design — the shaping of code & classes — is best informed by what processing needs to do, rather than the entities it goes between.
This makes sense on a fundamental level. The purpose of most software is to process & transform data. Algorithms (like quicksort for example) have the same structure, regardless of what data they’re processing. In short, design of the machine should be based on what does it do rather than what its inputs look like at rest. Continue reading