Live data from Hacker News

Don't make me think, or why I switched to Rails from JavaScript SPAs

reviewbunny.app

481–490 of 490 posts

Re: Don't make me think, or why I switched to Rails from JavaScript SPAs

#481

Earlier quoted context omitted.

I came here to say that, as someone who's used both Rails and Laravel. Basically it comes down to magical behavior, and the fact that Rails has way too much of it. Syntactic sugar and DSLs are maybe fine for rolling out new projects, but become burdensome on large codebases. I was on a large project and found myself in goto hell where I literally couldn't trace through the code. It was relying on every magic trick in…

So what do you like then?

You know, I wrote up a long response about what strikes me as a good framework, but realized that the core of it is that a conceptually correct approach may not need a framework:

https://sive.rs/pg

Today I mostly write solutions in a synchronous-blocking, functional-reactive, event-driven, immutable, stateless, data-driven, declarative manner that tries to avoid custom types/objects, manually managing nulls or asynchronous behavior. Which if all orchestrated correctly, leads to future-proof code because it's so obvious that it's self-documenting and the failure modes are all safe.

IMHO, the vast majority of software out there involving Javascript, Ruby, Python, really any of the imperative languages, can't achieve what I'm trying to do. It even feels like they actively work against me sometimes. I think of Laravel as getting most of the interfaces and approaches conceptually correct, even if the internals use factories and patterns and hand waving that I consider spaghetti. Whereas Rails involves some element of drinking the kool-aid, because it encourages some conceptually incorrect approaches like ignoring process separation to achieve better performance or fit with some preexisting notion of what's beautiful or easy. Along those lines, probably stuff like Phoenix/Elixer, Erlang, etc are closest to what I'm working towards, but they introduce their own custom syntax that strikes me as perhaps too DSL-like and I have an aversion to that. Which is the main reason why I struggle to learn stuff like Haskell.

There truly are vanishly few actually good solutions today, and I've been following web development for over 25 years now. That used to really get me down. But I realize now that the situation presents an opportunity to fix things and build a better future, which I am grateful for.

Re: Don't make me think, or why I switched to Rails from JavaScript SPAs

#482
post #228

Google searches for React and node.js exceed searches for Ruby on Rails by 100% and 50%, respectively [1]. Some people have used this to argue that React/node are more popular than Rails. But I wonder if perhaps this discrepancy appears in Google Trends because it takes more google searches to accomplish the same thing in React/node versus Rails. I feel the Rails ethos of "convention over configuration" allows me to…

As someone who came from other MVC frameworks outside of Ruby, learning Rails has been a cluster-f of searching through documentation circa 2013. The whole rails “convention over configuration makes it easier” is a load of bologna, because the only way to know the “convention” is to either have gone to a rails boot camp, reading the docs top to bottom, or maybe watching rails casts. The best way to work on rails is t…

So maybe your problem is there is too much documentation that spans too far back and getting current relevant examples and docs is the hard part. The rails guides are kept current, but any popular framework that has been around for a while is going to have a similar problem. Rail's guides are pretty good compared to many others I've seen. Also there are books, courses, video series, and plenty of other resources that are up-to-date. There is no shortage of high quality up-to-date learning content available. It just may take some work to weed out some of the older content.

Re: Don't make me think, or why I switched to Rails from JavaScript SPAs

#483

Earlier quoted context omitted.

There’s nothing more frustrating than debugging some ruby module with 10 different mixins defining functions with generic ungreppable names like “user”. Then it turns out the mixins have mixins. The common refrain is well, don’t write shitty code then, but all code starts off looking good to the person who wrote it. I guarantee if you have 400 engineers working on a Rails app it will end up in this state because it (…

Rubymine's autocomplete got to a state where I barely ever have to grep anything. Look what you're describing can happen, it's just not that often or is the norm. It's usually some crappy legacy project no one wants to upgrade or touch that reaches such a state, there's absolutely no reason why what you described can't be refactored. The fact it isn't being refactored tells you more about the company/teams working on…

Rubymine's autocomplete is the best available but it's pathetic compared to what IntelliJ platform can offer in most languages.

Re: Don't make me think, or why I switched to Rails from JavaScript SPAs

#484

Earlier quoted context omitted.

Rubymine's autocomplete got to a state where I barely ever have to grep anything. Look what you're describing can happen, it's just not that often or is the norm. It's usually some crappy legacy project no one wants to upgrade or touch that reaches such a state, there's absolutely no reason why what you described can't be refactored. The fact it isn't being refactored tells you more about the company/teams working on…

Rubymine's autocomplete is the best available but it's pathetic compared to what IntelliJ platform can offer in most languages.

It's not as good as a typed language but it's pretty good and it will only get better with time.

Re: Don't make me think, or why I switched to Rails from JavaScript SPAs

#485

Earlier quoted context omitted.

If you want typing in Rails, you're in reality itching to try Crystal lang and most likely Amber framework. Much faster too as it's a systems language.

I’m itching to try Crystal, since it has goroutines aka. greenthreads aka. fibers for easy concurrency, static types, automatic null checking, and performance on par with Golang. But Crystal has around 468 open bugs at the time of writing :( https://github.com/crystal-lang/crystal/labels/kind%3Abug Issues are well over 1k…

I did run a startup for a year that was on crystal, and I will say the community is quite good at addressing real bugs. There are a lot of "you don't know what you're doing" bugs and "this is already fixed but you haven't updated" bugs and "this is really a feature request" bugs in the tracker. I wouldn't read into it much. There hardly exists a popular programming language or framework without at least several thousand open issues.

Re: Don't make me think, or why I switched to Rails from JavaScript SPAs

#486

Earlier quoted context omitted.

There are a lot of solutions out there where you can share your datatypes between the client and server now though, and it's great!

This comment would be more helpful with some examples. I’m personally very curious what the leading solutions are. I’ve worked with one involving GraphQL but that’s about it.

https://github.com/OpenAPITools/openapi-generator

Re: Don't make me think, or why I switched to Rails from JavaScript SPAs

#487

Earlier quoted context omitted.

Rubymine's autocomplete is the best available but it's pathetic compared to what IntelliJ platform can offer in most languages.

It's not as good as a typed language but it's pretty good and it will only get better with time.

Even compared to what they offer for PHP or JavaScript it's unimpressive.

Re: Don't make me think, or why I switched to Rails from JavaScript SPAs

#488

Earlier quoted context omitted.

The issue I have with the JS world is that the most used libraries and frameworks are just "good enough for a small project" and no more than that. * Javascript has such a minimal standard library, you will need to get one or three third-party libraries to augment its core. * React is an excellent view library and nothing more. You will need to get one or three third-party system to turn it into a fully fledged web f…

I think Ember was a lot closer to a complete framework. I do believe that that's also why it didn't gain as much popularity. The learning curve was a lot steeper than for React or Angular. You won't run into the problems with the slimmer libraries till later and at that point you understand them and "just" learn the new thing, Redux or wherever you are including now. All along the way it feels smooth, but you end up…

This, 100% this this this this this.

Re: Don't make me think, or why I switched to Rails from JavaScript SPAs

#489
post #466

Google searches for React and node.js exceed searches for Ruby on Rails by 100% and 50%, respectively [1]. Some people have used this to argue that React/node are more popular than Rails. But I wonder if perhaps this discrepancy appears in Google Trends because it takes more google searches to accomplish the same thing in React/node versus Rails. I feel the Rails ethos of "convention over configuration" allows me to…

I doubt this, at least for my country a simple search in LinkedIn of "NodeJS" and "React" have tenfold the results of searching for "Rails" or even "Django". It might be a bubble but basically every new startup and small/midsize company are using NodeJS and even big companies are building new services with it.

At the least, it is a self-reinforcing tragedy. ("Look, all the big players use framework xyz as well, it cannot be that bad then!") JavaScript being thrown at problems, for which it is not so well suited with all its warts. Web developers being thrown at problems, with which they do not have experience, because "Now we can use JS in the backend as well!". In many cases it sets organizations up for getting stuck at local maxima or for straight failure.

Re: Don't make me think, or why I switched to Rails from JavaScript SPAs

#490

Earlier quoted context omitted.

I see no difference. PHP has a billion FWs and a billion more CMSs. Python is the same way. Rails is the only example you give that has merit. I mean PHP is a terrible example. I've been coding PHP since around 2007, PHP has Zend FW, Laravel, Cake, Ignitor, Symphony, Silex... it keeps going and going. All I can see from your comment is some biases against JS. You do you on what you want to learn or use. But its not r…

Laravel is the leading PHP framework by far, I don't think it's up for debate. Ruby also has many frameworks (Padrino, Hanami) but it's obvious Rails is the common choice.

Laravel is as much of a leading framework as React/NextJS are the leading frameworks for JS(next 2.5 million weekly downloads on npm, react 15 million). Its almost a 1:1 comparison. In the same way that I already pointed out JS like php, has a million fw but insiders know what the leading ones are. Everyone knows React is the clear on top winner. NextJS is also a clear on top FW. I dont think its up for debate at this point.
Post reply on HN