Hacker News new | ask | show | jobs
by petabyte0 1113 days ago
In real world problems, there are many different constraints, mixed in with legacy code and tests along with many new requirements. It's hard to wrangle through all of those 1000s of lines of code no matter how you slice it, abstractions or not. I think sometimes people just want to vent that if it's hard that there MUST always be a better way. That's not always the case.

It's not gong to get fixed by just thinking about cognitive load. It's a very delicate balance: increasing cohesion and encapsulation, adding robust tests, also adding new features, not spending ungodly amount of time refactoring, being mindful of how easy it is to review etc. Even cognitive load is not the right way to look at it. If the abstractions give you very desirable guarantees in terms of performance and correctness, you need to consider it too.