Comment by noobermin

1 year ago

People just don't talk about Ruby anymore. For those who don't do webdev, has it just stabilised and people take it for granted now, or was it always hype and people have long since moved on?

I've worked on many Rails apps that are still out there in critical spots. My gut feel is it has stabilized. The hype was well-founded; it allows dev velocity that I still haven't seen in any other environment.

I once worked on the integration of an existing Rails app into an existing C# webapp (both living side-by-side, kind of a split-application thing, but seamless to the end user). It was almost hilarious how many LOC the C# teams (!) were having to write for every LOC I (alone) was writing in Rails. Looking through their diffs, it seemed like they were reinventing fire compared to me writing `render :success if SomeModel.update(model_params)`.

  • It speaks more about the unfortunate state of practice in the team in question. C# itself is of similar terseness when compared to Ruby, with 10x to 20x better performance so even when written in a bulkier way, it becomes less relevant as you are not going to hold, say, C or C++ against similar criticism in such context. Oh, also no method not found thing too. C# has much greater likelihood of not having defects when you do deploy it.

    • > C# itself is of similar terseness when compared to Ruby, with 10x to 20x better performance so even when written in a bulkier way

      More like 50-100x.

      1 reply →

    • No question; I can write far more performant C# code than I can Ruby.

      For this set of teams, at least, their code wasn’t very performant because it took 3 months to get from Jira ticket to production. They were always getting themselves tied into knots about how to handle rollbacks across their nine microservices required to change a birthday.

      Meanwhile, I’m in my corner with my nice little monolith that could read data from their database easier than they could read it.

      1 reply →

Rails usage is certainly dropping off a bit. The competition is improving.

I personally got tired of the monkey patching, ActiveRecord's proclivity towards n+1 queries, and complete lack of types / static analysis, among other things. Having to keep a mental model of the types of the entire project, and having to write tests around types takes up a significant amount of my headspace, energy, and time. The older a project gets, the more of a headache these things become. There is an element of "just write better code" to avoid these pitfalls, and that works to an extent, but the older I get the more I realize that the tooling does play a large role in the outcome.

  • I'm firmly in the static typing camp myself, but at the same time I think it's good that there's still a language that is unabashedly dynamically typed. Looking at Python, when you take a language that was originally designed around dynamic typing and then bolt static typing on top, the result is just awkward all around, and ends up being the worst of both worlds.

  • > "just write better code" to avoid these pitfalls

    A lot of issues in and with Rails code leans heavily on this idea. It often comes in other flavors like "You can write rails apps that perform really well" or "Its perfectly doable to write a clean easy maintainable codebase in rails".

    And is apparent in the "Provide sharp knives" doctrine as "And by capable, I mean knowledgeable enough to know when and how, accordingly to their context, they should use the different and sometimes dangerous tools in the drawers."

    I really dislike this approach. I don't want something that is full of foot-guns and therefore requires me to recognise them when I lack all information to do so.

    I've written terrible Rails apps, exactly because it allowed me to so, and I didn't know they would become terrible, until they were. I now recognise the (design) patterns that are foot-guns, I now know the tell-tales that show me where the sharp knives are dangerously placed. But then I get dropped into a Rails codebase that has seen 20+ developers coming and going over a decade, as the 21st developer, and I see it filled with these footguns and dangerously wielded "sharp knives". Often there's a lot of history apparent from these previous devs who saw this too and fixed some of it. But the overall state is still abysmal.

    Sure, it's all these devs that made it abysmal. But the ecosystem, the framework and the language allowed, and sometimes even encouraged them to make it that.

  • The N+1 queries issue has been addressed in the latest ActiveRecord versions. If there's an N+1, you can set ActiveRecord to raise an error instead of making the N+1 query. Bullet gem, for years now, has also been able to catch the N+1 queries and let you choose how you want to act upon that.

    It's true that monkey patching is a problem. I hear you. It's more and more problem of the past though. People realized it's too sharp of a knife and stopped doing that.

  • Rails has strict_loading now which eliminates the n+1 issue. Which kinda supports your position that tooling plays a large role. I was always very aware of the issue but framework support makes it 10x easier

Both Ruby and Rails have continued to improve year over year and are better today than they have ever been.

Still a bunch of stuff that runs on ruby that isn't webdev, https://github.com/theforeman/foreman is a big one I can think of. Ruby's quite nice for sysadmin tasks, puppet, chef etc all in ruby iirc.

  • I've built a lot of niche applications in Ruby, but a few years ago I switched most of my toy programs to python, because it's easier to find other devs who can meaningfully contribute if I write in python.

    At work I have been using Ruby for longer than rails has existed. In those days there were lots of neat uses for Ruby (one of the most interesting being at NASA), but none of us knew if it would ever catch on. We didn't care -- Ruby made programming _fun_, and we were happy to use it even if no one else ever did.

    It was partly the language that made Ruby fun but also the community. And it's out of this community that projects like chef, puppet, shoes, etc. were born. Matz has called Ruby human- oriented programming, and I can think of like that is human- oriented than community.

    • Completely agree and yes, Python (and Typescript) get called on more in my current role too, for the same reasons. It's a shame as I really do love Ruby.

People never fully adopted Ruby for Ruby sake.

People adopted Ruby because of Rails.

Another more adopted Ruby software are probably fluentD and maybe Jekyll. The rest kind of comes and goes.

Majority sys-admin toolings have always been dominated by Python and with k8s hype, some of the toolings have been geared towards k8s automation written in Golang.

In general, sys-admin toolings are a mixed bunch: perl, shell, python, ruby

Rails went through a down period 2014-2020 due to several reasons:

1. React burst on the scene in 2014

2. the hyperscale FANG companies were dominating the architecture meta with microservices, tooling etc, which worked for them at 500+ engineers, but made no sense for smaller companies.

3. there was a growing perception that "Rails doesn't scale" as selection bias kicked in - companies that successfully used rails to grow their companies, then were big enough to justify migrating off to microservices, or whatever.

4. Basecamp got caught up in the DEI battles and got a ton of bad press at the height of it.

5. Ruby was legitimately seen as slow.

The big companies that stuck with Rails (GH, Shopify, Gitlab, etc, etc) did a ton of work to fix Ruby perf, and it shows. Shopify in particular deserves an enormous amount of credit for keeping Ruby and Rails going. Their continued existence proves that Rails does, in fact, scale.

Also the meta - tech-architecture and otherwise - seems to be turning back to DHH's favor, make of that what you will.

  • The RoR hype started to wane long before React. You're really missing a huge part of our industry:

    - While most 2nd or 3rd tier tech companies don't need Google scale infrastructure, SOA in Java/C# and then Go is incredibly prevalent. Many teams never had a reason to even look at RoR and its considerably worse language and runtime.

    - Good ideas from RoR were copied by pretty much every ecosystem; again, most people never wanted Ruby in the first place.

    - Plenty of small web shops simply stuck to PHP.

  • >which worked for them at 500+ engineers, but made no sense for smaller companies

    The number of hi-tech companies that grew from 37signals size to Uber size have also increased due to various reasons: SaaS becoming more and more accepted, WallStreet loves SaaS, and in general just more investment money in the market.

Speaking from my own experience at work, for non-webdev, if the project is something I'll want to share with other people, there is a great incentive in just using Python. I can't seem to get people to be interested at all in my tools if they're in Ruby. When I write stuff in Python, people naturally read, use and contribute.

I'd argue that newer frameworks offer lot more (and are lot more complicated) than people imagine them to be.

The other day, I was exploring Next.js and the number of features, possibilities were astonishing to me as someone that's pretty anti React. I do Svelte[kit] but it isn't there at all where NextJS is especially when paired with Drizzle and auth.js topped with Shadcn/Material UI/Ant Design, a skilled craftsman can crank out apps as fast as it would be for a Rails developer if not any faster.

Unfortunately, the cognitive load that comes in JS ecosystem is mainly at three levels:

- Understanding the packaging (npm, node_modues, CJS/MJS)

- Understanding the bundlers (webpack/vite/Rollup)

- Understanding the transpilers (Typescript, Babel, Less and Tailwind lately)

EDIT: Typos

It's stable and mature.

Maybe you don't hear the constant clickity-clack of endless change as a result. Also true that Ruby's most popular in writing web apps and services, where it and Rails continue to shine.

webdev FWIW is a ginormous part of this little internet thing. You know, those Web-based applications and services that run the entire global economy and human society, such as it is.

It's a demographics kind of thing. People simply got older. I'm too old for it, actually. Java was being hyped before Ruby caught on (which is around the time Rails became a thing). So that's what I was focusing on at the time.

Both languages emerged in the early to mid nineties (together with Python and a few other things). But Rails was much later than that. Now the demographic of the typical Ruby/Rails developer that got into Ruby about 20 years ago straight out of college is a forty something. Still relevant but a clear minority relative to the mass of developers that came after that grew up on things like Go, Rust, Node.js, etc. And of course Python made a comeback because of AI. So, you now see a lot of relatively young people doing a lot of stuff in Python that wouldn't typically be exposed to any Ruby.

I always looked at python and ruby as similarly capable scripting languages. With python a bit more oriented towards people who were simply looking to get shit done perhaps and ruby more geared towards computer science types obsessing about things like meta programming. A lot of that crowd moved on to other languages.

Ruby so far hasn't had a comeback movement like Python. Lots of people still use it of course but it's not an obvious choice to people that haven't used it before. All the AI stuff sort of flew by it. People do a lot of stuff client side these days which makes view oriented frameworks like Rails less relevant. Though with the server side rendering come back there is still some relevance of course. But that's more of a performance optimization that came out of the node.js community. And of course Rails inspired a lot of other frameworks for different languages so its unique selling point kind of went away.