Re:We 30x'd our Node parallelism
by JMTQp8lwXL on Friday December 13, 2019 @02:19PM
(#21784475)
Most bugs encountered in production systems aren't type based issues. Types are more useful for developer productivity (e.g., intellisense) than any other purpose.
[ Parent
| on HN ]
Previously worked at a Node company - at one point in an effort to improve code quality we ran statistics on errors we'd seen over the past [period - forget exactly]. Type errors were our most common source of error both by number of total errors and number of distinct errors.
I'd love to see any data or case studies that claim the opposite if you have any.
Re:We 30x'd our Node parallelism
by JMTQp8lwXL on Friday December 13, 2019 @03:24PM
(#21785069)
https://blog.acolyer.org/2017/09/19/to-type-or-not-to-type-q...
> Is a 15% reduction in bugs making it all the way through your development pipeline worth it to you?...
https://www.reddit.com/r/typescript/comments/aofcik/38_of_bu...
> 38% of bugs at Airbnb could have been prevented by TypeScript according to postmortem analysis
I've never seen a number far outside of the 15-30% range.
In my experience, most bugs are operator error. Developers didn't code for branching paths that should've been accounted for, etc.
Personally, I'm a fan of TypeScript. Just don't expect to remove the majority of your bugs via its usage. The old "no silver bullet" adage.
Re:We 30x'd our Node parallelism
by bathtub365 on Friday December 13, 2019 @08:44PM
(#21787233)
How is JavaScript worth it if it typically adds 15-30% more bugs? That’s an enormous figure.
Re:We 30x'd our Node parallelism
by JMTQp8lwXL on Friday December 13, 2019 @09:18PM
(#21787354)
Well, it runs everywhere, for one. That's an attractive quality to a language.
One could argue that all errors are type errors. There is not just a type system, static or dynamic, inferred or annotated, which is good enough to catch all bugs. :P
Just curious- did you use Joi or anything similar to try to at least verify at some point that you had a valid object?
Re:We 30x'd our Node parallelism
by JMTQp8lwXL on Friday December 13, 2019 @07:27PM
(#21786932)
A follow up, but I also wanted to highlight: plenty of typed systems (like Java Microservices) have bugs. If 100% of bugs were due to typing issues, these systems would -never- have bugs. Ever. Yet, we know that's not the case. That's another rationale for how the 1/4 to 1/3 less bugs ratio makes logical sense.