Ruby on Rails Opinião

My journey from frustration with the JavaScript stack to finding joy in Ruby on Rails

28 Dec 2022

As a beginner developer, I understand how frustrating it can be to work with the JavaScript stack. It can feel overwhelming, especially with the abundance of frameworks and tools available. While this can contribute to the feeling of exhaustion, I believe the main cause is the widespread popularity of JavaScript.

This popularity can be exciting for those who are already familiar with programming and enjoy experimenting with new tools. Are you unhappy with React? Maybe you should try Vue? Too complex? Go with Svelte. Is Webpack taking too long? Give esbuild or Vite a try. Not satisfied? Now you have Turbopack. And what about betting on the best runtime? Node? Nah, you should learn Deno; it's much better.

However, if you're just starting out as a developer, it can be nearly impossible to build a complete project with what you learn. You'll have to stack layers upon layers to create a full-stack project. Learn React and build a site. Cool. Does it need to be even better? Build with Next.js. But where is the database now? Try Prisma. Or you could build with Vite. Or Angular. Or Nuxt. Nast. Nist. Nost...

I really understand the appeal of that scenario. It's a good dose of adrenaline to think that you are participating in the construction of the best tool for software development. While it's true that you can ignore this rush of new technologies and focus only on React and Node, it's very easy to get caught up in the excitement of trying out the latest and greatest tool. In my previous job, there were projects in Angular, Vue, React, and Next. I couldn't escape this reality.

It's not comparable to boring Ruby on Rails. And that's why I decided to give Rails a chance, and I've been much happier with my learning journey since. I understand that it might not be for everyone, but I do think it's worth considering as an alternative for the following reasons:

1) You don't need to make so many decisions

One of the challenges of working with the JavaScript stack is the numerous decisions that must be made early on in the development process. After learning the basics, you have to choose between three popular frameworks: React, Vue, and Angular. However, this is not enough for a full-stack project. You also need to decide on a backend solution, such as Firebase or a CMS that generates a simple backend. If you choose to stick with JavaScript, you also need to select a backend framework.

How many frameworks are out there?

In contrast, Ruby on Rails provides everything you need to build a project from top to bottom, with a robust backend and database, as well as a good frontend. Rails follows the philosophy of "convention over configuration", which means that certain decisions are made for you, making it easier for beginners to focus on learning and ideas rather than spending a lot of time researching and choosing between different options.

2) Don't feel like you need to be a generalist too soon

The first mission of someone who is learning is to be great at one thing. With JavaScript, we tend to jump at the idea of being good at a lot of things: learning a lot of frameworks, being good at TypeScript, trying several databases... This is not to say that we shouldn't experiment with different technologies, but the best path is to excel at one thing and then branch out into others.

Ruby on Rails is great for this mission. With the path clear to learn, I can now focus on architectural solutions, design patterns, learn better how databases work, and turn ideas into reality, which will be helpful in the future.

3) The philosophy of developer happiness is not rhetoric

Ruby on Rails has a strange philosophy that, to be honest, I laughed at at first. It's the philosophy of giving happiness to the developer. It's a genuine commitment to making the experience of coding simpler, enjoyable and straightforward as possible. For example, Ruby and Rails are designed to be easy to read and understand, with syntax that closely resembles plain English. This makes it easier for developers to quickly grasp the meaning of code and make changes with minimal effort.

Additionally, Ruby and Rails includes a number of convenient features that enhance the developer experience. A classical example is the #times method, which allows you to iterate a block of code a specific number of times. For example, you could use the code 10.times { p 'Hello, World!' } to print the phrase "Hello, World!" 10 times.

This philosophy of developer happiness is reflected in the Ruby community as well. It is known for being welcoming, supportive, and relaxed, with many members showing off their hobbies and personal lives in their profiles. It's not uncommon to see Ruby gurus posting photos of their children or their latest fishing trip. It's this sense of community and personal connection that makes the Ruby ecosystem such a happy and enjoyable place to be.

4) You will learn from the best

As Linus Torvarlds once said: 'Ruby people, strange people'. They're really strange, and they are really good. Ruby on Rails is no longer the same as it was. The hype that the JavaScript community has today, Rails had not so long ago. The people who came for the hype only already left, and the human capital that stayed is extremmely competent.

In the JavaScript world there are a lot of newbies teaching. And while this is great, because nothing is better for learn than teaching (that's why I have this blog), the odds of learning the wrong way increase. Sometimes I think that being around such strange and skilled people forces me to be my better version.

5) It's tedious

That is why the innovative and crazy people have left the Ruby on Rails community. Many argue that Rails has better development solutions, but it hasn't done anything revolutionary in years. With a situation like this, newcomers can rest assured that what they are learning today will not be altered in the next version of the framework. The most innovative aspect of Rails recently is Hotwire, which promises to eliminate the mess of heavy JS frameworks for the frontend, but in general, people are looking for a better solution in the JavaScript stack itself (Svelte, Solid, etc.), not elsewhere (Phoenix and Laravel are trying too).

E, claro, não acredite que "Ruby on Rails está morto". Muitas empresas novas e grandes usam Rails.

6) You have a time-saver architecture

Ruby on Rails is battery-included and uses the MVC architecture. While that may be a limitation for experienced developers, it was a lifesaver for me at the start of my learning. This pattern makes a path for the request and response of a client-server approach. I finally understand where things started and where they end. Also, you don't have to be concerned about putting things in the wrong folders or not knowing where that file will fit. Rails provide you with a set of rules for this, and while you can break them in the future, it's a good starting point.

7) There is less competition for the first job*

However, there are fewer jobs available. But in the JavaScript world, I always found myself competing with hundreds or even thousands of people. In Ruby, that number is significantly smaller, and if you trust in your abilities it is much easier to stand out. Of course, there is a serious problem in the dev market in general regarding junior hiring. This was even more difficult for me in Rails because there were fewer companies with the structure to welcome junior developers. But once you overcome this, it's a wonderful place to create a career.

These are the reasons I believe that Ruby on Rails is a better place for beginners. One counterargument I heard early on and regret listening to is that Ruby on Rails is full of "magic" and you won't learn how things REALLY work. That is not correct. Yes, there is a lot of magic, but in general, these are things that a beginner should not worry about now, and you will be so comfortable with Ruby that you will learn how things work behind the scenes for pleasure, not "obligation." Building should be a joy, not a torture, and Rails is the best place for someone who believes the same.

Sign up for my newsletter

Whenever I have updates here I will send it to subscribers.

Join the conversation

I created a post on LinkedIn for comments: