If you are a developer (who does not use RBS or Sorbet), how often do you find a bug that has made it all the way to production, where you think "that bug would have been trivially caught by a type system”

  • Occasionally (43)
  • Rarely to never (59)
  • All the time (5)
  • Often (14)
6
Share
Share on Mastodon
Share on Twitter
Share on Facebook
Share on Linkedin
Noel Rappin

My experience is that while I do things when developing that are basically typos and would be caught by a compiler, those errors are nearly always trivial and loud, and are generally caught and fixed before anybody else sees them.

The bugs that make it to production, in my experience, tend to be faulty logic or bad assumptions and would not be caught by a compiler.

I'm wondering how universal my experience is…

3
1y
Noel Rappin

If you said "often", or "all the time", I'm curious about what kinds of things you are seeing, and what it would take to catch them sooner in Ruby…

4
1y
ben

@noelrap I think perhaps I’d wonder what bugs could be trivially caught by a type system and not caught by better testing.

I like strict-ish types but I don’t necessarily think they’re the only way to solve the problem.

1
1y
Caleb Hearth :d6:

@noelrap woah the spread on this is surprising

0
1y
Bradley Schaefer

@noelrap I like this poll.

I suspect peoples' experiences will depend a lot upon the depth of their experience writing (typeless) Ruby.

I agree with some of the responses that the main problems I see are unexpected Nil values, and I'm not sure a full-blown type system is necessary to make a dent in those.

1
1y
Kevin McFadden

@noelrap I'm my code rarely, but I also try to document return values and handle them appropriately. Nils suck. Monads are probably a solution but I haven't gone there. I'm baffled by the ruby and rails docs that don't clearly define return values.

0
1y
Replies