August 2nd, 2024

Rails Is Good Enough

Onur Ozer discusses the lasting significance of Ruby on Rails, highlighting its use by startups and large companies, its productivity, and its ability to simplify web application development over two decades.

Read original articleLink Icon
Rails Is Good Enough

Onur Ozer reflects on the enduring relevance of Ruby on Rails, noting its continued use by both startups and large tech companies two decades after its inception. He recounts his personal experience of learning programming later in life and choosing Rails for building a SaaS application, contrasting it with his initial attempt using React, which he found overly complex due to the fragmented JavaScript ecosystem. Ozer appreciates Rails for its monolithic structure, which provides essential features out of the box, allowing developers to focus on building their business rather than solving unnecessary problems. He highlights Rails' maturity, as it has established conventions for important tasks like authentication, making it easier for developers to collaborate and onboard new team members. Ozer also emphasizes the productivity of Rails, suggesting that it attracts developers who prioritize building over debating technology. He concludes that while Rails has a steep learning curve and can be frustrating at times, it is sufficient for the majority of modern web applications, celebrating its ability to simplify the technical aspects of business development. Ozer marks the 20th anniversary of Rails, acknowledging its battle-tested nature and the peace of mind it offers developers.

Link Icon 18 comments
By @pdpi - 5 months
> Yes, the learning curve can be steep, and the “magic” can sometimes be frustrating.

This is possibly the absolute worst combination of factors possible. The learning curve makes it bad to ramp up with, and the magic makes it bad in the long term.

It's a framework that wants to be used for monoliths, and tooling is essential to manage the complexity of large monoliths, but you're stuck with a language that's extremely hostile to tooling, using patterns that make it even more hostile to tooling.

So, really, what you're left with is a framework that's only actually good for the early-mid stages of a project, and only if you're an existing Rails user who doesn't have to pay the ramp up price.

By @retrac98 - 5 months
I’m currently building a new product with Rails in 2024.

It just feels so much more productive than anything else I’ve ever worked with.

By @fny - 5 months
I love Rails and Ruby and miss the ecosystem dearly, but the joy dies once you find yourself lost in layers of code without any types or IDE support. This is especially true on large teams.

So what are your options... Sorbet? Does this feel like Ruby?

    sig do
      params(x: Integer)
      .returns(String)
    end
How about RBS? Does writing the equivalent of header files for every function and class feel like Ruby?

So unfortunately I'm no longer an evangelist or practitioner.

By @drchopchop - 5 months
Rails may indeed be good enough, but comparing a full-stack platform (Rails) to a frontend UX framework (React) is fundamentally unfair.
By @radicalexponent - 5 months
One of Rails most under appreciated features is testing. Basically everything you can do in Rails has a way to write an automated test for it. Having good tests is a way to keep momentum as the project grows in complexity.

I love Rails. Every investment I've made in learning it has yielded returns for years. Everytime I learn a new JS framework, its obsolete two years later.

By @karmakaze - 5 months
Ruby/Rails with static type checking is a mediocre experience. I would say it's good enough when starting out, even great. But once you have many teams working on it, you wish for better language strictness, to do safe and widespread refactoring for instance.

ActiveRecord has many limitations when trying to get efficiency from infrastructure (either because you've grown/scaled, or to minimize costs while growing). The main problem is with model instances having actions attached to them, you have to make and jump through hoops to batch the individual callbacks.

Working on a performance improvement project, we discovered that doing ModelClass.new (not doing any I/O and even if that class is empty with no callbacks) is about 400x slower than doing MyClass.new for a plain Ruby class that holds a table's attributes. Processing a thousand of these things in a request with a handful of associated models for each can eat up 100s of ms before doing anything useful.

And even dropping down to using ModelClass.insert_all(array_of_hashes) which bypasses ActiveRecord model instantiation is still slow in the way it generates the SQL before executing it.

You can scale throughput by having many webapp servers (at the cost/constraint of many database connections) but that doesn't help latency per request.

Working at a Rails and MySQL shop is about as close to guaranteed employment as I know as there's always tough problems to solve as a company continues to expand in scope and scale, and always new devs doing their best but still introducing patterns that don't age well.

By @simonw - 5 months
Rails is Boring Technology these days. https://boringtechnology.club/

That's absolutely meant as a compliment!

By @spleen - 5 months
Rails is more than good enough - it is a framework fine tuned for productivity and quick iterations.

However, convention over configuration means quicker delivery for small(er) teams, but more discussions once more opinionated developers join.

By @et-al - 5 months
Tangentially, YC has a Ruby meetup in San Francisco on Aug 13th: https://news.ycombinator.com/item?id=41059148
By @CooCooCaCha - 5 months
I honestly hate rails.

1. Code is loaded automatically and globally. I’ve had weird bugs caused by someone creating a function with the same name in a completely different file.

2. The module system is strange. Why do my file names and class names need to match? Why can’t i just import the files i want like other languages?

3. Includes (aka mixins) are a bad idea. See below.

4. Many of the language features are designed to hide how code works. Quite often i wonder to myself “where does this variable/function come from?” #1 is also a good example of this.

5. Coming from a typed language, the lack of types makes me feel naked and more prone to screw something up.

6. The strange and elitist opinions of ruby fanboys. Sorry but code terseness is not a panacea and “unless” is terrible. It seems like code readability and understandability are less important to this crowd.

By @jaeming - 5 months
One of the biggest issues we have with Rails these days is finding Rails devs (at least where I work). Our next project's backend may very well have to be Node or Python specifically for this reason.
By @sastraxi - 5 months
Can anyone recommend a guide for full stack devs that have mastered other stacks (e.g. django) and want to learn how to use rails correctly?
By @Iuz - 5 months
I can say the same things about django.
By @TehShrike - 5 months
I find that most developers' "good enough" is very poor
By @popcalc - 5 months
Dotnet MVC is better.