Hacker News new | ask | show | jobs
by october8140 16 days ago
I'm not sure any language + framework prioritizes developer happiness as much as Ruby on Rails.
8 comments

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.
I 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.

filter is also just filter in ruby - aliased as select (and find_all) on Enumerable.
facepalms

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.

I’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.
Spring 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
Hell with lombok it’s not even uncommon to have entire classes with no defined functions at all. shudder
method(:name).source is your friend
`method(:name).source_location`, but yes. Ruby is very introspect-able and it is fantastic.
I would advice reading the "efficient rails" book, which explains a lot about how to debug RoR apps.
The 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.

Exactly. 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.
The 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

Maybe 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.
I get a similar feeling from Elixir and Phoenix without the method_missing foot gun.
I have been pretty happy with Java and .NET frameworks, regardless of the lack of appeal in SV influenced circles.

Happiness doesn't always translate into performance, e.g. famous Twitter logo until they moved into JVM and Scala.

While Ruby on Rails took the fame, we already had similar experiences with AOLServer and Vignette, using Tcl.

We had our own variant at a Portuguese startup, and eventually the founders created OutSystems, one of the first graphical RAD tools for Websites and distributed systems development in low code/no code, targeting JVM or CLR infrastructure.

Now having said all of this, it is great to finally see CRuby getting a JIT in the box.

It’s short term happiness at best, and at the expense of every other possible architectural characteristic (maintainability, performance, reliability, scalability, you name it).
Updating Rails is one of the most painful processes ever. There is no real way to be sure it works. You just have to have 50,000 unit tests, cypress tests, and then hope and pray.

On any sufficiently large and old app, something will always break in a way that isn't caught by your tests or manual testing, and only shows up after it goes out live.

This has not been my experience.

I have taken applications from 2-to-3, 3-to-4, and so on, through 8.X.

If anything it has gotten better/easier over time. The most challenging upgrades were 2.X to 3.X (for reasons I can't recall), and then 6.X to 7.X (for an application that had issues adopting zeitwerk). In both of those situations, there was a lot of rote legwork, but once tests were passing, the application was working reliably. The other upgrades (3-to-4, 4-to-5, 5-to-6, 7-to-8) weren't happy-fun-rainbows-and-unicorns, but they weren't catastrophically complicated? Not even in fairly large codebases.

For each of these, a strong test suite was the best tool, which it sounds like you already know?

In my experience, the other impactful factors were:

(1) Reading the CHANGELOGs and knowing enough about Rails to know what they meant for the application.

(2) Using test fixtures (or fixtures with only some factories) for a quicker feedback loop for engineers.

(3) Having a true QA function in the company that isn't just engineers testing their own code.

> 2.X to 3.X (for reasons I can't recall)

Many big structural changes, IIRC bundler integration, plugins became engines, etc...

It was the big Rails+MERB merge.

Ah yes! I remember Merb now that you say it :)

I have my criticisms of Rails, but that definitely set it on a better path.

Honest question: what’s an example of a fully-featured web framework that makes upgrading a “large & old” application painless? In my experience, upgrading an underlying framework that a piece of complex software depends upon without breaking everything pretty much always requires time & good test coverage.
Type safety would fix 99% of the issues I've had upgrading Rails.
Yes, typing would obviate the need for the sorts of extensive unit testing I'm talking about here. I feel that. Luckily, the frontier LLMs (especially Claude) have gotten _really_ good at writing Rspec...
things that people in Ruby community don't like to hear for $1000
Most Java and .NET ones, not everything breaks, statically compiled, so not as many unit tests required as in dynamic languages.

While it is deprecated, you can do a File=>New Project for Web Forms in 2026.

Why do many people mention the need of tests for types in dynamically typed languages?

In Rails my tests are mostly to ensure that a request to a controller returns the expected response and the expected changes in the database. Unit tests are often on validations and the errors they return for invalid data. Then there are functional tests that drive a headless browser.

Because they are a requirement to avoid runtime errors that usually are compilation errors in other languages.

Not fun in production.

Dynamic languages with optional typing like BASIC or Common Lisp is another matter.

That may have been true (I'm skeptical) back in the RoR 2.x -> 4.x times, but nowadays updating it is a breeze.
I’m sure the LLM that translated the code was ecstatic!
For me it surely is Python with Pytorch, if we talk about frameworks in general.

For web, I can't really offer any useful positive input, I was never satisfied with any framework for Python or Node. I see people praise RoR and Phoenix quite a lot tho!

Ruby? Yes.

Rails? Depends on the project.

Rails is the worst. It’s so easy to make a mess and it’s hard to debug.