Episode #474 from 5:53:03
As the king of the Rails kingdom. Has the power gotten to your head over the years? I'm sure it has. I mean, who wouldn't?
People
Topics
Episode highlight
0:00
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 web page, you'll still see a cookie banner. No one in the universe is safe from this nonsense. It sometimes feels like we're barely better off. Web pages 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. They just make systems that create, read, update, or delete rows in a 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 in 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.
Introduction
1:21
The following is a conversation with David Heinemeyer Hansen, 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 best-selling 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 twenty-four-hour Le Mans race. This is the 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.
Programming
2:32
For someone who became a legendary programmer, you officially got into programming late in life, and I guess that's because you tried to learn how to program a few times and you failed. So can you tell me the full story, the saga of your failures to learn programming? Was Commodore 64 involved? 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?" 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?"
JavaScript
19:57
And you've been chasing that with Rails 8. So how do you bring all the cool features of a modern framework and make it no build, make it 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 of just... It's so easy to just ship some PHP. 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 go, 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. I wasn't.
Google Chrome and DOJ
30:16
We're going to take tangents upon a tangent upon a tangent. So let's go to Chrome. I think Chrome positive impact on humanity is immeasurable for reasons that you just described. On the technology front, the features that present the competition they created, it's spurred on this wonderful flourishing of web technologies. But anyway, I have to ask you about 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? It's a disaster. And I say that as someone who's been very sympathetic to the antitrust fight, because I do think we have antitrust 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.
Ruby programming language
38:03
The turtles, the dress is all the way down. Okay, what were we talking about? They got there from JavaScript and from you learning how to program. So eventually the big success stories when you built a bunch of stuff with PHP and you were like actually chipping things. Yes.
Beautiful code
45:14
We should say maybe paint the picture of the certain qualities that Ruby has, maybe even compare it to PHP. 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. Yes.
Metaprogramming
1:03:15
We should say that the thing that made you fall in love with this particular programming language is Metaprogramming. 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.
Dynamic typing
1:06:36
I love that we're talking about Ruby so much and what a 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 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. That freedom is a powerful freedom to preserve. 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 because 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.
Scaling
1:13:55
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 mountains of evidence to the contrary. 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. Some of those limits you hit with dynamic typing are actually, by the way, just limits you hit when you write 5 million lines of code. I think the Shopify monolith is about 5 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 5 million, if they had been written in, let's just say Go or Java, would have been 50 or 25. Now, that might have 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; try to understand 25 million lines of code.
Future of programming
1:26:47
We probably argue about this, but I really like working together with AI, collaborating with AI. I would argue that the kind of code you want AI to generate is human-readable, human interpretable. If it's generating pro golf code, it's not a collaboration. So it has to be speaking the human ... it's not just, you're writing the prompts in English, you also want to read the responses in the human-interpretable language at Ruby, right? So that actually is beneficial for AI too. Because you've said that for you the sculptor, the elitist Coco Chanel sculptor, you want on your fancy keyboard to type every single letter yourself with your own fingers. But it's also, the benefit of Ruby also applies once that is written by AI and you're actually doing with your own fingers the editing part, because you can interact with it because it's human interpretable. The paradigm I really love with this was something Elon actually said on one of your shows when you guys were talking about Neuralink, that Neuralink allows the bandwidth between you and the machine to increase. That language, either spoken or written, is very low bandwidth. If you are to calculate just how many bits we can exchange as we're sitting here, it's very slow. Ruby has a much higher bandwidth of communication, revealed, conveys so much more concept per character than most other programming languages do. So when you are collaborating with AI, you want really high bandwidth. You want it to be able to produce programs with you, whether you're letting it write the code or not, that both of you can actually understand really quickly. And that you could compress a grand concept, a grand system into far fewer parts that both of you can understand. Now, I actually love collaborating with AI too. I love chiseling my code, and the way I use AI is in a separate window. I don't let it drive my code. I've tried that. I've tried the Cursors and the Windsurfs and I don't enjoy that way of writing.
Future of AI
1:44:18
Right now, we're probably at peak AI future hype because we see all the promise, because so much of it is real and so many people have experienced it themselves. This mind-boggling thing that the silicon is thinking in some way that feels eerily reminiscent of humans. I'd actually say the big thing for me wasn't even ChatGPT, it wasn't even Claude. It was DeepSeek. Running DeepSeek locally and seeing the think box where it converses with itself about how to formulate the response. I almost wanted to think, is this a gimmick? Is it doing this as a performance for my benefit? But that's not actually how it thinks. If this is how it actually thinks. Okay, I'm a little scared. This is incredibly human how it thinks in this way, but where does that go? So in '95, one of my favorite movies, one of my favorite B movies came out, The Lawnmower Man. Great movie,
Vibe coding
1:50:13
I think one of the big open questions to me is how far you can get with vibe coding, whether an approach for a young developer to invest most of the time into vibe coding or into writing code from scratch. So vibe coding, meaning I'm leaning into the meme a little bit, but the vibe coding, meaning you generate code, you have this idea of a thing you want to create, you generate the code and then you fix it with both natural language to the prompts and manually. You learn enough to manually fix it. So that's the learning process. How you fix code that's generated or you write code from scratch and have the LMS kind of tab, tab, tab, tab, add extra code, like which part do you lean on? I think to be safe, you should find the beauty and the artistry and skill in both, right? From scratch, so there should be some percent of your time just writing from scratch and some percent vibe coding. There should be more of the time writing from scratch if you are interested in learning how to program. Unfortunately, you're not going to get fit by watching fitness videos. You're not going to learn how to play the guitar by watching YouTube guitar videos. You have to actually play yourself. You have to do the sit-ups. Programming, understanding, learning almost anything requires you to do. Humans are not built to absorb information in a way that transforms into skills by just watching others from afar. Now, ironically, it seems AI is actually quite good at that, but humans are not. If you want to learn how to become a competent programmer, you have to program. It's really not that difficult to understand. Now, I understand the temptation and the temptation is there because vibe coding can produce things perhaps in this moment, especially in new domain, you're not familiar with tools you don't know perfectly well that's better than what you could do or that you would take much longer to get at, but you're not going to learn anything.
Rails manifesto: Principles of a great programming language
1:58:45
Yeah. Can we zoom out and look at the vision, the manifesto, the doctrine of Rails? What are some of the things that make a programming language a framework? Great, especially for web development, so we talked about happiness. Yes.
Why managers are useless
2:23:11
That's interesting. Have you noticed yourself changing your mind quite a bit over the years? I would say, "Oh, yes," and then also, "Oh, no," in the sense that there are absolutely fundamental things both about human nature, about institutions, about programming, about business that I've changed my mind on, and then I've also had experiences that are almost even more interesting, where I thought I had changed my mind and I tried it a new way, realized why I had the original opinion in the first place, and then gone back to it. It happens both ways. An example of the later part, for example, was managers at 37 Signals. For the longest time, I would rail against engineering managers as an unnecessary burden on a small or even medium-sized company, and at one point, I actually started doubting myself a little bit. I started thinking like, "Do you know what? Maybe all programmers do need a one-on-one therapy session every week with their engineering manager to be a whole individual."
Small teams
2:32:32
I love this so much on so many levels. Can we just linger on that advice that you've given, that small teams are better? I think that's really less... Less is more. What did you say before? "Worse is better"? Okay, I'm sorry. Worse is better on adoption with technology a lot of times.
Jeff Bezos
2:38:39
How do you protect the small team? Basecamp has successfully stayed small. What's been the dragon you had to fight off? Basically, you make a lot of money, there's a temptation to grow, so how do you not grow? Don't take venture capital.
Why meetings are toxic
2:53:57
There is a temptation for the managers and for the people in the executive layer to do something, which that's something usually means a meeting. And so that's why you say- Yes. Their job is telling other people what to do.
Case against retirement
3:01:43
Yeah. I'd love to ask you about this exchange so you can explain to me the whole saga, but so just a link on that a little bit is, I think there's a notion that success for tech founder is like work for a few years all out and then exit, sell your company for, I don't know, hundreds of millions of dollars. That's success. When it seems in reality, when you look at who the people like you, like really smart, creative humans, who they actually are and what happiness entails, it actually entails working your whole life a little bit. Because you actually love the programming, you love the building, you love the designer and you don't want to exit, and that's something you've talked about really, really eloquently about. So you actually want to create a life, where you're always doing the building and doing it in a way that's not completely taken over your life. Mojito Island is a mirage. It always was. There is no retirement for ambitious people. There is no just sitting back on the beach and sipping a mojito for what, for two weeks before you go damn crazy and want to get back into the action. That's exactly what happens to most people who have the capacity to build those kinds of exits. I've never seen, I shouldn't say never. I've almost never seen anyone be able to pull that off, yet so many think that that's why they're doing it. That's why they're sacrificing everything because once I get to the finish line, I'm golden, I've won, I can retire, I can sit back, I can just relax. And you find out that that kind of relaxation is actually hell. It's hell for creative people to squander their God-given creative juices and capacities. And I was really lucky to read the book Flow by Mihaly Csikszentmihalyi early on [inaudible 03:03:39].
Hard work
3:09:00
You said so many smart things there. Just to pick one, it's funny that sometimes the advice givers, the wisdom givers have gone through all the bullshit, and so there is a degree to which you want to make the mistake. So I think I would still give the advice of you want to have a stretch of your life, where you work too hard, including anything that fails. I don't think you can learn the lessons why that's a bad idea in any other way except by doing it. There is a degree, but of course you don't... I think you should stretch. Should you have to stretch for a decade? I'm not so sure.
Why we left the cloud
3:14:38
Speaking of annoying people on the internet, you got to explain to me this drama. Okay, so what is this guy that said, "Imagine losing to Jira, but boasting they have a couple million dollars per year." So this had to do with this almost now a meme decision to leave the cloud. DHH left the cloud. I think that's literally a meme, but it's also a fascinating decision. Can you talk through the full saga of DHH leaves the cloud, leaving AWS, saving money, and I guess the case this person is making now? Is that we wasted our time optimizing a business that could have been a hundred times bigger if we'd just gone for the moon.
AWS
3:17:48
Yeah. Can we look at the specifics just for people who don't know the story and then generalize to what it means about the role of the cloud in the tech business? So the specifics is you were using AWS S3. We were using AWS for everything. Hey.com launches an entirely cloud app. It was completely on AWS for compute, for databases, for all of it. We were using all the systems as they're best prescribed that we should. Our total cloud bill for Basecamp, our total spend with AWS was I think 3.2 million or 3.4 million at its peak. That's kind of a lot of money, 3. 4 million. I mean we have a ton of users and customers, but still that just struck me as unreasonable. And the reason why it was so unreasonable was because I had the pitch for the cloud ringing in my ears, hey, this is going to be faster. This is going to be easier. This is going to be cheaper. Why are you trying to produce your own power? Do you have your own power plant? Why would you do that? Leave the computers to the hyperscalers. They're much better at it anyway.
Owning your own servers
3:27:07
Is there some pain points to running your own servers? Oh, plenty. There's pain points to operating computers of all kind. Have you tried using a personal computer these days? Half the time, when my kids or my wife have a problem, I go like, "Have you tried turning it just off and on again?" Computers are inherently painful to humans. Owning your own computer though makes some of that pain worth it, there's a responsibility that comes with actually owning the hardware that, to me, at least make the burden of operating that hardware seems slightly more enjoyable. Now, there are things you have to learn, certainly at our scale too. We're not just buying a single computer and plugging it into an Ethernet, we have to have racks and racks of them and you've got to set it up with network cabling and there is some specialized expertise in that but it's not like that expertise is building nuclear rockets, it's not widely distributed.
Elon Musk
3:33:19
By the way, speaking of teams, XAI, Tesla are large companies but all those folks ... I don't know what it is about. You said Jeff is really good at finding good people, at seeing strength in people. Elon is also extremely ... I don't know what that is. Actually, I've never actually seen, maybe you could speak to that, he's good at finding greatness. I don't think he's finding as much as he's attracting. He's attracting the talent because of the audaciousness of his goals and his mission, the clarity by which he states it. He doesn't have to go scour earth to find the best people, the best people come to him because he is, talking about Elon here, one of the singular most invigorating figures in both the same order of the universe here, haters and lovers. He's having such an impact at such a scale that of course he's got to have literally millions of people think he's the worst person in the world and he's also going to have millions of people thinking he's the greatest gift to humanity. Depending on the day, I'm somewhere in between but I'm more on the greatest gift to humanity end of the scale than I'm on the other end of the scale. And I think that really inspires people in a way that we've almost forgotten that that level of audacity is so rare that, when we see it, we don't fully know how to analyze it.
Apple
3:43:01
Since you mentioned Apple, I have to ask, somebody in the internet submitted the question. Does DHH still hate Apple? I believe the question is. So, there was a time when Basecamp went to war with Apple over the 30%, can you tell the saga of that battle? Yes, but first I'll tell you how I fell in love with Apple which was all the way back in also early 2000s. When Microsoft was dominating the industry in a way we now see Apple and Google dominate mobile phones, Microsoft was just everything when it came to personal computers and I really did not like the Microsoft of the '90s. The Microsoft of the '90s was the cut off the air supply to Netscape kind of characters, was the Bill Gates sitting defiant in an interview with the DOJ asking about what the definition of what is and just overall unpleasant, I think. You can have respect for what was achieved but I certainly didn't like it. And as we've talked about, I came begrudgingly to the PC after Commodore fell apart and I couldn't continue to use the Amiga so I already had a bit of a bone to pick with PCs just over the fact that I love my Amiga so much.
Tim Sweeney
3:54:48
What do you think about Tim Sweeney's victory with Epic over Apple? I think it is incredible and the entire developer ecosystem, not just on iOS but on Android as well, owe Epic, Tim Sweeney and Mark Rein, an enormous debt of gratitude for taking on the only battle that has ever inflicted a serious wound on Apple in this entire sordid campaign of monopoly enforcement and that is Epic's fight versus them. Tim recently revealed that it has cost well over $100 million in legal fees to carry on this battle against Apple. We, for a hot moment, considered suing Apple when they were threatening to kick us out. We shopped the case around with a few law firms and perhaps, of course, they would tell us you have a good case, they're trying to sell a product here, but they would also tell us it's going to cost a minimum of $10 million and it's going to take five to seven years through all the appeals.
Fatherhood
4:06:22
I have to come back to it. You mentioned it earlier, you're a parent. Can you speak to the impact that becoming a father has had on your life? I think what's funny about fatherhood is that, for me, I wasn't even sure it's something I wanted. It took meeting the right woman and letting her convince me that this was the right idea before we even got started. I didn't have starting my own family on the list of priorities in my late 20s or even early 30s. It was really the impetus of meeting my wife, Jamie, and her telling me, "This is what I want. I want to have a family, I want to get married, I want to have kids. I want to have three." And me going for a second like, "Whoa, whoa, whoa." And then, "All right, let's do it." And I think that's the kind of happy accident where some parts of my life have been very driven, where I knew exactly what I wanted and how to push forward to it, and what the payoff was going to be. But when it comes to having a family, that always felt like a very fuzzy, abstract idea that, sure, someday maybe. And then it became very concrete because I met a woman who knew what she wanted.
Racing
4:32:04
All right. Like you mentioned, you like to race cars and you do it at a world-class competitive level, which is incredible. So how'd you get into it? What attracts you to racing? What do you love about it? The funny thing about getting into racing is I did not get my driver's license until I was 25. I grew up in Copenhagen, Denmark where the tax on cars is basically over 200%. So you pay for three cars and you get one, and I didn't even have the money for one car, let alone three. So I could not afford a car growing up. We did not have a car growing up, but Copenhagen is a nice city to be able to get around on a bike or with a bus or as I did for a long period of time, on rollerblades.
Cars
4:59:08
Ridiculous question, what's the greatest car ever made, or maybe what's the funnest one to drive? The greatest car for me of all time is the Pagani Zonda.
Programming setup
5:04:26
I got to ask you about the details of your programming setup, the IDE, all that kind of stuff. Let's paint the picture of the perfect programming setup. Do you have a programming setup that you enjoy? Are you very flexible? How many monitors? What kind of keyboard? What kind of chair? What kind of desk? It's funny because if you'd asked me, let's see, a year and a half ago, I would've given you the same answer as I would've given anyone for basically 20 years. I want a Mac. I like the Magic Keyboard. I like the single monitor. Apple makes an awesome 6K 32-inch XDR screen that I still haven't found anyone who've beaten that I still use. Even though I switched away from Apple computers, I still use their monitor because it's just fantastic. But I've always been a single screen kind of guy.
Programming language for beginners
5:19:35
I would 100% start with Ruby. It is magic for beginners in terms of just understanding the core concepts of conditionals and loops and whatever, because it makes it so easy. Even if you're just making a shell program that's outputting to the terminal, getting hello-world running in Ruby is basically puts, P-U-T-S, space, start quotes, "Hello world," end quotes, you're done, right? There's no fluff, there's nothing to wrap it into. There are other languages that does that, especially the Perl or Python would be rather similar, but Go would not, Java would not. There's a lot of other languages that have a lot more ceremony and boilerplate. Ruby has none of it. So it's a wonderful starting language.
Open source
5:32:53
I have to ask you about open source. What does it take to run a successful open source project? You've spoken about that it's a misconception that open source is democratic. It's actually meritocratic. That's a beautiful way to put it. So there often is a benevolent dictator at the top often. So can you just speak to that, having run successful open source projects yourself and being a benevolent dictator yourself? Which is going to be a bit of a biased piece of evidence here, but-
WordPress drama
5:41:46
So I'm glad you drew some hard lines. Here is a good moment to bring up what I think is maybe one of the greatest open source projects ever, WordPress. And you spoke up in October 24 about some of the stuff that's been going on with WordPress's founder, Matt Mullenweg, in a blog post, "Open source royalty and mad kings," is a really good blog post on just the idea of Benevolent Dictators For Life, this model for open source projects. And then the basic implication was that Matt, as the BDFL of WordPress has lost his way a bit with this battle with WP Engine. So I should also say that I really love WordPress. It brings me joy. I think it's a beacon of what open source could be. I think it's made the internet better, a lot of people to create wonderful websites. And I also think, now you might disagree with this, but from everything I've seen, WP Engine just gives me bad vibes. I think they're not the good guy in this. I don't like it. I understand the frustration, I understand all of it, but I don't think that excuses the behavior. There is a bit of... See this kind of counter to a little bit what you said, which is when you have an open source project of that size, there is a bit of a... When you're the king of a project of a kingdom that large, there's a bit of responsibility. Anyway, could you speak maybe, to your empathy of Matt and to your criticism? And maybe paint a path of how he and WordPress can be winning again.
Money and happiness
5:53:03
Hope
6:01:56
What gives you hope about the future of this whole thing we have going on here, human civilization? I find it easier to be optimistic than pessimistic because I don't know either way. So if I get to choose, why not just choose to believe it's going to pan out? "We suffer more in our imagination than we do in reality," that's one of the quotes out of Stoicism. And I also think we have a tendency, a lot of humans have a tendency to be pessimistic in advance for things they don't know how it's going to pan out. Climate change, for example, is making a lot of people very anxious and very pessimistic about the future. You know nothing. 40 years ago, we thought the problem was that the planet was going to be too cool. I happen to believe that it's probably correct that the planet is getting too hot and that CO2 has something to do with it. Whether we have the right measures to fix it in time, if that's even possible or not, is completely up in the air and we don't know.