Chapter 22. Beneficially Relating Elements

What is software design? I’m not a fan of starting with definitions, but we’re hardly starting by now. You’ve seen examples of what I mean by design. You’ve seen how individual decisions chain together to achieve larger goals. You’ve seen the first glimpses of what I mean by “software design is an exercise in human relationships.” Now I can say what I mean by “software design”: beneficially relating elements.

That’s not many words for a big concept. Each word must be carrying substantial weight. Let’s pick them apart and then put them back together.

Beneficially

Here’s where the magic happens. One design is to have a single gigantic soup of tiny subelements. Think assembly language with a global namespace. This program would work. It would behave from the point of view of an external observer exactly the same as a well-designed program. Quickly, however, we would be unable to change it. There would be too many relationships, often implicit, between the elements.

When we design, creating intermediate elements between the machine instructions and the whole, those intermediate elements begin benefitting each other. Function A can be simpler because function B takes care of the complexity of a part of the calculation.