Ask HN: Is Ruby on Rails still relevant?
I'm currently going through Destroy All Software's screencasts [0]. They're heavily based on Ruby + Rails and TDD, although most of the concepts probably do do translate to other languages.
Since the screencasts are over 10 years old now, I'm wondering if Ruby on Rails is still going strong. What resources would you recommend to get into Ruby/Rails specifically? Same question for TDD? Thanks!
159 comments
[ 2.2 ms ] story [ 247 ms ] threadAccording to Hired's State of Software engineers 2022, Rails is the 2nd most in demand skill.
https://hired.com/2022-state-of-software-engineers/
At the bottom of the page we get:
Methodology
This report is based on proprietary data gathered and analyzed by Hired’s data science teams. For the purpose of this report, Hired examined software engineering candidate interview requests and salary data from January 2020 through December 2021 inclusive. The data included reflects over 366,000 interactions between companies and software engineering candidates during this time period.
In addition to our proprietary data, we collected survey responses from more than 2,000 software engineers on the Hired marketplace to inform our understanding of software engineers’ working preferences.
Contracted Rails devs are probably working on an enterprise product that is already mature and making money.
All my peers who started their careers with Rails that know it like the back of their hands have zero desire to ever work with it again professionally. They're all exceptional engineers who had no problems picking up/migrating to Scala/Rust without productivity loss.
On the other side, I see all the upcoming engineers that missed the initial Rails popularity wave. To them, Rails is often times much more frustrating than TS/Python offerings. There's very little freely available quality onboarding materials, getting the environment set up is incredibly frustrating with how fickle bundler has become, and deployments are still complicated.
My take is Rails is good for those who already know Rails, since the stability of it lets seasoned Rails developers carry forward all their experience. But for someone without that history, TS/Python frameworks offer a much faster/smoother onboarding process, especially with the massive familiarity advantage devs already have with Python/JS from schooling/web.
If you're going to go out of the way to learn a new language, why would you learn one that occupies the same space as one you already know?
If the above is correct, it presents an interesting question to junior engineers: is it worth it to learn Ruby on Rails as a junior engineer? While there are advantages to learning Rails (it's heavily opinionated, what you learn maps very well to what professional projects look like), there is more job supply in the "python + LeetCode" path (how that relates to competition - who knows).
Even just a "Ruby on Rails Tutorial" search on YouTube will get you going, too, if that's more your thing.
- There's lots of RoR jobs.
- They keep improving it.
- What RoR taught me made me a better architect in every other stack.
I really have to second this point. I'm not 100% sure if DHH was the one who coined the phrase, "Convention over Configuration", but he's the first popular technical communicator who I remember emphasizing it in a clear way. Simply trying to be consistent about naming certain things like models or database tables (singular vs. plural) is a big win for any project. Nobody gets everything right, but RoR is filled with lots of little smart choices like that that are worth considering for your own projects.
If you want to learn Ruby on Rails in 2022 please check https://gorails.com
https://news.ycombinator.com/item?id=5483752
Interesting to compare answers to today.
Its a good point, there are absolutely much more simpler frameworks out there, which are good for your own side projects, your own large projects, and what fun and exciting production companies are using.
So I'd recommend to look for job ads on local platforms and check if companies are looking for rails devs.
Though I would not let that dictate my choice of tools.
However if you want the biggest pool of "talent" and potentially the cheapest "talent" then going with the most popular is probably a good idea
Doesn't mean I'd advocate for the most obscure tech either, but it's all about trade-offs and your situation.
Rails has been around long enough that there's surely no shortage of junior to very very senior engineers that will write code for you from wherever they happen to live.
Also, not that it really matters but I just happen to be a counterpoint to both examples. I'm at home surrounded by hardware for my current work and also wrote / led a remote team instrumental in passing a federal banking audit atop infrastructure as code.
I'm on team sure there's use-cases for local hiring but they're so hard in the minority these days + it's a rails thread that I felt like my stance in my prior comment probably did hold in all cases where that might be the right tool for the job. Like all things though, it depends. :)
But the question is probably around one's personal choices: is this the framework to invest my energy and time? Are there far better frameworks? Where is the market headed?
In the early days of Rails, and indeed any popular framework, the sense we get of an explosive growth. As a result of this there is an imbalance of jobs and developers and jobs seem easy, plentiful and well compensated.
This is really a question of the ratio of dev:positions. Most answers to this tend to focus on the positions component (take a look at stack, or upwork or indeed or whatever!). Perhaps someone on HN will suggest a metric or public gauge for the competition as well.
Edit: added slightly more context
Not that those are reason enough to use it. But I wouldn't call it the wrong decision either.
0 - https://sorbet.org/
If you were to follow in their footsteps, you'd also be picking the top popularity web framework for your time, which as of now is things like Next.js and Django.
Big recent-era startups:
OpenSea (Django / Next.js)
Notion (Node.js)
ScaleAI (Python, Node.js, Next.js)
Substack (Node.js)
Rippling (Django / Next.js)
If you’re face deep in the Ruby ecosystem then I’m sure it makes sense, but trying to build services alongside it is truly awful.
You want a scalable system that’s easy to write and will grow with you? Write basic Go services.
I ask this genuinely as I am interested to see what pain point people have with Rails.
a) they don't like Ruby for whatever reason, b) they probably only deal in backend or only deal in frontend, and so don't understand the value of the bundled dev experience rails delivers, and therefore c) because of a + b they find the moderate learning curve to be extra painful, so they lash out.
at the end of the day it's all just code. why would it be harder to integrate a service in Rails than in Go? of course it isn't.
1. Ruby is a very flexible language, and that has its ups and downs. While it makes it a very pleasurable easily modifiable syntax, it also leaves a lot of room for bad patterns. Ruby won't judge someone for taking an ill-advised approach to a problem, so it's easy for newcomers or novices to lay foundations that cause trouble later on.
2. Ruby is very prominent in startups, which are the companies most interested in immediate results. This often leads to favoring short-term advantages such as getting a feature out today to secure a deal rather than long-term advantages such as taking the time to keep a maintainable code base. Some startups with strict budgets will also hire people with less experience early on, leading this to pair with point 1 more often than we'd like.
That said, I'm a Ruby dev and have no interest in working in any other language (other than JS on the frontend). It's a beautiful tool to those who treat it well and I'll happily use it for just about any project.
If you wrote a system in Go as a monolith, it would be hard to trim down, too. Architecture matters MUCH more than the implementation language.
Ruby/Rails' culture is a huge contributor to why Rails monoliths are so much more difficult to maintain compared to other dynamic languages. Things in Rubyland just love to be global and manipulate things globally and go out of their way to make that behavior hidden.
I question that assertion. I have plenty of anecdotes which are the exact opposite: a Rails monolith is much easier to maintain compared to similar approaches in other languages.
"manipulate things globally"
Not sure what you mean by that to be quite honest. If you mean monkey-patching, that's generally been frowned upon except at the framework-level in the Ruby community for quite a while now.
That makes no sense. It's very easy to build a REST API in Rails in which case you can connect to that API from services written in other languages. Conversely, you can easily call out to other services' APIs from Rails.
In fact, I'll go so far as to say building a few choice services in particularly performant (lower-level) languages alongside a main Rails monolith is the best organizational pattern for larger applications and enterprise deployments. You get all the benefits of Ruby & Rails for most happy paths, as well as the benefits of "This goes to 11!!!" performance for the critical paths which need that.
One year later it was a mess of network calls, no ORMs and nearly-raw queries because who needs an ORM, migrations run by SQL statements on bash scripts because who needs migrations. Validations were custom wrappers on some validation libraries and validation errors were of course not consistent across all of the microservices, not because of lack of agreement, but because new ideas and ways to "do it better" showed up all the time.
Some of these "services" needed translations (for emails, hooks, and some html responses) so a custom "very simple" translation system was invented.
It became an infinite mesh of proxy services on top of proxy services on top of proxy services on top of kubernetes.... and at the end of the day, guess what was paying the bills? guess what still had all the business logic and was the source of truth?
The Rails application.
if just 10% of the effort were put on improving the existing Rails application, all the Go microservices crazynes that was going on at this place would have been avoided.
Do you know why it went everything that way? Because management decided that if they blocked people from using Go then people would leave the company. I was one of the managers there, and pretty opposed to this as you can notice.
But I think this is a huge reality around here. People want to play with new shiny, without even thinking of the drawbacks or if they do have a concurrency or raw cpu performance in their application.
People want to make a CV in what they want to use in their next job. And Rails is not fashionable anymore so "the monolith is bad" and "Go microservices" are good. You're not google 99% of the time.
Thankfully I left all that madness and now I'm in a more sane (although "not so cool" technologically) place where we focus on shipping product and keeping things maintainable, robust and secure.
To go to your bosses and tell them you have to migrate from Ruby to Go to improve productivity is a blatant lie.
But managers/directors, etc aren't idiots. They swallow it and they accept it even if they know the trade offs, because what's not told here is that if management says "No, that's madness" then people quit, and that's worse. So there we go with our super performant microservices for our 10 reqs/s app.
Go has better safeguards to prevent bad dev behavior
There shouldn't be any more tests, you're testing an API either way
We're talking about documenting an architecture, how pieces work together, what tools are available, where to put things, etc. Check the documentation of any major web framework. That's what we're talking about.
Maybe you're doing it wrong?
“Those who cannot remember the past are condemned to repeat it.” – George Santayana, The Life of Reason, 1905.
> if just 10% of the effort were put on improving the existing Rails application, all the Go microservices crazynes that was going on at this place would have been avoided.
https://www.joelonsoftware.com/2000/04/06/things-you-should-...
Gosh I'm old.
What's so easy about Go? I don't get it. Honestly. What's so hard for you to do in Ruby? And who's to say that in 15 years those shiny Go services you're working on won't become shit after dozens of changing devs had their way with them? Turning a codebase into shit takes time.
I've seen great ruby/rails code and I've seen abysmal ruby/rails code. A lot comes down to who wrote it and if they ever refactored the smelly parts.
After 20+ years, I often see that no one likes to refactor the smelly stuff until they're forced to, and we often end up working with a cool racketball of code covered in 2' of duct tape patches.
Go is the new hotness, as was Rails at one point, and in the near future it will be something else. There's a strong neophillic bent to most developers. It's a lot more fun to work in something that's new and evolving and solving crazy problems than something that is stable.
These are all tools in the tool kit. Use what lets you ship.
This is largely the problem, Go enforces good dev behavior, Ruby leaves it up to the dev
When i hear "Rails monolith is a disaster" what it usually boils down to 8 out of 10 times is people putting their business logic inside models or controllers, when really it should live in its own set of classes, usually called services or service objects.
Here's a guide https://codeclimate.com/blog/7-ways-to-decompose-fat-activer...
It is for dark matter developers now, SV dark matter but dark matter.
Look for the job market in your region and field and then address e it for yourself
I think Rails is one of the most productive and capable frameworks for building and evolving CRUD applications, which is the reason it still remains my recommendation for new startups.
It’s a great time to start using Ruby for web projects.
https://octoverse.github.com/#top-languages-over-the-years
It also has a funky syntax, while not a big deal, doesn't do it any favors in a C --> Javascript world. Django, golang, etc. are free. I don't recommend starting new projects in ruby, but as always YMMV.
I had a couple die hard rails members at my last company who claimed nothing was better. We made them write Go for a year and now they are die hard Go fans.
If I were writing a web app I would start with Go. It’s a great language that’s easy to learn and fast to write, with all the security of static compilation. It scales exceptionally well with large teams
Go and RoR couldn't be more dissimilar from each other. One is a relatively slow language with one of the most full-featured and robust frameworks available today, and one is a very fast language with relatively minimal tools for building web applications. The types of projects they're suitable for are completely different
I have found that people from the world of Java and similar c-style syntaxes, and especially strongly typed languages, have a sort of allergic reaction to Ruby. The reverse is also often true.
This is a matter of personal preference that actually tells nothing about what any of those languages might be good for.
Ruby/rails is less popular than it once was but it's still pretty popular. It's worth considering if you are open to the style of programming it uses. But if you love the c-style syntax, yes, you'll have problems getting used to Ruby and should try something else.
The heyday of "SPA is the right approach for everything" feels like it peaked at least a few years ago.