3 ms·
Roughly analogous to programming concepts of "encapsulation" and "decoupling." An exercise I often use is to pretend like whatever I'm writing needs to be usab
by ralusek 7y ago
Roughly analogous to programming concepts of "encapsulation" and "decoupling."
An exercise I often use is to pretend like whatever I'm writing needs to be usable on multiple projects, so it should be able to be a package that anybody could find useful. Then you work backwards from the interface you'd like a tool like this to have, and obfuscate anything other than the interface. Obviously you're not doing this for most business/controller logic, but for most other things it goes a long way towards avoiding the kind of spaghetti code the Law of Demeter seeks to weed out.