2 ms·
> This mindset fails to take into consideration the fact that tightly coupled things are often simpler to understand and reason about You're right on a small s
by jskulski 11y ago
> This mindset fails to take into consideration the fact that tightly coupled things are often simpler to understand and reason about
You're right on a small scale. With teams or feature changes, tightly coupled things quickly breed incidental complexity.
I like what you said about decoupling not being unqualified positive. It's not, it's very good, but it's costly (with a high return). It's all about trade offs. Testing, and specifically testing-first, is expensive compared.
If I'm working on a critical piece of my system? Yep, worth it. TDD.
Do I need to refactor something so I can reduce complexity with this change? TDD.
Am I writing a quick workaround for better UX that will be removed after two days? TDD isn't appropriate.
It's a essential skill to have, but not the only way to practice.
- Silhouette 11y agoWith teams or feature changes, tightly coupled things quickly breed incidental complexity. That's a big assumption. However, even if it's correct and tighter coupling does introduce some additional complexity in any given case, if the code is also significantly easier to understand as a result then it may still be quicker and more reliable to maintain it. After all, very loose coupling also breeds a kind of incidental complexity, because something still has to connect all the components.
- davidjnelson 11y agoInteresting point. How about dependency injection for oo code and composition for functional code?