Evidence receipt / belief
Published · transcript-backedSpeaker unverified: belief
12 Jul 2025 Lex Fridman Podcast #474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting
“Can we match it just slightly better to the object orientation without trying to hide away the fact that we’re persisting these objects into a database?” That’s where I think a lot of ORMs went wrong.”
— Speaker unverified
Source trail
Everything needed to verify it.
- Speaker
- Speaker unverified
- Attribution
- Not verified from this transcript
- Claim type
- belief
- Recorded
- 12 Jul 2025
- Publisher
- Lex Fridman Podcast
Transcript context
…Let’s just say that ActiveRecord is an ORM, which is a layer that makes it intuitive and human interpretable to communicate with a database. Even simpler than that. It turns tables into classes and rows into objects. I actually think SQL is very easy to understand most of it. You can write some SQL golf too, that’s very hard to understand, but SQL at its base and much of the criticism against SQL was it was written for human consumption. It’s actually quite verbose, especially if you’re doing things like inserts over and over again. It’s quite verbose. Insert into table, parentheses, enumerate every column you want to insert, values, parentheses. In every column you want to insert values, parentheses, every value that fits with that column, it gets tedious to write SQL by hand, but it’s actually very humanly readable. ActiveRecord just takes that tediousness away, it makes it possible to combine things in a way that a humanly describable language just doesn’t. It composes things into methods and you can combine these methods and you can build structures around them. I don’t dislike SQL, I just like a lot of things in programming, I try to get rid of them. SQL wasn’t really one of them, it was just a sense of, “I don’t want to write the same thing over and over again.” It was a, “Can we be a little more succinct? Can we match it just slightly better to the object orientation without trying to hide away the fact that we’re persisting these objects into a database?” That’s where I think a lot of ORMs went wrong. They tried to live in the pure world of objects, never to consider that those objects had to be consistent into a SQL database, and then they came up with convoluted way of translating back and forth. ActiveRecord says, “You know what? Just accept it.” This record, this object is not going to get saved into some no-SQL database, it’s going to be saved into SQL database, so just structure the whole thing around that. It’s going to have attributes, those attributes are going to respond to columns in the database. It’s not more complicated than that stuff making it so. Yeah, but I should say, I personally love SQL, because I’m an algorithms person, so I love optimization, I love to know how the databases actually work, so I can match the SQL queries and the design of the tables such that there is optimal… Squeeze the optimal performance out of the table. Okay. Based on the actual way that that table is used. I think that pushes to the point that there is value in understanding SQL. I wonder, because I started looking at ActiveRecord and it looks really awesome. Does that make you lazy? Not you, but a person that rolls in and starts using Rails, you can probably get away with never really learning SQL, right?…
Stored transcript either side of the excerpt. The highlighted words are the published quote; the surrounding text is unedited source, never generated.