3 ms·
> Are you going to actually get things done faster or better? Seems unlikely, especially in a world where requirements shift every five minutes and are ill-defi
by solatic 5y ago
> Are you going to actually get things done faster or better? Seems unlikely, especially in a world where requirements shift every five minutes and are ill-defined in the first place.
What is the value of tests?
If requirements are going to shift every five minutes then sure, tests hold you back. Tests in an inherited codebase defined how the system needed to work, not how the system will adapt to changing requirements. Often, particularly for small-enough and simple-enough systems, a human eye is much more flexible than any tests you could write in code.
But the fact of the matter is that the utter majority of software that runs in production (note that qualifier - excluding code that never makes it into production for a variety of reasons), stays in production. It's a corporate cash cow of one kind or another. Software in production needs to be maintained. Software vulnerabilities are reported, old versions hit end-of-life. Java 4 -> Java 5 -> Java 6 -> Java 8 -> Java 11 -> on and on and on. So the business case is very simple. You're forced to make changes and you want to make sure those changes don't kill your cash cow.
Tests check your application at run-time. Types check your application at compile-time. As a result they can provide both more dependable and quicker guarantees than waiting for a run-time test suite to finish running.
If you don't understand the value of tests, you haven't worked on a large enough, mature enough system, where the original engineers have all long left the company.
- danmaz74 5y agoThe comment you're replying to doesn't mention tests, but "a rigorous type system". So accusing OP of not understanding the value of tests seems pretty OT.
- jgwil2 5y agoI think the parent is suggesting that by this logic, tests are also useless, but almost no engineers would argue against tests.
- Nursie 5y agoI'm not arguing against types either. I'm specifically arguing against their fetishization and the way that some languages (and programmers) view everything as mathematical type transformation. I guess i need to write my comments a bit more precisely.