Skip to content
Lex Fridman PodcastLex Fridman Podcast

DHH on Lex Fridman: Why No-Build Rails Fixes Web Complexity

Through Basecamp and Rails 8, DHH argues programmer happiness was traded for complexity; no-build restores the simplicity of 90s PHP in one framework.

David Heinemeier HanssonguestLex Fridmanhost
Jul 12, 20256h 8mWatch on YouTube ↗

EVERY SPOKEN WORD

  1. 0:001:21

    Episode highlight

    1. DH

      No one anywhere who's serious believes that cookie banners does anything good for anyone. Yet, we've been unable to get rid of it. This is the thing that really gets me about cookie banners too. It's not just the EU, it's the entire world. You can't hide from cookie banners anywhere on this planet. If you go to goddamn Mars on one of Elon's rockets and you try to access a webpage, you will still see a cookie banner. No one in the universe is safe from this nonsense. It sometimes feels like we're barely better off. Like, webpages aren't that different from what they were in the late '90s, early 2000s. They're still just forms. They still just write to databases. A lot of people, I think, are very uncomfortable with the fact that they are essentially crud monkeys.

    2. LF

      Mm-hmm.

    3. DH

      They just make systems that create, read, update or delete rows in the database, and they have to compensate for that existential dread by over-complicating things. That's a huge part of the satisfaction of driving a race car, is driving it at the edge of adhesion, as we call it, where you're essentially just a tiny movement away from spinning out. Doesn't take much, then the car starts rotating. Once it starts rotating, you lose grip and you're going for the wall. That balance of danger and skill is what's so intoxicating.

  2. 1:212:32

    Introduction

    1. DH

    2. LF

      The following is a conversation with David Heinemeier Hansson, also known as DHH. He is a legend in the programming and tech world, brilliant and insightful, sometimes controversial, and always fun to talk to. He's the creator of Ruby on Rails, which is an influential web development framework behind many websites used by millions of people, including Shopify, GitHub, and Airbnb. He is the co-owner and CTO of 37signals that created Basecamp, HEY, and Once. He is a New York Times bestselling author, together with his co-author Jason Fried, of four books, Rework, Remote, Getting Real, and It Doesn't Have to Be Crazy at Work. And on top of that, he's also a race car driver, including being a class winner at the legendary 24-hour Le Mans race. This is a Lex Fridman podcast. To support it, please check out our sponsors in the description and consider subscribing to this channel. And now, dear friends, here's DHH.

  3. 2:3219:57

    Programming - early days

    1. LF

      For someone who became a legendary programmer, you officially got into programming late in life, and I guess that's because, uh, you tried to learn how to program a few times and you failed. So, can you tell me the, uh, the full story, the saga of your failures to learn programming? Was Commodore 64 involved?

    2. DH

      Commodore 64 was the inspiration. I really wanted a Commodore 64. That was the first computer I ever sat down in front. And the way I sat down in front of it was I was five years old and there was this one kid on my street who had a Commodore 64. No one else had a computer, so we were all the kids just getting over there and we were all playing Yie Ar Kung-Fu. I don't know if you've ever seen that game. It was one of the original fighting games. It's really a great game and I was playing that for the first time at five years old. And we were, like, seven kids sitting up in this one kid's bedroom all taking our turn to play the game. And I just found that unbelievably interesting. And I begged and I begged and I begged my dad, "Could I get a computer?"

    3. LF

      Mm-hmm.

    4. DH

      And he finally comes home, he's like, "I got you a computer." I was like, "Yes, my own Commodore 64." And he pulls out this black, green and blue keyboard. That's an Amstrad 464. I was like, "Dad, what's this?"

    5. LF

      Yeah. (laughs)

    6. DH

      (laughs)

    7. LF

      The disappointment.

    8. DH

      This is not a Commodore 64. But it was a computer, so I-

    9. LF

      (laughs)

    10. DH

      ... got my first computer at essentially six years old, that Amstrad 464, and of course the first thing I wanted to do, I wanted to play video games. And I think the computer, which he, by the way, had traded for a TV and a stereo recorder or something like that, came with, like, two games. One was this Frogger game where you had to escape from underground. It was actually kind of dark, like this frog-

    11. LF

      Mm-hmm.

    12. DH

      ... you're trying to get it out from underground and I was just, I was pretty bad at it. And I only had those two games and then I wanted more games. And one way to get more games when you're a kid who don't have a lot of money and can't just buy a bunch of games is to type them in yourself. Back in '84, '85, magazines would literally print source code at the back of their magazines and you could just sit and type it in. So I tried to do that and it would take, like, two hours-

    13. LF

      Mm-hmm.

    14. DH

      ... to print this game into, uh, the Amstrad. And of course I'd make some spelling mistake along the way and something wouldn't work and the whole thing... I wasn't that good at English, I was born in Denmark. So I was really trying to get into it because I wanted all these games and didn't have the money to buy 'em, and I tried quite hard for quite a while to get into it but it just never clicked, and then I discovered the magic of piracy.

    15. LF

      (laughs)

    16. DH

      And after that I kind of basically just took some time off from learning to program because, well, now suddenly I had access to all sorts of games. So that was the first attempt, like, around six, seven years old, and what's funny is I remember these fragments. I remember not understanding the purpose of a variable. If, if there's a thing and you assign something, why would you assign another thing to it? So for some reason I understood constants, like, constants made sense to me but variables didn't. Then maybe I'm 11 or 12, I've gotten into the Amiga at this point. The Amiga, by the way, still perhaps my favorite computer of all time. I mean, this is one of those things where you're like people get older and they're like, "Oh, the music from the '80s was amazing." To me, even as someone who loves computers and love new computers, the Amiga-... was this magical machine that was made by the same c- company that produced the Commodore 64, and I got the Amiga 500, I think in '87.

    17. LF

      Look at this sexy thing. That is a sexy machine right there.

    18. DH

      This is from an age, by the way, where computing wasn't global in the same sense, that different territories had different computers that were popular. The Amiga was really popular in Europe, but it wasn't very popular at all in the US as far as I understand. It wasn't popular in Japan. They, they were just different machines. The Apple II was a big thing in the US. I'd never even heard of Apple in the '80s in Copenhagen. But the Amiga 500 was the machine that brought me to want to try it again. And you know what's funny? The reason I wanted to try it again was I remembered the first time, Time To Learn, and then there was this programming language that was literally called Easy AMOS.

    19. LF

      Mm-hmm.

    20. DH

      Like, the easy version of AMOS. I'm like, "If it, if it's Easy AMOS, how hard can it be?" (laughs)

    21. LF

      Yeah.

    22. DH

      "I gotta be able to figure this out." And this time, I tried harder. I got into conditionals, I got into loops, I got into all these things, and I still, I couldn't do it. And on the second attempt, I really got to the point I'm like, "Maybe this is ju- maybe I'm not smart enough. Maybe programming's just not f- m- maybe it's too much math." Like, I like math in this sort of superficial way. I don't like it in the deep way that some of my perhaps slightly nerdier friends did, who I had tremendous respect for, but like, I'm not that person. I'm not the mac- math geek who's gonna figure it all out. So after that attempt with Easy AMOS and failing, to even get... I don't even think I completed one even very basic game. I thought, "Th- to program's just not for me. I'm gonna have to do something else." I still love computers. I still love video games. I actually, at that time, had already begun making friends with people who knew how to program, who weren't even programming Easy AMOS. They were programming frigging Assembler. And I would sit down and just go, "I've... How do you... The moves and the memories and the copies, how do you even do this? I don't even understand how you go from this to Amiga demos, for example." That was the big thing with the Amiga. It had this wonderful demo scene in Europe. It's this really interesting period of time in the Amiga's history where you had all these programmers spread out, mostly all over Europe, who would compete on graphic competitions, where you could probably bring one of these up on your YouTube.

    23. LF

      Oh, that thing? (laughs)

    24. DH

      On, on, this thing, they would make these little, um, almost like music videos combining some MIDI music, combining some cool graphics, and they would do all of it in like 4K, four kilobytes that is (laughs) , not 4 days of revolution, four kilobytes of, of memory. And I just thought that was such a cool scene. This was obviously pre-internet. It was even pre-BBS, bulletin board systems, to some extent. It was you swap your demo software with someone else by sending them a disc in the mail-

    25. LF

      Mm-hmm.

    26. DH

      ... like the 3.5s. And I just, I was enamored with that whole scene. I was enamored with what they were able to create, and I just wanted to be a part of it, even though I kinda didn't have any skills to contribute, and that's how I got into running BBSes. I didn't learn programming then, and I wouldn't learn programming until much later, until I was almost 20 years old. The bulletin board systems existed in this funny space where they were partly a service to the demo scenes, allowing all these demo groups to distribute their amazing demos, and then it was also a place to trade piracy software, pirated software. And I ended up starting one of those when I was 14 years old in my tiny little bedroom in Copenhagen. I had my, at that point, Amiga 4000. I had three telephone lines coming into my tiny room.

    27. LF

      Nice.

    28. DH

      Which was funny because, again, I'm 14 years old. By the time I was installing my third line, you had to get someone from the telephone company to come do it. I get this guy, and he's just looking around like, "What is this? Why the hell is a 14-year-old-

    29. LF

      Ugh.

    30. DH

      ... having three phone lines into their tiny little bedroom? What are, what's going on here? Why are all these modems blinking red and, um, black and making funny sounds?"

  4. 19:5730:16

    JavaScript

    1. DH

    2. LF

      And you've been chasing that with Rails 8. So s- h- how do you bring all the cool features of a modern framework and make it no-build, make it as, as easy to create something and to ship it as it was in the '90s with just PHP? It's very difficult for me to beat the Pieter Levels approach, uh, of just, just... It's so easy to just ship some PHP.

    3. DH

      And it should be. Why should it be harder than that? Our computers today are almost infinitely faster than what they were in the '90s. So shouldn't we be able to work in even easier ways? We should be looking back on the '90s and going like, "Oh, that was way too complicated." Now we have more sophisticated technology that's way faster and it allows us to work in these easier to use ways, but that's not true. But now you can see the line I draw in my work with Ruby on Rails, and especially with Rails 8. No-build to me is reaching back to that '90s feeling and going, "Now we can do some of those things without giving up on all the progress." Because I do think you can get too nostalgic. I do think you can start just fantasizing that everything was better in the '90s. It wasn't. I mean, I was there. Uh, there was a lot of things that sucked. And if we can somehow find a way to combine the advantages and advances we've had over the past 20 years with that ease of developer ergonomics, we can win. No-build is a rejection of the part of web development I've hated the most in the past 10, 15 years-

    4. LF

      Mm-hmm.

    5. DH

      ... which is the JavaScript scene.

    6. LF

      Yeah.

    7. DH

      And I don't say that as someone who hate JavaScript. I mean, I often joke that JavaScript is my second favorite programmer language.

    8. LF

      Mm-hmm.

    9. DH

      It's a very distant second.

    10. LF

      Yeah.

    11. DH

      Ruby is by far and away number one, but I actually like JavaScript. I don't think it's a bad language. It gets a lot of flack. People add a string of two, plus a one, and it gives something nonsense. And I just go like, "Yeah, but why are you, why would you do that? Just don't do that." The language is actually quite lovely, especially the modern version. ES6, that really introduced a proper class syntax to it so I could work with JavaScript in many of the same ways that I love working with Ruby, made things so much better. But in the early 2010s until quite recently, all of that advancement happened in pre-processing, happened in build pipelines. The browsers couldn't speak a dialect of JavaScript that was pleasant to work with, so everyone started to pre-compiling their JavaScript to be able to use more modern ways of programming with a browser that was seen as stuck with an ancient version of JavaScript that no one actually wanted to work with. And that made sense to me, but it was also deeply unpleasant. And I remember thinking during that time, the Dark Ages, as I refer to them with JavaScript-

    12. LF

      (laughs)

    13. DH

      ... that this cannot be the final destination. There's no way that we have managed to turn the internet into such an unpleasant place to work, where I would start working on a project in JavaScript using webpack and all of these dependencies, and I would put it down for literally five minutes, and the thing wouldn't compile anymore. The amount of churn that the JavaScript community, especially with its frameworks and its tooling, went through in the decade from 2010 to 2020 was absurd. And you had to be trapped inside of that asylum to not realize what an utterly perverse situation we had landed ourselves in. Why does everything break all the time? I mean, the joke wouldn't be just that the software would break. That would annoy me personally, but then I'd go on Hacker News and I'd see some thread on the latest JavaScript release of some framework, and the thread would be like, um, someone would ask, "Well, aren't we using the thing we just used three months ago?" And people would be like, "That thing is so outdated. That's so three months ago. You gotta get with the new program. We're completely rewriting everything for the umpteenth time, and anything you've learned in the framework you've been spending the last amount of time on, it's all useless. You gotta throw everything out and you gotta start over. Why aren't you doing it, stupid idiot?"

    14. LF

      Is that a kind of mass hysteria that took over the developer community, you think, like where you have to keep creating new frameworks and new frameworks, and we... are we past that Dark Age?

    15. DH

      I think we're getting out of it, and we're getting out of it because browsers have gotten so much better. There was a stagnation in browser technology. Some of it was an overhang all the way back from IE5. So IE5 essentially put the whole internet development experience into a deep freeze, because Microsoft won the browser wars in the mid-2000s, and then they basically disbanded their browser development team, 'cause they're like, "All right. Job done. We don't need any more innovation on the internet. Can we just go back to writing Windows forms or something now that we control everything?"

    16. LF

      (laughs) Yeah.

    17. DH

      And it really wasn't until obviously Firefox kind of kindled a little bit of something, then Chrome got into the scene and Google got serious about moving the web forward that you had a kindling of maybe the browser could be better. Maybe the browser wasn't frozen in time in 2005. Maybe the browser could actually evolve like the development platform that it is. But then what happened was, you had a lot of smart people who poured into the web, because the web turned out to be the greatest application development platform of all time. This was where all the money was being made. This were- this was where all the billionaires were being minted. This was where the Facebooks and whatever of the world came to be. So you had all of this brain power applied to the problem of how to work with the web, and there were some very smart people with some, I'm sure, very good ideas, who did not have, uh, programmer happiness as their motivation number one. They had other priorities, and those priorities allowed them to discount and even rationalize the complexity they were injecting everywhere. Some of that complexity came from organizational structure. When you have a company like Facebook, for example, that does depend on the web and want to push it forward, but have sliced the development role job into these tiny little niches. "I'm a front-end glob pipeline-"

    18. LF

      (laughs)

    19. DH

      "... configurator." "Oh, yeah. Well, I'm a front-end whatever engineer." And suddenly, the web developer was no longer one person, it was 15 different roles. That in itself injected a ton of complexity. But I also wanna give it the bold case here, which was that some of the complexity was necessary to get to where we are today, that the complexity was a bridge. It wasn't the destination, but we had to cross that bridge to get to where we are today, where browsers are frankly incredible. The JavaScript you can write in a text file and then serve on a web server for a browser to ingest is amazing. It's actually a really good experience. You don't need any pre-processing. You can just write text files, send them to a browser, and you have an incredible development experience.

    20. LF

      And we should also say that it can kind of be broken, at least the HTML, but even the JavaScript can be a little bit broken and it kind of still works. Like, maybe it half-ass works, but, like, the, just the amount of mess, of smelly code that a browser has to deal with is insane.

    21. DH

      This is one of the hardest problems in computing today-

    22. LF

      Yeah.

    23. DH

      ... is to parse the entire internet. Because thankfully, for us as web developers, but perhaps not so much for the browser developers, every webpage that has ever been created, minus the brief period with Flash, still runs today.

    24. LF

      Mm-hmm.

    25. DH

      The webpage I did in ninth grade would render on a modern browser today, 30 years later.

    26. LF

      That's crazy.

    27. DH

      That is completely crazy. When you think about the amount of evolution we've had with the web, how much better we've made it, how many more standards browsers have adopted, it's essentially an Apollo project today to create a new browser, which is why it doesn't happen very often, which is why even companies like Microsoft have to throw in the towel and say, "We can't do it." Now, I actually don't think that's good for the web. There is the danger of the monoculture if we just get a single browser engine that runs everything, and we are in danger of that. I love the fact that the Ladybird project, for example, is trying to make a new browser engine from scratch.

    28. LF

      Mm-hmm. Nice.

    29. DH

      I've supported that project. I would encourage people to look into that. It's really a wonderful-

    30. LF

      Nice.

  5. 30:1638:03

    Google Chrome and DOJ

    1. DH

      web.

    2. LF

      We're gonna take tangents upon a tangent upon a tangent. So let's go to Chrome. I think Chrome positive impact on humanity is, is immeasurable for reasons that you just described. On the technology front, the features they represent, the competition they created, it spurred on this wonderful flourishing of web technologies. But anyway, I have to ask you about the, the recent stuff with the DOJ trying to split up Chrome and Google. Do you think this is a good idea? Do you think this does harm?

    3. DH

      It's a disaster.And I say that as someone who's been very sympathetic to the anti-trust fight, because I do think we have anti-trust problems in technology. But the one place where we don't have them, by and large, is with browsers, is with the tools we use to access the open web. First of all, we have Firefox. Now, Firefox is not doing all that great, and Firefox has been propped up by Google for many years to deter from exactly what's going on with the DOJ, that they were the only game in town. Apple has Safari. I have a bunch of problems with Apple too, but I love Safari. I love the fact that we have a premier browser running on a premier operating system, that people can't turn the web into just a Chrome experience. But I also think that the open web needs this trillion-dollar champion, or at least benefits from it, maybe it doesn't need it, but it certainly benefits from it. And of all the things that are wrong with monopoly formation in technology, Chrome is the last thing, and this is why I get so frustrated sometimes about the anti- or the monopoly fight, that there are real problems and we should be focusing on the premier problems first, like the tollbooths on our mobile phones. They're a far bigger problem. It's not the open web, it's not the tools that we use to access the open web. If I don't want to use Chrome, if my customers of my businesses that run on the internet don't want to use Chrome, they don't have to. We're never forced to go through it. The open internet is still open. So I think it's a real shame that the DOJ has chosen to pursue Google in this way. I do think there are other things you can nail Google for, and their ad monopoly maybe, or the, uh, shenanigans they've j- done in controlling both sides of the ad ledger, that they both s- control the supply and the demand. There are problems. Chrome isn't it. And you end up making the web much worse. And this is the thing we always gotta remember when we think about legislation, when we think about, um, monopoly fights, is you may not like how things look today, and you may want to do something about it, but you may also make it worse.

    4. LF

      Mm-hmm.

    5. DH

      The good intentions behind the GDPR in Europe currently has amounted to what? Cookie banners that everyone on the internet hates, that helps no one do anything better, anything more efficient, that saves no privacy in any way, shape, or form, has been a complete boondoggle that has only enriched lawyers and accountants and bureaucrats.

    6. LF

      Yeah, you said that the cookie banner is a monument for why Europe is losing, is, is doing the worst, uh, of all the regions in tech.

    7. DH

      It's-

    8. LF

      (laughs)

    9. DH

      ... it's a monument to good intentions leading straight to hell.

    10. LF

      (laughs)

    11. DH

      And the Europe is actually world class-

    12. LF

      (laughs) Yeah.

    13. DH

      ... in good intentions leading straight to hell.

    14. LF

      So hell is the cookie accept button that you have to accept all cookies. That's what hell looks like. Over and over, you don't actually ever get to the web page.

    15. DH

      Just on a human scale, try to imagine how many hours every day are wasted clicking that away, and how much harm we've done to the web as a platform that people enjoy because of them. The internet is ugly in part because of cookie banners. Cookie banners were supposed to save us from advertisement-

    16. LF

      Mm-hmm.

    17. DH

      ... and advertisement can make the web ugly, there's plenty of examples of that. But cookie banners made the entire internet ugly in one fell swoop, and that's a complete tragedy. But what's even worse, and this is why I call it out as a monument to everything the EU gets wrong, is that we have known this for a decade. No one anywhere who's serious believes that cookie banners does anything good for anyone, yet we've been unable to get rid of it. There's this one piece of legislation that's now I think 10 or 12 years old, it's a complete failure on every conceivable metric, everyone hates it universally, yet we can't seem to do anything about it. That's a bankruptcy declaration for any body of bureaucrats who pretend or portend to make things better for not just citizens, but people around the world. This is the thing that really gets me about cookie banners too. It's not just the EU, it's the entire world. You can't hide from cookie banners anywhere on this planet. If you go to goddamn Mars on one of Elon's rockets and you try to access a webpage, you will still see a c- cookie banner. No one in the universe is safe-

    18. LF

      Yeah.

    19. DH

      ... from this nonsense.

    20. LF

      Probably the interface on (laughs) on the rocket.

    21. DH

      It'll be even slower.

    22. LF

      Yeah.

    23. DH

      You have basically, uh, 150 second ping time-

    24. LF

      Yeah.

    25. DH

      ... so it'll take you 45 seconds just to get through the cookie banners from Mars.

    26. LF

      Um, all right, let's walk back, uh, up the stack of these recursive tangents we've been taking. So Chrome, we should say, at least in my opinion, is not winning unfairly. It's winning in the fair way by just being better.

    27. DH

      It is. If I was gonna steel man the other side just for a half second-

    28. LF

      Mm-hmm.

    29. DH

      ... people would say, "Well, maybe yes, most people do sort of begrudgingly agree that Chrome is a pretty good browser." But then they'll say, "The reason it got dominance was distribution, and the reason it got distribution was because Google also controls Android, and therefore can make Chrome the default browser on all these phones." Now, I don't buy that, and the reason I don't buy that is because on Android, you're actually allowed to ship a different browser that has a browser engine that's not the same as Chrome, unlike on iOS, where if you want to ship a browser, Chrome, for example, ships for iOS, but it's not Chrome. It's Safari wrapped in a dress, and every single alternative browser on iOS have to use the Safari web engine. That's not competition. That's not what happened on Android. Again, I think there are some nuances to it, but if you zoom out...... and you look at all the problems we have with big tech, Chrome is not it. Chrome won on merits. I begrudgingly have switched to Chrome on that realization alone. As a web developer, I just prefer it. I like Firefox in many ways, I like the ethos of it, but Chrome is a better browser than Firefox, full stop.

    30. LF

      And by the way, we've never mentioned Edge. Edge is also a good browser. (laughs)

  6. 38:0345:14

    Ruby programming language

    1. LF

      so eventually the big success stories when you built a bunch of stuff with PHP and you were, like, actually shipping things.

    2. DH

      Yes.

    3. LF

      And that's when the, the Ruby story came. So what... Your big love affair with programming began there. So can you take me there? What is, what is Ruby? Tell the story of Ruby. Explain Ruby to me.

    4. DH

      PHP was what converted me from just being able to fondle HTML and turn out some web pages to actually being able to produce web applications myself. So I owe a tremendous gratitude to PHP in that regard. But I never thought of PHP as a calling. I never thought, "I'm a professional programmer who writes PHP. That's who I am and that's what I do." I thought of PHP as a tool I needed to smack the computer with until it produced web applications I wanted. It was very much a means to an end. I didn't fall in love with PHP. I'm very grateful that it taught me the basics of programming, and I'm very grateful that it set the bar for the economics, but it really wasn't until Ruby that I started thinking of myself as a programmer. And the way that came about was, that the first time I ever got hired as a professional programmer to write code was actually by Jason Fried, my business partner still. All the way back in 2001, I had been working on these gaming websites in PHP for essentially 18 months at that point. No one had been paying me to do code in that regard, and I connect with Jason Fried over an email sent from Copenhagen, Denmark to Chicago, Illinois, to a person who didn't know who I was. I was just offering solicited advice. Jason had asked an- a question on the internet, and I had sent him the answer, and he was asking in PHP. And I had sent him the answer to that question, and we started talking and then we started working, which by the way is a miracle of what the internet can allow. How can a kid in Copenhagen, who's never met this guy in Chicago, connect just over email and start working together? And by the way, we're still working together now 24 years later. That's incredible. But... We started working together, and we started working together on some client projects. Jason would do the design, 37signals would do design, I would bring the programming of PHP. And after we'd work on I think two or three client projects together in PHP, we kept hitting the same problem, that whenever you work with a client, you start that project off in email. "Oh, yeah, let's work together. Here's what we're building." And you start trading more and more emails, and before a few weeks have passed, you've got to add someone to the project. They don't have the emails. They don't have the context. You send someone, "Well, where's the latest file?" "Oh, I've uploaded it on the FTP. It's like final final V06 2.0." Right? Mm-hmm. That's the one to get. It's just a mess, a beautiful mess in some ways, a mess that still runs the vast majority of projects to this day. Mm-hmm. Email is the lowest common denominator. That's wonderful. But we had dropped the ball a couple of times in serious ways with customers, and we thought, "We can do better. We know how to make web applications. Can't we just make a system that's better than email for managing projects? It can't be that hard. We've been doing blogs, we've been doing to-do lists. Let's put some of these things together and just make a system where everything that anyone involved in the project needs is on one page. And it has to be simple enough that I'm not gonna run a seminar teaching you how to use the system. I'm just gonna give you the login code, you're gonna jump into it." So that's Basecamp. Mm-hmm. And when we started working on Basecamp, I, for the first time in the experience I had with Jason, had the freedom of technology choice. There was no client telling me, "Yeah, PHP, that sounds good. We know PHP. Can you build it in PHP?" Mm-hmm. I had free reins. And at that time, I'd been reading, uh, IEEE magazine- Mm-hmm. ... and a couple of other magazines back from the early 2000s, where Dave Thomas and Martin Fowler had been writing about programming patterns- Mm-hmm. ... and how to write better code. And these two guys, in particular, were both using Ruby to explain their concepts, because Ruby looked like pseudocode. Mm-hmm. Whether you were programming in C or Java or PHP, all three constituencies could understand Ruby, because it's basically just read-slang English. S- so these guys were using Ruby to d- describe the concepts. And first of all, I would read these articles for just the concept they were explaining, and I'd be like, "What is this programming language? I mean, I like the concept you're explaining, but I also want to see the programming language. W- why haven't I heard of this?" So I started looking into Ruby, and I realized...At that time, Ruby might not be known by anyone, but it's actually been around for a long time. Matz, the Japanese creator of Ruby, had started working on Ruby back in '93, before the internet was even a thing. And here I am in 2003, ten years later, picking up what seems like this hidden gem that's just laying in obscurity in plain sight.

    5. LF

      Mm-hmm.

    6. DH

      But Dave Thomas and Martin Fowler, I think, successfully put me and a handful of other people on the trail of a programming language that hadn't been used much in the West, but could be. So I picked up Ruby, and I thought, "This is... This is very different." First of all, where are all the semicolons?

    7. LF

      Mm-hmm.

    8. DH

      I'd been programming in PHP, in ASP, I'd even done some Pascal, I'd looked at some C. There were semicolons everywhere. And that was the first thing that struck me is, "Where are the damn semicolons?" And then I started thinking, "Actually, why do we have semicolons in programming?" They're to tell the interpreter that there's a new line of instructions, but I don't need them as a human.

    9. LF

      Mm-hmm.

    10. DH

      How? Oh. Someone is looking out for the human here, not for the machine. So that really got me interested. And then I thought to myself, "Do you know what? I know PHP quite well. I'm not an amazing programmer. I haven't been working in programming for all that long, but maybe I can figure it out. I'm gonna give myself two weeks. I'm gonna write a proof of concept where I talk to a database, I pull some records, I format them a bit, and I display them on an HTML page. Can I figure that out in a couple weeks?" It took about one weekend, and I was completely mesmerized. I was completely mind-blown, because Ruby was made for my brain like a perfect tailored glove by someone I'd never met. Like, how is this even possible?

  7. 45:141:03:15

    Beautiful code

    1. DH

    2. LF

      We should say maybe, like, paint the picture of the certain qualities that Ruby has, maybe even compared to PHP. We sh- we should also say that there's a ridiculous thing that I'm used to that I forget about, that there's dollar signs everywhere-

    3. DH

      Yes.

    4. LF

      ... in PHP.

    5. DH

      Yes.

    6. LF

      I mean, that-

    7. DH

      There's line noise.

    8. LF

      Li- line noise (laughs) .

    9. DH

      That's what I like to call it.

    10. LF

      Line noise. Line noise, that's such a beautiful phrase. Yeah, so there's all these things that look like programs, and with Ruby, I mean, there's some similarities in Python there. Uh, it just looks kind of like natural language. You can read it normally.

    11. DH

      Here's a wild loop that does, uh, uh, five iterations.

    12. LF

      Mm-hmm.

    13. DH

      You can literally type the number 5., now I'm calling a method on the number 5, by the way. That's one of the beautiful aspects of Ruby, that primitives like integers are also objects. And you can call 5 times start brackets. Now you're iterating over the code in that bracket five times. That's it.

    14. LF

      Okay, that's nice.

    15. DH

      That's not just nice, that's exceptional. There's literally no other programming language that I know of...

    16. LF

      Okay.

    17. DH

      ... that has managed to boil away the line noise that almost every other programming language would inject into a five-time iteration over a block of code to that extent.

    18. LF

      Wow. That's a really nice... Oh, thank you for giving that example. That's a beautiful example. Wow, I don't think I know a programming language that does that. That's really nice.

    19. DH

      Ruby's full of that. And there's... So let me dive into a couple of examples.

    20. LF

      Okay (laughs) .

    21. DH

      Because I really think it helps paint the picture. And let me preface this by saying, I actually, I like the ethos of Python. I think the Ruby and the Python community share a lot of similarities. They're both dynamic interpreted languages. They're both focused on immediacy and productivity and ease of use in a bunch of ways. But then they're also very different in many other ways, and one of the one ways they're very different is aesthetically. Python, to me, I hope I don't offend people too much. I've said this before. It's just, it's ugly. And it's ugly at i- in its base because it's full of superfluous instructions that are necessary for legacy reasons of when Guido made Python back in '87 that are still here in 2025, and my brain can't cope with that. Let me give you a basic example. When you make a class in Python, the initializer method, the starting method, is def. Okay, fair enough, that's actually the same as Ruby. D-E-F, definition of a method. Then it is underscore, not one, _2 init__ parentheses start self comma, and then the first argument (inaudible 00:04:52) .

    22. LF

      Yeah, the whole self thing, yeah. Mm-hmm.

    23. DH

      I look at that and go, "I'm sorry, I'm out. I can't do it."

    24. LF

      (laughs) . Yeah.

    25. DH

      It's just, it's... Everything about it offends my sensibilities to the core. Here you have the most important method that all new objects or classes have to implement, and it is one of the most aesthetically offensive ways of typing initialize that I've ever seen anywhere. And you guys are okay with this?

    26. LF

      Hey, you're making me... You- you know where you're, like, talking about my marriage or something like this?

    27. DH

      (laughs) .

    28. LF

      And- and I'm now realizing I've been in a toxic relationship all along (laughs) . Yeah- yeahs, just get used to it (laughs) .

    29. DH

      That, to me, by the way-

    30. LF

      That's the problem.

  8. 1:03:151:06:36

    Metaprogramming

    1. DH

    2. LF

      And we should say that the thing that made you fall in love with this particular programming language is metaprogramming.

    3. DH

      Yes. So that takes all of these elements we've just talked about and turned them up to 11. I'll explain metaprogramming real simple.

    4. LF

      Yeah, please.

    5. DH

      Metaprogramming is essentially a version of the five dot days. You get to add keywords to the language. ActiveRecord is the part of Rails that communicates with the database. This is a system where every table in the database is represented by a class. So if we take the user example again, you do class User, um, descends from ActiveRecordBase. And then the first line you can write is this. I want my users to have many posts or have many comments. Let's do that. We're making some system where users can make comments. The very next line is has_many space colon Comments. Now you've set up a dependency between users and comments that will give you a whole host of access and factory methods for users to be able to own comments, to create comments, to update comments. In that line alone, has_many looks like a keyword. It looks like it's part of the Ruby language. That's metaprogramming. When Rails is able to add these elements to how you define a class and then that runs code that adds a bunch of methods to the user class, that's metaprogramming. And when metaprogramming is used in this way, we call it domain-specific languages. You take a generic language like Ruby and you tailor it to a certain domain like describing relationships in a database at a object level. And this is one of those early examples where you can do, um, User has_many Comments belongs_to space colon Account. Now you've set up a, uh, one-to-one relationship. Before we had a one-to-many relationship. Rails is rife with all these kinds of domain-specific languages where... And sometimes it doesn't even look like Ruby. You can't identify Ruby keywords. You can just identify what looks like keywords in its own programming language. Now again, I know that Lisp and others also do this stuff. They just do it with the maximum amount of line noise that can ever be crammed into a programming language. And Ruby does it at a level where you cannot tell my metaprogramming from Matt's keywords and with zero line noise.

    6. LF

      Yeah. I should say that my first love was Lisp, so... There's a slow tear that you can't see.

    7. DH

      I've actually never written any real Lisp myself.

    8. LF

      Well, how can you judge it so harshly then?

    9. DH

      Because I have two eyes and I can look at code and my aesthetic sensibilities forbid me to even go much further, which is a limitation, I know.

    10. LF

      Mm-hmm.

    11. DH

      I should actually dive into Lisp because I found that I've learned a lot just diving into... Maybe I'm insulting Lisp again here, but the past of programming languages. With Smalltalk, for example, I think Smalltalk is a incredible experiment that also worked but isn't suitable for today's programming environments.

  9. 1:06:361:13:55

    Dynamic typing

    1. LF

      I love that we're talking about Ruby so much and what beautiful code is and what a beautiful programming language is. So one of the things that is I think implied, maybe you made explicit in your descriptions there is that, uh, Ruby is dynamic typing versus strict typing. And you have been not just saying that it's a nice thing, but that you will defend dynamic typing to the death. Like that freedom is a powerful freedom to preserve.

    2. DH

      It's the essence of what makes Ruby, Ruby. This is why I don't fully understand when people call for Ruby to add static typing, 'cause to me, it's the bedrock of what this is. Why would you want to turn one of the most beautiful languages into something far uglier? This is one of my primary objections to static typing. It's not just that it limits you in certain ways, it makes metaprogramming harder. I write a bunch of metaprogramming. I've seen what it takes to do metaprogramming in TypeScript. That was actually one of the things that just really sent me on a tear of getting meta or getting TypeScript out of some of the projects that I'm involved with. We pulled TypeScript out of, um...... Turbo, one of the front-end frameworks that we have, because I tried to write the metaprogramming in TypeScript and I was just infuriated. I don't want that experience. But I also don't want it from an aesthetic point of view. I hate repetition. We've just talked about how much I love that Ruby boils all of these expressions down to its essence. You can't remove one dot, you can't remove one character without losing something. This moment you go for static typing, that you declare at least, I know there are ways to do implied typing and so forth, but let's just take the stereotypical case of the j- of a example, for example. Um, capital U User, I'm declaring the type of the variable, lowercase user, I'm now naming my variable, equals uppercase User or new uppercase User. I've repeated User three times. I don't have time for this.

    3. LF

      (laughs)

    4. DH

      I don't have sensibilities for this. I don't want my Ruby polluted with this. Now I understand all the arguments for why people like static typing. One of the primary arguments is that it makes tooling easier. It makes it easier to do autocomplete in editors, for example. It makes it easier to find certain kinds of bugs because maybe you're calling methods that don't exist on an object and the editor can actually catch that bug before you even run it. I don't care. First of all, I don't write code with tools. I write them with text editors. I chisel them out of the screen with my bare hands.

    5. LF

      Mm-hmm.

    6. DH

      I don't autocomplete. And this is why I love Ruby so much, and this is why I continue to be in love with the text editor rather than the IDE. I don't want an IDE. I want my fingers to have to individually type out every element of it, because it will force me-

    7. LF

      Mm-hmm.

    8. DH

      ... to stay in the world where Ruby is beautiful. Because as soon as it gets easy to type a lot of boilerplate, well, guess what? You're gonna have a lot of boilerplate. Every single language, basically, that has great tooling support has a much higher tolerance for boilerplate because the thinking is, "Well, you're not typing it anyway. You're just autocompleting it." I don't want that at all. I want something where the fabric I'm working in is just a text file. There's nothing else to it. So, these things play together. There's the aesthetic part, there's the tooling part, there's the metaprogramming part. There's the fact that Ruby's ethos of duck typing, I don't know if you've heard that term before.

    9. LF

      Mm-hmm.

    10. DH

      It's essentially not about, "Can I call this method if a object is of a certain class?" It is, "Can I call this method if the method responds?" It's very out of Smalltalk in that regard. You don't actually check of whether that class has the method, which allows you to dynamically add methods at runtime and do all sorts of really interesting things that underpin all the beautiful metaprogramming that we do in Ruby. I don't wanna lose any of that. And I don't care for the benefits. One of the benefits I've seen touted over and over again is that it's much easier to write correct software. You can have fewer bugs. You're gonna have less null pointer exceptions, you're gonna have n- less... All this stuff. Yeah, I don't have any of that. It is just not something that occurs in my standard mode of operation. I'm not saying I don't have bugs. Of course, I do. But I catch those bugs with unit testing, with integration testing. Those are the kinds of precautions that will catch logical bugs, things that compile but are wrong, along with the uncompilable stuff. So, I've never been drawn into this world, and part of it is because I work on a certain class of systems. I fully accept that. If you're writing systems that have 5, 10, 50 million lines of code, with hundreds, thousands, or tens of thousands of programmers, I fully accept that you need different methods.

    11. LF

      Mm-hmm.

    12. DH

      What I object to is the idea that what's right for a code base of 10 million lines of code with 100,000 programmers working on it is also the same thing I should be using in my bedroom to create base camp, because I'm just a single individual. That's complete nonsense. In the real world, we would know that that makes no sense at all, that you don't, I don't know, use your Pagani to go pick up groceries at Costco. It's a bad vehicle for that. It just doesn't have the space, you don't wanna muddy the beautiful seats, you don't wanna do any of those things. We know that certain things that are very good in certain domains don't apply to all. In programming languages, it seems like we forget that. Now, to be fair, I also had a little bit, perhaps, of a reputation for forgetting that. When I first learned Ruby, I was so head over heels in love with this programming language that I almost found it unconceivable that anyone would choose any other programming language at all to write web applications. And I kind of engaged the evangelism of Ruby on Rails in that spirit, as a crusade, as, "I just need to teach you the gospel. I just need to show you this conditional code that we just talked about, and you will convert at the point of a sharp argument." Now, I learned that that's not the way, and part of the reason it's not the way is that programmers think differently. Our brains are configured differently. My brain is configured perfectly for Ruby, perfectly for a dynamically, duck-typed language that I can chisel code out of a text editor with. And other people need the security of an IDE, they want the security of classes that won't compile unless you call the methods on it. I have come to accept that, but most programmers don't. They're still stuck in, essentially, "I like static typing, therefore, static typing is the only way to create reliable, correct systems." Which is just such a mind-blowing...... to be blunt, idiotic thing to say in the face of evidence, mountains of evidence to the contrary.

  10. 1:13:551:26:47

    Scaling

    1. DH

      This is one of the reasons I'm so in love with Shopify as the flagship application for Ruby on Rails. Shopify exists at a scale that most programmers will never touch. On Black Friday, I think Shopify did one million requests per second. That's not one million requests of images. That's of dynamic requests that are funneling through the pipeline of commerce. I mean, Shopify runs something like 30% of all e-commerce stores on the damn internet. A huge portion of all commerce in total runs through Shopify, and that runs on Ruby on Rails. So, Ruby on Rails is able to scale up to that level without using static typing in all of what it does. Now, I know they've done certain experiments in certain ways, because they are hitting some of the limits that you will hit with dynamic typing, and some of those limits you hit with dynamic typing are actually, by the way, just limits you hit when you write five million lines of code. I think the Shopify monolith is about five million lines of code. At that scale, everything breaks, because you're at the frontier of what humans are capable of doing with programming languages. The difference in part is that Ruby is such a succinct language, that those five million, if they'd been written in, let's just say, Go or Java, would have been 50 or 25. Now, that might have, uh, alleviated some of the problems that you have when you work on huge systems with many programmers, but it certainly would also have compounded them, trying to understand 25 million lines of code.

    2. LF

      So, the thing does scale. That's a persistent myth that it doesn't scale. Uh, Shopify, and, and others, but Shopify, I think is a great example. Uh, by the way, I love Shopify and I love Tobi.

    3. DH

      You got to have Tobi on.

    4. LF

      Yeah. For sure.

    5. DH

      I was talking to him this morning.

    6. LF

      For sure. He's a brilliant... I, I got to hang out with him in the desert somewhere, I forget, in Utah. He's just a brilliant human. Um, and, uh, and, and Shopify... shopify.com/lux has been supporting this podcast for the longest time. (laughs) I don't, I don't think actually Tobi knows that they sponsor this podcast. I mean, it's a big company, right?

    7. DH

      It's a huge company. I think, uh, just under 10,000 employees, market cap of 120 billion, uh, GMV of a quarter of a trillion every quarter.

    8. LF

      And he's involved with the details still?

    9. DH

      He is, very much so. Funny story about Tobi. Tobi was on the Rails core team back in the mid-2000s.

    10. LF

      Really?

    11. DH

      Tobi himself wrote ActiveMerchant, which is one of the frameworks for creating shops. He wrote the Liquid templating language that Shopify still uses to this day. He has a huge list of contributions to the Rails ecosystem, and he's the CEO of the company.

    12. LF

      Yeah.

    13. DH

      I think it's just... it's very inspiring to me, because it's such at the opposite end of what I like to do. I like to chisel code with my own hands most of the day.

    14. LF

      Mm-hmm.

    15. DH

      He runs a company of almost 10,000 people that is literally... like, world commerce depends on it, a level of criticality I can't even begin to understand, and yet we can see eye to eye on so many of these fundamental questions in computer science and program development. That is a dynamic range-

    16. LF

      Mm-hmm.

    17. DH

      ... to be able to encompass Rails being a great tool for the one developer who's just starting out with an idea, who don't even fully know everything, who is right at the level where PHP would have been a good fit in those late '90s, because, "Eh, I could probably upload something to an FTP server," and so on. Rails does have more complexity than that, but it also has so much longer runway. The runway goes all the way to goddamn Shopify. That is about the most convincing argument I can make for sort of dynamic range that we can do a lot of it. And even having said that, Shopify is the outlier, of course. I don't think about Shopify as the primary target when I write Rails. I think of the single developer. Actually, I do think about Shopify, but I don't think about Shopify now. I think of Shopify when Tobi was writing Snowdevil, which was the first e-commerce store to sell snowboards that he created. That was the pre-Shopify Shopify he created all by himself. And that was possible because Ruby on Rails isn't just about beautiful code. It's just as much about productivity. It's just as much about the impact that an individual programmer is able to have, that they can build system where they can keep the whole thing in their head and be able to move it forward such that you can go from one developer sitting and working on something, and that something is Shopify, and turns into what it is today. When we talk about programming languages and we compare them, we often compare them at a very late stage. Like, what is the better programming language for, let's say, Twitter in 2009, when it's already a huge success? Twitter was started on Ruby on Rails. They then hit some scaling problems. It was a big debacle at the time. They end up then, I think, writing it in some other language, which, by the way, I think is the best advertisement ever for Ruby on Rails, because nothing fucking happened for 10 years after they switched over, right? Essentially zero innovation. Some of that was because they were doing a long conversion, and all of the early success in part came because they had the agility to quickly change and adopt and so forth. That's what startups needs. That's what Shopify needed, that's what Twitter needed, that's what everyone needs, and that's the number one priority for Ruby on Rails, to make sure that we don't lose that. Because what happens so often when development tools and programming language are driven by huge companies is that they mirror their org chart. React and everything else needed to use that is in some ways a reflection of how Meta builds Facebook, because of course it is, because of course it's an abstraction of that. I'm not saying React isn't a great tool and that it can't be used by smaller teams. Of course it can. But it's born in a very different context than something like Ruby on Rails.

    18. LF

      Uh, let me say this as a small aside, because I think we might return to Shopify and celebrate it often. Just a, a sort of personal note...... a, this particular podcast has way more sponsors and sponsors that want to be sponsors than it could possibly ever have. And it's really, really important for me to not give a shit. And to be able to celebrate people, like I celebrate people, I celebrate companies. And it has n- I don't care that they're sponsoring. I really don't care. I just wanna make that very explicit because we're gonna continue saying positive things about Shopify. I don't care. Stop sponsoring. It doesn't really matter to me. But yeah, I just wanna, uh, make that explicit. So but to linger on the scaling thing with the Twitter and the Shopify, uh, can you just explain to me what Shopify is doing with the, with the JIT? What did they have to try to do to scale this thing? Because that's kind of an incredible story, right?

    19. DH

      Yeah. So one of the great contributions that Shopify has made to the entire Ruby ecosystem, not just Rails, but in particular Rails, is YJIT. So YJIT is their compiler for, for Ruby that just makes everything a lot more efficient. And at Shopify's scale, eking out even a 5, 10% improvement in Ruby's overhead and execution time is a huge deal. Now, Shopify didn't need YJIT. Shopify was already running on the initial version of Ruby that was I think 10 times slower than what we have today if you look back upon the Ruby 1.8.6 that Tobi probably started on just as I started on. And that was enough to propel Shopify to the scale that it has today. A lot of the scaling conversation in, is lost in a failure to distinguish two things. Scale is kind of one package we talk about when there are really multiple packages inside of it. One is runtime performance. Latency. How fast can you execute a single request? Can it happen fast enough that the user will not notice? If your Rails request takes a second and a half to execute, the user's gonna notice. Your app is gonna feel slow and sluggish. You have to get that response time down below, let's say, at least 300 milliseconds. I like to target 100 milliseconds as my latency. That's kind of performance. How much performance of that kind of latency can you squeeze out of a single CPU core? That tells you something about what the price of a single request will be. But then whether you can deal with one million requests a second like Shopify is doing right now, if you have one box that can do 1,000 requests a second, you just need X boxes to get up to a million. And what you'll actually find is that when it comes to programming languages, they're all the same in this way. They all scale largely beautifully horizontally. You just add more boxes. The hard parts of scaling a Shopify is typically not the programming language, it's the database. And that's actually one of the, um, challenges that Shopify has now is, how do you deal with MySQL at the scale that they're operating at? When do you need to move to other databases to get worldwide performance? All of these things. The questions about scaling Ruby are economic questions. If we're spending so and so much on application servers, if we can get just 5% more performance out of Ruby, well, we could save 5% of those servers and that could filter down into the budget. Now, that analysis concludes into basically one thing. Ruby is a luxury language.

    20. LF

      (laughs) .

    21. DH

      It's a luxury, the highest luxury, in my opinion. It is the Coco Chanel of programming languages, something that not everyone can afford. And I mean this in the best possible way. There are some applications on the internet where each request has so little value that you can't afford to use a luxurious language like Ruby to program it in. You simply have to slum it with a C or a Go or some other low level language or Rust, talk about line noise there for a hot second.

    22. LF

      It's like the thrift store of languages.

    23. DH

      Exactly. Where you need kind of just you need a very low level to do it. You can't afford to use a luxury language to u- to, to build it with. That's not true of Shopify. It wasn't true of Basecamp even back in 2004. It's not been true of 99% of all web applications ever created because the main cost component of 99% of web applications is not CPU cores. It's wet cores. It's human cores. It's human capacity to understand and involve systems. It's their personal productivity. I did a calculation once when someone had for the 400th time said that, "Oh, if you switch from Ruby to some faster language, you could save a bunch of money." And I calculated it out that at the time, and I think the last time I did this calculation was almost a decade ago, we were spending about 15% of our operating budget on Ruby application servers. So for me to improve my cost profile of the business, um, by seven percentage points, I'd have to pick something twice as fast. That's quite hard. Versus if Ruby and Ruby on Rails was even 10% more productive than something else, I would move the needle far more because making individual programmers more productive actually matters a lot more. This is why people are so excited about AI. This is why they're freaking out over the fact that a single programmer in Silicon Valley who makes $300,000 a year can now do the work of three or five, at least in theory. I haven't actually seen that fully in practice, but let's just assume the theory is correct, if not now, then in six months. That's a huge deal. That matters so much more than whether you can squeeze a few more cycles out of the CPU when it comes to these kinds of business applications. If you're making-... Unreal Engine rendering stuff, like Tim Sweeney you had on.

    24. LF

      Mm-hmm.

    25. DH

      Yeah, he needs to really sweat all those details. The Nanite engine can't run on Ruby. It's never going to. It was not meant for that. Fine. These kinds of business applications absolutely can. And everything that people are excited about AI for right now, that extra capacity to just do more, that was why we were excited about Ruby back in the early 2000s. That was be- because I saw that if we could even squeeze out a 10% improvement of the human programmer, we'd be able to do so much more for so much

  11. 1:26:471:44:18

    Future of programming

    1. DH

      less.

Episode duration: 6:08:47

Install uListen for AI-powered chat & search across the full episode — Get Full Transcript

Transcript of episode vagyIcmIGOQ

Get more out of YouTube videos.

High quality summaries for YouTube videos. Accurate transcripts to search & find moments. Powered by ChatGPT & Claude AI.

Add to Chrome