Hacker News new | ask | show | jobs
by pianoben 1402 days ago
Amen to that. We had a high-level engineer who sincerely believed that Rails and Postgres were the right tools for Everything. Consequently he shipped a mission-critical query engine whose API is - you guessed it - just ActiveRecord!

It's great if your users are disciplined and experienced Rails engineers who understand how the system works, but we don't live in fantasy land and a year later, we are so very constrained by the unlimited DB access that we're rewriting it all and leaving ActiveRecord out of the equation.

I'll always maintain that Rails is the first tool I'd reach for in a new web startup, and the first one I'd discard after growing past ~20 engineers.

1 comments

> It's great if your users are disciplined and experienced Rails engineers who understand how the system works.

I'm continuously shocked at how much bad ActiveRecord code there is lying around given that it's so easy to just look at the SQL it generates and be like "yeah this looks reasonable".

WHY SPONGEBOB WHY!?! Why do you pass around your relations making all of ActiveRecord part of your external API? It's so hard to do stupid things with AR if you pretend that AR objects can't leave the scope they were fetched in.

> given that it's so easy to just look at the SQL it generates and be like "yeah this looks reasonable".

This makes the assumption that the viewer knows what reasonable SQL looks like in the first place.