Recent submissions

Comment · 1 year ago
But what do you mean, give me a real example. You loaded too many active_records in memory and it's using a ton of ram? Did you try pluck, batches or even skipping active_record and using a raw query?

Unless you really need to scale for a ton of users, you don't have to go crazy to get decent performances out of rails/ruby. How many requests/sec are we even talking about here?

Comment · 1 year ago
Doesn't matter if SQLite is now viable with rails, no legacy rails app is using it and it's not like you're going to wake up one morning and migrate your production db from postgres, mysql, sql server or oracle just because you felt like it.

In theory the language is slow, in practice it doesn't really matter because the db is much slower unless you're github or twitter and you really need to scale.

When you choose ruby, you trade faster dev time for slower runtime. I am OK with this trade-off 99% of the time. My dev time costs way more than a couple ms lost on my production server.

Comment · 1 year ago
There are plenty of businesses that have under 10k users and can live perfectly well with http requests around 500-1000 ms. When there are performance issues, 95% of the times they come from the database, not the language.
Comment · 1 year ago
Modules (mixins) are objects, classes are also objects (of type Class).

The Kernel module is included in the Object class, which means its methods are available to every Ruby object and can be accessed from virtually any scope, including the top-level (global) context where self is an instance of Object called "main."

Comment · 2 years ago
I haven't talked to him in years.
Comment · 2 years ago
I think you're unto something. Totally anecdotal, but my father owns around ~10 houses and small apartment buildings in Canada. I think he managed to acquire them all through mortgage refinancing or something like that I really have no idea. He rents the properties to people.

Even though he's a hard worker, he has a normal 9-5 job and his income is pretty standard for a salaried worker. Knowing him, I'm sure he didn't come up with the idea himself, so I bet this is a relatively common thing to do for mid to high income baby-boomers.

I could be totally off base here, but I can see that if most people have the leverage to own 10 houses in Canada through some financial instruments with the banks this could lead to a housing bubble.

Comment · 2 years ago
For what use-case? Because I've been developing in ruby for over 10 years now and it has been the optimal choice for a ton of companies I've worked for. The lack of static typing is a feature for a lot of people.
Comment · 3 years ago
Comment · 3 years ago
Comment · 3 years ago
The problem with this argument is that it's implying that there is no such thing as clear code. Sure some people think their code is clear when it is not, but that shouldn't stop you from striving to write clearer code.

A long time ago, I had a tendency to write comments to explain code that could be simplified. Refactoring it usually made the comments redundant.

Comments are still very useful when the why is unclear.

Comment · 3 years ago
For every fervent user of X, I can find you 5 zealous irrational haters who are 100% convinced that X is just a religious fluff and that there is no way it's actually better than Y (what they are using). I have in fact, been guilty of that kind of thinking myself.
Comment · 4 years ago
I have not been following the whole thing super closely, no. Thank you for the links.
Comment · 4 years ago
do you have data to back this claim?
Comment · 4 years ago
Exactly, let's first acknowledge there is a problem, then we can find a solution.

Complaining for complaining is not helpful, but don't dismiss problems because no one can think of a better solution at the same time.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton