3 ms·
I don't think I've ever been unhappier than working on a Rails project. See a bug on the site - something is rendering incorrectly. grep to find the view. Great
by milch 4mo ago
I don't think I've ever been unhappier than working on a Rails project. See a bug on the site - something is rendering incorrectly. grep to find the view. Great, there's a method that is being called to render the buggy section. Grep for the method name - 0 hits. Amazing, it's something that is synthesized somewhere and I have no idea where. Guess I'll stop what I'm doing and read docs for an hour. If you do nothing but use Rails all day, sure, but the whole convention over configuration thing is such a huge anti pattern to me.
- deleted 4mo ago[deleted]
- craigmcnamara 4mo agomethod(:name).source is your friend
- chao- 4mo ago`method(:name).source_location`, but yes. Ruby is very introspect-able and it is fantastic.
- jimbokun 4mo agoI’ve had similar experiences with Spring Boot Java applications. Methods in stack traces that don’t exist in source code but are magicked into existence by annotations.
- cyberpunk 4mo agoHell with lombok it’s not even uncommon to have entire classes with no defined functions at all. shudder
- lackoftactics 4mo agoSpring Boot is very similiar to Rails. That's what was surprising to me, when I was forced to use it at uni. The annotations magic brings all the PTSD of method missing from Ruby
- ramon156 4mo agoI would advice reading the "efficient rails" book, which explains a lot about how to debug RoR apps.
- IshKebab 4mo agoThe fact that you have to read a book and break out a debugger to do the equivalent of "find all" in any other languages should tell you something right? My experience is exactly the same as Milch's. I've tried to fix stuff in Gitlab but given up when I couldn't even find where it things are defined. That can happen in other languages, e.g. Rust or C where macros are used. But it's pretty much the exception there whereas in Rails it seems to be done by default.
- milch 4mo agoExactly. Sure, I can go read a book and learn about Rails. If I wanted to be a Rails specialist I probably would, but I don't want to be a Rails specialist. And like you said, other languages can do this too, but I haven't really found it to be too much of an issue. I remember one time where I had to break out whatever the rustc flag is that just produces the code with expanded macros, but that's it.
- xlii 4mo agoI won't be as harsh because I have years of experience in Rails and didn't develop harsh feelings against it but moving from Rust/Go/Zig/TypeScript (which I used lately) to Ruby ain't smooth ride. Discoverability is much worse, LSPs aren't super helpful. Using Dash (documentation app) helps a ton. Still some names are confusing after switch (took a minute to recall that 'filter' is actually 'select' in Ruby). I won't say that dev experience is bad but it's definitely different.
- rsanheim 4mo agofilter is also just filter in ruby - aliased as select (and find_all) on Enumerable.
- xlii 4mo agofacepalms Weird that searching for it didn't yield any results, though I stand corrected. However it seems that select is the actual "root" of documentation. Filter sends to find_all, find_all sends to filter or select.
- deleted 4mo ago[deleted]
- lackoftactics 4mo agoThe worst part is communicating to the Ruby on Rails community that they have a problem with DX or that Rails is not really the top choice anymore for new startups. It's a cult of DHH. I am still mostly part of the Rails ghetto; it's paying my bills, but after gaining more experience during my computer science master's degree with statically typed languages, I clearly see the pitfalls of Ruby. People often miss the difference between simple and easy. Yes, Ruby is easy, but it's not simple, and it will make you suffer a lot if you get to a complex app. The debugging sessions in Rails are a nightmare. Meanwhile Ruby community is acting like religion, it's almost impossible to convert people from Ruby to other languages, they don't see the language as tool, but as part of their identity
- drzaiusx11 4mo agoMaybe I'm just not tapped into the community but I've been a ruby developer going on 6 years now and I find debugging ruby apps no better or worse than any other languages I've worked with over the years. It's fairly easy to instrument ruby much like all the other dynamic languages (python3, js, etc) but with better ergonomics. My main qualm with ruby is their reliance on external type files for type annotations. What a terrible idea. Should have just done inline optional types like python3 or typescript.