the main useful thing i took from A Philosophy of Software Design by John Ousterhout is the distinction between "deep" vs "shallow" modules
this works for modules, classes, methods, functions; any chunk of code
let us explore:
consider these modules
the area of the rectangle represents the complexity of the module's implementation, while the length of the top edge represents the complexity of the module's interface
module A hides a lot of complexity with a relatively simple interface. it's "deep"
module B doesn't hide that much more complexity than what it exposes in the interface. it is "shallow"
deep modules good. shallow modules bad