3 ms·
How is writing extra boilerplate tests better than saying what you mean in the primary code?
by lonelappde 7y ago
How is writing extra boilerplate tests better than saying what you mean in the primary code?
- mlthoughts2018 7y agoIt addresses exactly the cases you care about, whereas trying to bake it into designs or type system usually adds heavy restrictions that don’t necessarily have anything to do with your exact use cases. Basically from a You Aren’t Gonna Need It point of view, doing it in tests lets you minimally address the real use case with much less risk of premature or incorrect abstraction. In my experience, premature abstraction is one of the worst problems in business software. To contrast two far ends of the spectrum, minimalistic patchworks of gross hacking are asymmetrically way better than overhead of premature or incorrect abstractions.