Oleg Kornev
guest
guest
The second episode continues with Different Layer, Different Abstraction. Pass-through methods and variables reveal a layer that repeats the lower interface and hides no knowledge. A decorator helps when it adds policy, but wrapper chains without a new abstraction create shallow modules.
Pull Complexity Downwards moves difficulty into a module when this helps many users. A counterexample is a huge configuration surface where every client assembles the correct parameters. Complexity should move down only with module responsibility and a simpler interface.
Better Together or Better Apart rejects rules such as a twenty-line limit. Separation helps independent parts; it hurts when it creates duplication, requires reading a neighboring module, or fragments one domain concept. Information hiding, cohesion, and a clear boundary matter more.
Define Errors Out of Existence reshapes an API so a normal outcome is not an exception. Unix and Windows file deletion illustrate interface semantics. Lower layers can mask failures through retries or aggregate them while preserving consistency. Design It Twice requires alternatives before implementation.