Hacker News new | ask | show | jobs
by benkitzelman 1052 days ago
We have hundreds of thousands of lines of ruby code spanning many services / monoliths. Even now I find it somewhat annoying to open a controller / component that is basically an empty class def but somehow executes a bunch of complex stuff via mixins, monkey patches etc, and you have to figure out how.

We are turning to https://sorbet.org/ to reign in the madness. I'm keen to know if others are doing the same, and how they are finding it (pros and cons)

2 comments

I have used Sorbet in my web framework. The method signatures can be tedious to type out sometimes, but it helps a lot when refactoring code. I feel more confident that my changes will work. It's not as flexible as TypeScript, but it's pretty good and has saved me from mistakes many times. The language server helps a lot with autocompletion so I don't have to keep every little detail in my head all the time. Sometimes I have to structure the code a little bit different just to make Sorbet happy which is annoying, but I've also been able to replace huge parts of the codebase quite easily.
How's sorbet? We're looking into it and the webpage looks great, but how's actual usage?