7 ms·
Unit tests are great, but they're a stupid way to catch typos.
by tptacek 7y ago
Unit tests are great, but they're a stupid way to catch typos.
- dragonwriter 7y ago> Unit tests are great, but they're a stupid way to catch typos. Catching typos is an important part of what unit tests do with statically typed code, since typos result in value errors at least as often as type errors.
- tptacek 7y agoThat’s obviously true, but it’s equally obvious that there’s a whole (large) class of typos that types eliminate.
- danmaz74 7y agoI agree that writing them only to catch typos would be stupid. But if you're going to write them regardless, catching typos comes for free. Ps and luckily, even with dynamic languages any decent IDE will catch most typos