24 ms·
One problem with the math for the ROI calculation is that catching a bug with a test is counted the same as catching a bug while you're typing the buggy code. T
by brlewis 8y ago
One problem with the math for the ROI calculation is that catching a bug with a test is counted the same as catching a bug while you're typing the buggy code. Type checking lets you catch bugs sooner, thus more cheaply.
Another problem is that it focuses on bugs that make it out to production. Maybe for some projects production bugs are so costly that pre-production bugs are relatively negligible, but for most projects you can't treat pre-production bugs as 0 cost.
- ericelliott 8y agoSome good reasons for that: 1. I get type feedback in my browser with inference. 2. I get near real-time feedback from TDD on file save. 3. I get real-time lint feedback, too. The net result is I get several multiples better bug coverage than TypeScript alone can provide at about the same speed -- while writing idiomatic JS.
- ng12 8y ago> TypeScript alone can provide at about the same speed If writing your unit tests contributes less overhead than writing TypeScript types you're doing something horribly wrong.
- deleted 8y ago[deleted]
- ericelliott 8y agoIt's not less overhead, but you can't skip TDD with TypeScript because at least 80% of bugs are not detectable by TypeScript.