2 ms·
Current job we have a rule: we should not write no more than four layers deep of abstraction in our codebase. The thought being any more that is too much for mo
by exabrial 4y ago
Current job we have a rule: we should not write no more than four layers deep of abstraction in our codebase. The thought being any more that is too much for more than a single person to keep in their head.
I feel like this slays the monolith and forces developers to really think out stuff before they write it. There is of course exceptions to everything including this, but it’s served us pretty well.
- svieira 4y agoI'm curious as to how this plays out in practice (though I love the theory). Some questions: 1. Is this measured in _depth_, in breadth, or in both directions (and if both is the total calculated with `MAX` or `SUM`)? 2. Do you run multiple `main`s, each with this restriction? 3. Do you count third-party frameworks and libraries as layers of abstraction?