DEV Community

Discussion on: A Philosophy of Software Design, Part 0: Introduction

Collapse
 
rwhitt2049 profile image
Ry Whittington • Edited

Solid article. Sometimes I try to point people to SOLID, but that can be a little obtuse for new programmers.

My only critique would be your section on orthogonality. Orthogonal means being at a right angle to each other (in the geometric sense), or completely independent of each other (in the statistical sense), and not parallel. You are 100% correct on feature independence being key.

In the context of software features, it has more to do with the single responsibility principle and the separation of concerns rather than simplicity. Although simplicity is often the natural outcome. Wikipedia has the technical CS definition, but it went over my head from some time.

The way I usually explain orthogonality is with the following example. Say you have a smart phone with two features: one feature to change the volume, and another feature to change the screen brightness. These features would be orthogonal because you can (hopefully) change the brightness of the screen and have no effect on the volume, and vice versa.

If these features were not orthogonal, you might increase the brightness and then also increase the volume equally. How obnoxious! Orthogonality leads to the minimization, or complete eradication of side effects.

Good start! Looking forward to the next parts so I can share with my junior colleagues.

Collapse
 
swfisher profile image
Sam Fisher • Edited

Thanks Ry! Good catch on orthogonality. I meant to write “perpendicular” but instead wrote “parallel.” I think orthogonality has a really potent analogy to simplicity in problem decomposition through the search for a “minimum dimensional basis” for a set of vectors from linear algebra. I don’t quite know how to say it in an accessible way yet.

The low dimensional basis idea suggests that we should not only search for some collection of simple, seperate subproblems, but actually aim for the most compact set. Perhaps this is another principle (compactness) in itself?

As I see it, the single responsibility principle and seperation of concerns are ways of guiding us back towards the criteria of simplicity and orthogonality, respectively. Orthogonality directly follows from simplicity because it offers a way from complex (many folded) to simplex (one fold).