Live data from Hacker News

Ruby on Rails: The Documentary [video]

youtube.com

201–210 of 248 posts

Re: Ruby on Rails: The Documentary [video]

#201

Earlier quoted context omitted.

I am convinced this is a major contributor to why so many Rails apps turn into an unmaintainable mess over years. I have two easy answers to why Rails apps turn into messes. 1. Any non-trivial app in any non-trivial language/framework usually becomes a mess eventually, given enough commits and developers 2. Rails (specifically, ActiveRecord) won't stop you from creating circular dependencies between models. This is e…

> You're right of course: that's a one-time cost. I disagree. This presumes that there's some initial "onboarding" process, and that once that's done you just now will know the structure of the app for all future, never spending more effort on it. That's only true for trivial apps. What actually happens in bigger codebases is after you stop working in some section of the code for a few weeks, it falls back out of you…

I realize my post was overlong, but I assure you it explicitly agrees with what you just typed.

I need to be more concise.

Re: Ruby on Rails: The Documentary [video]

#202

Earlier quoted context omitted.

Interestingly, for me it is the exact opposite, I tried Django/Python and it's more difficult for me to grok. Somehow I just find Rails easier and more straightforward.

I think its bc I just know python better. When I look at ruby code, especially with symbols, I can't really tell what's going on the same way I can with python. I get the impression python is more simple while ruby is more powerful (featurefull) + more object oriented.

Yeah, probably. I just moved from Ruby to Python and I'm not exactly loving Python. But, I'm quite sure it's just that I'm not used to Python yet.

I think one thing is true -- Ruby gives you lots of different ways to do things. And it can be really terse sometimes, if you want it to be. Some Ruby devs IMO should learn to favor readability over terseness.

Overall though, Ruby is my favorite language and IMO can be very beautiful. I don't think anybody would call Python beautiful. (Lots of great things about it though, nice language and ecosystem... no hate)

Re: Ruby on Rails: The Documentary [video]

#203
post #186

Earlier quoted context omitted.

You said it's objectively very slow. My question is relevant because your point begs the question: Slow compared to what? If you want to give an honest apples to apples comparison then, okay fine, what framework that does everything that rails does is considerably faster? Is a Ferarri faster than a dump truck? Sure, but they have different uses. Try hauling gravel with a Ferrari. For the class that Rails is in, there…

Ruby/Rails is not great for efficiently transforming megabyte sized blocks of JSON into differently structured megabyte sized blocks of JSON, just to give you one example. Golang/Rust/Java is better suited to that. Other use cases are for example any ML-Workloads where Python's ecosystem is much superior to Ruby's. That being said, you missed my original point, which is that there are problems where you don't really…

Obviously not every took if right for every job. But your claims that Rails is slow because for what it does there are not many good replacements. Go is a language not a framework.

Re: Ruby on Rails: The Documentary [video]

#204
post #194

Earlier quoted context omitted.

All of that stuff can be easily added using 3rd party packages, just like Laravel, Rails, Django, etc all have userland addons. https://packages.adonisjs.com

I didn't know about these packages. But still, nothing really that improves rendering. https://packages.adonisjs.com/?category=Rendering And the fact that these aren't official is kind of the point I've been making. In the JS world there isn't a holistic fullstack framework. You have to stitch it all up yourself. In Adonis, Express, Fastify, Next, SvelteKit, etc.

> But still, nothing really that improves rendering.

Because most people are content with using Adonis' Edge templating with something like Alpine for sprinkling in interactivity, or using Vue.

> In the JS world there isn't a holistic fullstack framework.

This is true for all monolithic frameworks in every other language. Even Rails you have to use 3rd party addons for stuff. It's not feasible to build everything in for every possible use case, so they make it easy to add on stuff.

I think now you're just starting to move the goalposts.

Re: Ruby on Rails: The Documentary [video]

#205

Earlier quoted context omitted.

True, nodejs really doesn't have _the_ framework. Python had flask, php is WordPress and RoR. Why is that? Especially since most of the new frameworks copy the ideas of existing frameworks. P.S. Perhaps because a JS framework based off the ideas of rails would be called jails! /s

Despite what others will say here, it actually is Next.js. People don't agree with parts of the stack (just as C#/Java people didn't agree with what Rails was doing in 2005), or point out projects with the equivalent mindshare of Sinatra/Flask like Nuxt and Svelte, but when you look at what company-level projects are majority building with in 2023, it's Next.js. https://insights.stackoverflow.com/trends?tags=next.js%…

How do we know it's not Django/React?(not sarcasm; trying to learn) Adding those two to your link shows them on similar "these increase as rails decreases" correlations, with more area under curve:

https://insights.stackoverflow.com/trends?tags=next.js%2Cnes...

Re: Ruby on Rails: The Documentary [video]

#206

Earlier quoted context omitted.

Could you give an example of how ChatGPT helped you specifically with Rails?

The one that I use it the most for is writing ActiveMigrations while integrating with some of Postgres features. There's a lot of settings that get pass-thru to the DB, but aren't clearly documented. I know it's possible, I just can't remember the syntax. Same thing with some of the more advanced Model relationships. I just don't write _that_ many relationships, so I tend to forget how Rails wants certain things defi…

Wow, thanks. I gotta start checking out how to leverage ChatGPT more.

Re: Ruby on Rails: The Documentary [video]

#207

I had a lot of fun watching this documentary. The one person framework really comes out in the personal story of Toby from Shopify. "From Hello World to IPO". What I also loved is that he mentioned that if you open up any Rails application, it looks basically the same in structure whether it is the biggest Rails app there is or a new one. Sure that can be true for many apps, but in a world of, for example, APIs and f…

So if I have an idea for an online service / app. I can go an make it using Ruby on Rails all on my lonesome? Do I have to deal with JavaScript in any way?

> Do I have to deal with JavaScript in any way?

You can use Hotwire (look at turbo frames and turbo streams) and you will write less Javascript code while achieving some very nice interactive UI.

Re: Ruby on Rails: The Documentary [video]

#208
post #145
post #105

Earlier quoted context omitted.

Not "any" but "most". I've worked for a company whose RoR codebase/structure looked completely different from the usual because they used a Domain Driven Design-inspired architecture.

This is due to a conflict of philosophies within the RoR community. Basically the clean code enthusiasts (which are also more likely to subscribe to DDD) argue that business logic should not be tied to which specific web application framework you use. So it should basically be in a separate codebase, either in the `lib/` directory or literally in a different project and included into your application as a Gem. This m…

I'm struggling / thinking about this myself a lot.

I've learnt a bit of Django's app-centric model (which is similar to rail's "engines")

I work for a company that enforced the data/domain/interface with a plug-in approach to custom code.. and I liked it.

But for my own projects, I get stuck choosing between the two, I see more benefits in the layered approach, but I feel like I'm fighting the tide with every project I start

Re: Ruby on Rails: The Documentary [video]

#210
post #190
post #185

Earlier quoted context omitted.

It's an API gateway converting single digit MB-sized blobs of JSON into similarly sized blobs of JSON with a different structure.

The Rails app I scaled posted half a meg of JSON on every save-request every 10-15 seconds. In Rails, we parsed it, converted some parts into HTML nodes in Nokogiri, sanitized it, and saved it to both mysql and cassandra. It wasn't a problem other than that a better initial design (nothing to do with rails) could have made passing all that data not needed, which was better for mobile. We had about 600,000 customers.

How many requests per second are you talking about roughly? One major problem we face is that downstream services also have performance problems and have multi second response times. While waiting for the response, a whole rails worker is sitting idle, taking up hundreds of megabytes of memory for seconds.
Post reply on HN