Live data from Hacker News

Choosing Ruby on Rails for web development project in 2019

ideamotive.co

41–50 of 216 posts

Re: Choosing Ruby on Rails for web development project in 2019

#41

Among my peers (undergrads in college) Rails has largely lost mindshare to python and Node (and even PHP!). At the 3 hackathons I went to this semester I could not find a single other person who knew Rails (so I always have to switch to node or python). If you take a look at devpost, Rails is increasingly losing popularity: https://devpost.com/software/built-with/ruby-on-rails My plea to the Rails community and Rails…

> I've seriously seen people who have difficulty understanding a for loop that know how to use react at a basic level.

Is that really what you want? That sounds like a ticket for short-term gains and long-term pains.

Re: Choosing Ruby on Rails for web development project in 2019

#42
I had the opportunity to run some hackatons / startup coaching last year with some CS student at University of Wisconsin- Madison. I spoke in front of some large lectures and asked students what languages they were learning.

Literally no one out of a few hundred students was learning ruby. Go/nodejs/etherium is what people were putting their energy into.

Re: Choosing Ruby on Rails for web development project in 2019

#43

Among my peers (undergrads in college) Rails has largely lost mindshare to python and Node (and even PHP!). At the 3 hackathons I went to this semester I could not find a single other person who knew Rails (so I always have to switch to node or python). If you take a look at devpost, Rails is increasingly losing popularity: https://devpost.com/software/built-with/ruby-on-rails My plea to the Rails community and Rails…

I would say that Rails has fully embraced SPAs as an option. With Webpacker you can have React or Vue installed by default. That being said, at one point we decided to start using React to handle the front end of our Rails app and it has become a huge regret.

Recently we decided to switch back to using Rails + Turbolinks + Stimulus.js and the development speed and experience have been so much better.

It's disheartening to hear so few young people are using Rails. In my 10+ years experience, I always get drawn in by the new hot thing but always end up finding my way back to Rails for the better.

Re: Choosing Ruby on Rails for web development project in 2019

#44
post #26

Earlier quoted context omitted.

I was listening to a recent interview with DHH and he makes a great point that Rails and Ruby are about optimizing for developer happiness and dev speed. Computing power keeps becoming cheaper and ruby keeps getting faster but developer's salaries continue to be the number one cost for software companies.

100% agree. Developer happiness, conceptual compression is another important concept that DHH likes to talk about. If there's a hard topic that devs need to understand sometimes, Rails makes it a point to guarantee that devs don't need to understand all those things all the time. Conceptual compression means that you can unpack those ideas and work with them when you need them, or pack them back up and don't pay atte…

Just a disclaimer, I work with Rails every day, but I don't really like it all that much and I really don't like ActiveRecord. We have Rails legacy apps and I maintain one of them. I'd still use Rails for some things, but it I'm pretty picky about what I think it's good for.

Having said that, it makes me a bit sad that there are quite a few developers who actively avoid SQL. Granted the syntax is absolutely awful, but it is a very useful and powerful language. The concepts behind relational databases are embraced by SQL in ways that I can't imagine in any other language (I'm sure there must be other good relational query languages somewhere, but I've never been exposed to them). Honestly, if I have developers working with a relational DB doing anything even a little bit complex I want them to not not think twice or even flinch to use or read it (and I say that not really being all that accomplished with the language myself).

Rails has some good niches where it is very well suited. ActiveRecord is OK if you have a very particular data model. However, as they say, if a hammer is your only tool, every problem starts to look like a nail. You may find that if you approach the problem differently, you will find reasons why people choose not to use very simplified ORMs.

Re: Choosing Ruby on Rails for web development project in 2019

#45
Ruby/Rails backend with a React FE seems to be pretty popular these days, and is where I spend most of my time, but honestly I'd rather go back to Rails views with Stimulus for some of the components that need it.

3 years ago we were breaking monoliths into microservices, now it seems that we overshot that, and I'm much more likely to see people sticking with one main monolith, and maybe one or two other services. Similarly, I'm much more likely to see people choosing NOT to use JS frameworks these days than use them.

Re: Choosing Ruby on Rails for web development project in 2019

#46
post #43

Among my peers (undergrads in college) Rails has largely lost mindshare to python and Node (and even PHP!). At the 3 hackathons I went to this semester I could not find a single other person who knew Rails (so I always have to switch to node or python). If you take a look at devpost, Rails is increasingly losing popularity: https://devpost.com/software/built-with/ruby-on-rails My plea to the Rails community and Rails…

I would say that Rails has fully embraced SPAs as an option. With Webpacker you can have React or Vue installed by default. That being said, at one point we decided to start using React to handle the front end of our Rails app and it has become a huge regret. Recently we decided to switch back to using Rails + Turbolinks + Stimulus.js and the development speed and experience have been so much better. It's dishearteni…

I hadn't done rails in a while when I brushed up on it, and found Turbolinks to be a game changing addition.

SPA's just require way too much work and fine-grained detail for starter applications. I would not recommend to do full-stack node over rails if you care about iteration speed early on.

Re: Choosing Ruby on Rails for web development project in 2019

#47

Earlier quoted context omitted.

Rails is slow. Ruby isn’t slow. Ruby has the same thing that every other language has, call outs to C code under the hood for most of the real work. What makes Rails slow is the process around so much object creation and destruction, but this is exclusive to Rails itself. You put a Sidekiq worker up against a Go worker for some background processing and the performance is comparable.

When Rails came out, Ruby was the slowest language by far because its interpreter literally just walked an AST. No intermediate byte code, no VM, it just eval'd an AST. This reputation stuck longer though, although yeah I imagine Ruby is still slower than Python and Node even now despite having a VM.

When the JIT really gets rolling mainstream, it could help quite a bit. Performance (3x over v2) is a primary goal of Ruby 3.

https://developers.redhat.com/blog/2018/03/22/ruby-3x3-perfo...

Re: Choosing Ruby on Rails for web development project in 2019

#48

Earlier quoted context omitted.

Rails is slow. Ruby isn’t slow. Ruby has the same thing that every other language has, call outs to C code under the hood for most of the real work. What makes Rails slow is the process around so much object creation and destruction, but this is exclusive to Rails itself. You put a Sidekiq worker up against a Go worker for some background processing and the performance is comparable.

When Rails came out, Ruby was the slowest language by far because its interpreter literally just walked an AST. No intermediate byte code, no VM, it just eval'd an AST. This reputation stuck longer though, although yeah I imagine Ruby is still slower than Python and Node even now despite having a VM.

Current stable version Ruby 2.6.2 with --jit is actually faster than Python 3 according to this: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Re: Choosing Ruby on Rails for web development project in 2019

#49
post #12

Earlier quoted context omitted.

Ruby 3x3 is a thing (make Ruby 3.0, 3x faster), and Ruby 2.6 is said to include an optional JIT compilation mode. I haven't seen any benchmarks or analysis that say JIT is ready for production use, but indications are strong that the next version of Ruby will include a lot of surprising things, like maybe a type system? Ruby got a reputation for being slow very early on, and my understanding is a lot of that was due…

> Ruby 2.6 is said to include an optional JIT compilation mode You make it sound like an unconfirmed rumour? It's there in the release.

With the amount of object allocation in standard Rails behavior, it seems to currently perform worse in most applications. But it's a stepping stone for the future. Basically, it's there - but few/no people are using it.

Re: Choosing Ruby on Rails for web development project in 2019

#50

Rails is ideal for the "Get Shit Done" approach to development. However, Ruby's type system does not provide many assurances, making mature codebases harder to maintain, refactor, and extend (as compared to codebases in, say, well-written Java). I am surprised this was not listed as one of the criticisms. Sorbet, a type checker for Ruby, stands to make this criticism less valid: https://sorbet.org/

I have to be honest, I don't understand why people care so much about typed languages.

I almost never face type related issues, and when they occur they are the easiest to catch.

Post reply on HN