4 ms·
>> In Airbnb, they found out that 38% (!) of bugs could have been prevented by using TypeScript[1]. I don't buy these hypotheticals and also I don't believe in
by jondubois 8y ago
>> In Airbnb, they found out that 38% (!) of bugs could have been prevented by using TypeScript[1].
I don't buy these hypotheticals and also I don't believe in this kind of anecdotal evidence.
I think that the real root problem is that they didn't break down the code into logical components and didn't test them correctly - That was the real problem, not JavaScript.
When you look at reports of bug density across large samples of projects, it's clear that TypeScript does not solve any problems. See https://medium.com/javascript-scene/the-shocking-secret-about-static-types-514d39bf30a3 https://medium.com/javascript-scene/the-shocking-secret-abou...
- frankpf 8y ago> I don't buy these hypotheticals and also I don't believe in this kind of anecdotal evidence. The only anecdotal evidence I've linked is Stripe's experience with Sorbet. The paper linked is an actual scientific analysis with great study design. I couldn't find the Airbnb slides or talk but an engineer involved claims the study was carefully designed[1]. > When you look at reports of bug density across large samples of projects, it's clear that TypeScript does not solve any problems. See https://medium.com/javascript-scene/the-shocking-secret-abou.. https://medium.com/javascript-scene/the-shocking-secret-abou.... Go read the "study" referenced in that article. It's just blog post with a terrible methodology. It's basically (number of issues with bug label) / (lines of code) The author doesn't even normalize for LOC (larger codebases tend to have more bugs) or take into account project complexity. [1]: https://twitter.com/swyx/status/1094857103863209985 https://twitter.com/swyx/status/1094857103863209985 EDIT: add disclaimer about airbnb talk
- keymone 8y agothe problem with study like airbnb is that while tooling would have caught X% of bugs of type A, it in no way means those wouldn't just be replaced by bugs of type B. bugs are (in part) function of code and tooling complexity, making some bugs harder to introduce doesn't reduce that complexity. risk compensation principle is another factor, and so on. i haven't yet seen strong evidence that static typing really reduces bug density.
- z3t4 8y agoI would love to read the Airbnb study. Do you have a reference ? The other study you referred to sponsored by Microsoft is very vague on the methods used to conduct the experiment. So its not repeatable. You can't say something is scientifically true unless the results are repeatable.
- int_19h 8y agoEric Elliott has been making claims like these for years now. You can see the comments here taking apart the last round (which was more substantiated than the one you linked to). https://news.ycombinator.com/item?id=18977700 https://news.ycombinator.com/item?id=18977700