News for hackers. Stuff that matters.
Re:Sick of Ruby, dynamic typing, side effects, and object-or... by ryanbrunner on Tuesday November 07, 2017 @08:05AM (#15642993)
I think the point is, Active Record (like any orm) is a leaky abstraction that covers a small, but common percentage of what you can do with SQL. Any time I've run into problems fighting the "magic" of Active Record, my time was almost always better spent just taking back to hand written SQL (which isn't terrifically difficult with Rails).

Rails absolutely is a framework where you need to abandon some control and trust the framework though. If you need to know exactly how your abstractions work under the hood, it's a poor choice IMO. I doubt there a single person who has comprehensive knowledge of how every single part of Rails works.

Re:Sick of Ruby, dynamic typing, side effects, and object-or... by rapind on Tuesday November 07, 2017 @08:35AM (#15643205)
Couldn't agree more. Invest a bit of your time gradually learning more SQL and your life will be easier no matter the backend / ORM.

SQL is really not going away anytime soon (it's demise has been falsely predicted many many times). It even fits the current language hype in that it's functional!

Re:Sick of Ruby, dynamic typing, side effects, and object-or... by danmaz74 on Tuesday November 07, 2017 @09:05AM (#15643413)
You nailed it :)

I love AR, but there are use cases where you just need to create or optimize your queries manually.