HN user

smw

958 karma

https://twitter.com/smw/

Posts1
Comments332
View on HN

Even the 'worst' of the ORMs (according to the people in these threads) makes this very easy:

  users = User.find_by_sql(<<~SQL)
    SELECT users.*,
           COUNT(posts.id) AS posts_count
    FROM users
    LEFT JOIN posts ON posts.user_id = users.id
    GROUP BY users.id
    HAVING COUNT(posts.id) > 10
  SQL

  users.first.posts_count
  # => 17

I'm firmly on the ORM side of things, despite knowing SQL very well -- but your IDE/editor can fix this with bare sql. Try using Jetbrains Datagrip or the DB integration in Idea or one of the other language-specific IDEs.

Sure they do. All the time! For example, if you want to use a script in Google Docs these days, you have to go through an oauth flow to give that script's app permission to do certain actions in your Docs.

Or just ask if you might want to do something productive while you wait for a train or sit in a taxi? Better than doom scrolling. Maybe you're working on a fun side project.

Claude Opus 4.7 3 months ago

Unfortunately, the subscription pricing is so much cheaper than usage pricing that it's probably worth using one of the official harnesses.