Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
But but but....
I'm an ORM beepity boppity boo, stuck in SQL standard foo.
Subqueries are idiot - eh dev friendly, joins are bad, why u so sad?
Some RDBMs have special stuff, I think I said enough...
Queries as a string are too complicated, look at the fabulous text diarrhea I fabricated! -
sariel84472y@johnmelodyme it's no worse than Java.
I'm hopeful for a resurgence in a couple years TBF.
If ruby wants to survive, it needs to replace rails and distance itself from the monolith. -
@johnmelodyme At least, Elixir is based on the Erlang virtual machine and has built-in micro threads. Someone should add a proper type system to make it awesome - but it is a good language already (as is Erlang with its slightly more cryptic syntax).
-
@sariel Ruby's in a bit of a conceptual dead end from the way I see it, because they wanted to avoid making rules in favour of developer convenience and as a result created a system where even the most banal assertions - such as whether a field name can exist on a locally constructed instance of a statically created class - are uncomputable, and a lot of the actual ecosystem relies on this magic to monkey patch interfaces that are meant to be used very commonly by the client code.
The result is that developer tooling is either manually extended for each and every library, or it makes correct assumptions less frequently than grossly incorrect ones. -
They've added a good type system that preserves a lot of the language's dynamic nature, but it lacks support for many popular (anti)patterns because they're fundamentally antithetical to type checking, and the ecosystem is far too old and overgrown to remove these in favour of patterns that lend themselves to type checking, for debugger convenience.
-
@Oktokolo well elixir is fast and straightforward tho. Somehow I addicted using it.
-
I enjoyed reading your blog post on why rails are so complicated. I was like you and just wanted to query the database and that was it. I've been looking into learning rails recently and now I'm still struggling with the basics. I can't believe the amount of time it's taken me to get this far. I'm glad you wrote this post because it explains why all the unnecessary queries are being made.
-
Root797732y@ericbeatrix But it doesn’t.
My rant is complaining about unnecessary query complexity. The ActiveRecord query builder often makes complex queries instead of simple ones, and it doesn’t always place `limit` intelligently.
Like any ORM, it takes quite a bit of practice/experience before you have a good idea what the SQL output is going to be — and even then sometimes it behaves unexpectedly, or is simply unable to produce the query you want. Both of these were my frustration today. -
Python Django provides a similar experience but quite supported
Its ORM is flexible enough to fulfill all your desires, if u wish to have subqueries or lag function, or any other stuff.
And if nothing fits (which is hardly ever to happen) u can always write and submit rawSQL request -
@bioDan yes, Django relies on its own ORM... Which is having a small drawback of it being still Sync only. They only try to catch up and introduce async into it. They planned to introduce it already at the end of previous year, hopefully during current year they will succeed to upgrade
Tbh it is more popular / bleeding edge tech wise to use FASTAPI + SQLalchemy. FASTAPI is not forcing u to choose which ORM, and SQLalchemy already supports async operations
Related Rants
-
mcraz17Someone advised him that WP runs faster on Ruby. Now, he wants me to port WordPress to RubyOnRails !!!
-
ausername3Just solved a bug I was trying to solve for hours. Oh, the pleasure of closing 12 tabs at once without wanting...
-
vedipen19Elon Musk makes a front end website containing a single alphabet in html and everyone loses their mind. Meanwh...
STUPID RAILS!
WHY CAN'T YOU JUST BUILD THE BLOODY QUERY WITHOUT DOING FANCY UNNECESSARY SUBQUERY SHIT?!
OR PUT THE LIMIT WHERE IT MAKES SENSE AND DOESN'T CAUSE MYSQL TO TELL YOU TO FUCK OFF?
WHY WHY WHY WHY WHY
THIS ISN'T HARD
rant
why so complex
active record
subquery
rails