Transcript for DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting | Lex Fridman Podcast #474

This is a transcript of Lex Fridman Podcast #474 with DHH. The timestamps in the transcript are clickable links that take you directly to that point in the main video. Please note that the transcript is human generated, and may have errors. Here are some useful links:

Table of Contents

Here are the loose “chapters” in the conversation. Click link to jump approximately to that part in the transcript:

Episode highlight

DHH (00:00: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.
(00:00:26) 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

Lex Fridman (00:01: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.
(00:01:57) 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

Lex Fridman (00:02: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?
DHH (00:02:53) 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?”
Lex Fridman (00:03:53) The disappointment.
DHH (00:03:54) This is not a Commodore 64. But it was a computer. So I 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 two games. One was this Frogger game where you had to escape from underground. It was actually kind of dark, like this frog, you’re trying to get it out from underground. 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 doesn’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.
(00:04:46) So I tried to do that and it would take like two hours to print this game into 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 of English, I was born in Denmark. So I was really trying to get into it because I wanted all these games and I didn’t have the money to buy them. 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, and after that I 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 around six, seven years old. And what’s funny is I remember these fragments. I remember not understanding the purpose of a variable.
(00:05:34) If there’s a thing and you assign something, why would you assign another thing to it? So for some reason, I understood constants. Constants made sense to me, but variables didn’t. Then maybe I’m 11 to 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 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 company that produced the Commodore 64 and I got the Amiga 500 I think in ’87.
Lex Fridman (00:06:16) Look at this sexy thing. That is a sexy machine right there.
DHH (00:06:19) 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. There 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 do you know what’s funny? The reason I wanted to try it again was I remembered the first time I tried to learn and then there was this programming language that was literally called EasyAMOS, like the easy version of AMOS. I’m like, if it’s easy AMOS, how hard can it be? I’ve got to be able to figure this out.
(00:07:04) And this time I tried harder. I got into conditionals, I got into loops, I got into all these things and still, I couldn’t do it. And on the second attempt, I really got to the point of maybe I’m not smart enough. Maybe it’s too much math. 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 I’m not that person. I’m not the math geek who’s going to figure it all out. So after that attempt with EasyAMOS and failing to even get… I don’t even think I completed one even very basic game. I thought, programming’s just not for me. I’m going to have to do something else. I still love computers. I still love video games.
(00:07:53) I actually at that time had already begun making friends with people who knew how to program, who weren’t even programming EasyAMOS, they were programming with freaking Assembly. And I would sit down and just go, 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 different-
Lex Fridman (00:08:34) On that thing?
DHH (00:08:36) On this thing. They would make these little 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. Not four Ks of resolution. Four kilobytes 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 disk in the mail, like the 3.5s. And 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 kind of didn’t have any skills to contribute. And that’s how I got into running BBSs.
(00:09:22) 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 in to my tiny room.
Lex Fridman (00:09:59) Nice.
DHH (00:10:00) Which is 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 having three phone lines into their tiny little bedroom? What’s going on here? Why are all these modems blinking red and black and making funny sounds?
Lex Fridman (00:10:23) Did your parents know?
DHH (00:10:24) They did and they didn’t. They knew I had the phone lines. They knew I had the computer. I don’t think they really understood that I was trading pirated software that was both illegal and whatever else was going on.
Lex Fridman (00:10:38) Oh, we should probably say that in Europe, maybe you can comment on this, especially in Eastern Europe, but Europe in general, piracy I think was more acceptable than it was in the United States. I don’t know, maybe it’s just my upbringing-
DHH (00:10:52) Even that conversation wasn’t present. I never spoke to anyone growing up in Denmark-
Lex Fridman (00:10:56) That piracy is wrong.
DHH (00:10:57) Who had any moral qualms whatsoever about piracy. It was just completely accepted that you’re a kid, you want a lot of games, you don’t have a lot of money. What do you do? You trade. Some people would occasionally buy a game. I mean, I once bought a Sega Master system and I bought one game because that was what I could afford. I got After Burner II, I don’t know if you’ve ever played that game. It’s a pretty bad implementation on the Sega Master System, but it was like 600 crowners.
(00:11:28) And I was making money at that time doing newspaper delivery. I had to do that for a month to afford one game. I liked video games way too much to wait a month just to get one game. So piracy was just the way you did it, and that was how I got into running this bulletin board system, being part of the demo scene, being part of the piracy scene to some extent. And then also at some point realizing, oh, you can actually also make money on this and this can fund buying more phone lines and buying more modems and buying more Amigas. Oh yeah, that was one of the demo parties. These were amazing things.
Lex Fridman (00:12:04) What am I looking at?
DHH (00:12:06) Isn’t that amazing?
Lex Fridman (00:12:06) Look at all those CRT monitors.
DHH (00:12:08) All these CRT monitors. Again, when I was 14, I don’t understand fully why my parents allowed this, but I traveled from Copenhagen, the capital of Denmark to [inaudible 00:12:20], this tiny little town in Jutland on the train with a bunch of dudes who were late teens, in their twenties. I’m 14 years old. I’m lugging my 14-inch CRT monitor with my computer in the back to go to the party. That was what it was called. That was the biggest demo scene party at that time and it was exactly as you see in that picture, thousands of people just lining up with their computers, programming demos all day long and trading these things back and forth.
Lex Fridman (00:12:48) That’s kind of awesome. Not going to lie. It’s a little ridiculous.
DHH (00:12:52) It’s totally awesome, and I miss it in ways where the internet has connected people in some ways, but the connection you get from sitting right next to someone else who has their own CRT monitor, who’s lugged at halfway around the country to get there is truly special because it was also just this burst of creativity. You’re constantly running around, you’re constantly surrounded by people who are really good at what they could do, they’re really good at programming computers. It’s infectious. It was part of that pang I felt then going like, oh man, why can’t I figure this out? I mean, why can’t I even figure out EasyAMOS? It’s kind of frustrating.
Lex Fridman (00:13:28) But on your third attempt, you were a little more successful.
DHH (00:13:30) So third attempt is when I start getting it. This is when I start helping out, let’s say, building things for the internet. So around ’95 I think it is, or ’96, I discovered the internet. Actually in ninth grade, that was my first experience. I went to some university in Denmark and in ninth grade we had this excursion and they sat us down in front of a computer and the computer had Netscape Navigator, the first version, or maybe it was even the precursor to that, and they had a text editor and us kids [inaudible 00:14:06] hey, build something on the internet. And it was just HTML and the first thing you do is like, oh, I can make the text blink by just putting in this tag and saving it? That moment, that was actually when I reawakened the urge to want to learn to program because I got a positive experience.
(00:14:23) All the other experiences I had with programming was I’d spend hours typing something in, I click run and it wouldn’t work, and I’d get an error message that made no sense to me as a kid either at six or seven or at 12. And here I am sitting in front of a computer connected to the internet and I’m making text blink. I’m making it larger. I’m turning it into an H1 or an H2. And these guys out here, we just did it for like an hour and a half and suddenly I go, oh, I can make things for the internet that someone in Germany can be able to access and see, and I don’t have to ask anyone for permission? This is super cool. I’ve got to do more of this. So I got into the internet. I got into working with HTML, and I still had all these friends from these demo parties, and I started working with them on creating gaming websites.
(00:15:11) I’d rather buy the video games, I’d review them. This was another good way of getting new video games was to walk down to some store and say like, hey, I’m a journalist. I’m like this fifteen-year-old kid and they’re looking at me. “You’re a journalist?” “Yeah, can I borrow some games?” Because this was when games moved on to the PlayStation and these other things. You couldn’t just as easily pirate, at least not at first. So I went down there, did all that, and that started the journey of the internet for me. I started working on these gaming websites, working with programmers, figuring out that I could do something, I could work on the HTML part.
(00:15:44) It’s not really programming, but it kind of smells like it. You’re talking to a computer, you’re making it put text on the screen and you’re communicating with someone halfway around the world. So that became my pathway back into programming, and then slowly I picked up more and more of it. First website I did with someone, one of these programmers from the demo scene that was dynamic was asp.net. It wasn’t even actually called .net. That was what we started on, and then we moved on to PHP and PHP was when I finally got it, when it finally clicked, when conditionals and loops and variables and all of that stuff started to make sense enough to me that I thought, I can do this.
Lex Fridman (00:16:26) So would it be fair to say that we wouldn’t have DHH without PHP and therefore you owe all of your success to PHP?
DHH (00:16:33) A hundred percent, that’s true. And it’s even better than that because PHP to me didn’t just give me a start in terms of making my own web applications. It actually gave me a bar. In many ways I think the pinnacle of web developer ergonomics is late ’90s PHP. You write this script, you FTP it to a server and instantly it’s deployed. Instantly it’s available. You change anything in that file and you reload, boom, it’s right there. There’s no web servers, there’s no setup. There’s just an Apache that runs mod PHP, and it was essentially the easiest way to get a dynamic web page up and going, and this is one of the things I’ve been chasing that high for basically the rest of my career. It was so easy to make things for the internet in the mid to late ’90s.
(00:17:26) How did we lose the sensibilities that allowed us to not just work this way but get new people into the industry to give them those success experiences that I had adding a freaking blink tag to an HTML page, FTPing a PHP page to an Apache web server without knowing really anything about anything? Without knowing anything about frameworks, without knowing anything about setup. All of that stuff have really taken us to a place where 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.
(00:18:06) 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. Now, that’s a bit of a character. There’s more to it and there’s things you can learn for more sophisticated ways of thinking about this, but there’s still an ideal here, which is why I was so happy you had Pieter Levels on because he still basically works like this. And I look at that and go, man, that’s amazing.
Lex Fridman (00:18:39) Yeah, you’re chasing that high. He’s been high all along.
DHH (00:18:42) Yes.
Lex Fridman (00:18:43) Using PHP, jQuery and SQLite.
DHH (00:18:47) I think it’s amazing because he’s proving that this isn’t just a nostalgic dream. He’s actually doing it. He’s running all these businesses. Now, some of that is, as he would admit up first upfront, is that he’s just one guy. And you could do different things when you’re just one guy. When you’re working in a team, when I started working on a team, when I started working with Jason Fried on Basecamp, we at first didn’t use version control together.
(00:19:16) I used version control for myself, and then I thought, do you know what? Designers, they’re probably not smart enough to figure out CBS and therefore I was just like, no, no, no, you just FTP it up. You just FTP it. They knew how to do FTP. And then after the third time I had overwritten their changes I was like, goddamn it, I guess I’ve got to teach Jason CBS to not do that again. But I think there’s still way more truth to the fact that we can work the way we did in the ’90s, work the way Pieter works today even in the team context, and that we’ve been far too willing to hand over far too much of our developer ergonomics to the merchants of complexity.

JavaScript

Lex Fridman (00: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.
DHH (00:20:21) 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.
(00:21:10) I mean, I was there, 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, which is the JavaScript scene. And I don’t say that as someone who hates JavaScript. I mean, I often joke that JavaScript is my second favorite program language. It’s a very distant second. 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 flak. People add a string of two plus a one and it gives something nonsense, and I just go, yeah, but why would you do that? Just don’t do that. The language is actually quite lovely, especially the modern version.
(00:22:02) 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. It 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 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, 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.
(00:23:14) 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, 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’ve got to get with the new program, we’re completely rewriting everything for the [inaudible 00:24:07] time and anything you’ve learned in the framework you’ve been spending the last amount of time on, it’s all useless. You’ve got to throw everything out and you’ve got to start over. Why aren’t you doing it stupid idiot?
Lex Fridman (00:24:18) 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 are we past that dark age?
DHH (00:24:29) 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 because 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? 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 to 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 in to 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 was where all the billionaires were being minted. This was where the Facebook’s 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 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 configurator.
(00:26:41) 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 want to give it the bold case here, which was that some of that 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 could just write text files, send them to a browser, and you have an incredible development-
Lex Fridman (00:27:25) And we should also say that it can kind of be broken, at least the HTML, but even the JavaScript could be a little bit broken and it kind of still works. Like maybe it half-ass works, but just the amount of mess of smelly code that a browser has to deal with is insane.
DHH (00:27:44) This is one of the hardest problems in computing today 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. The webpage I did in ninth grade would render on a modern browser today, 30 years later.
Lex Fridman (00:28:10) That’s crazy.
DHH (00:28:11) 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 had 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. I’ve supported that project. I would encourage people to look into that. It’s really a wonderful thing. It’s staffed by a bunch of people who worked on other browser projects in the past.
Lex Fridman (00:28:57) Truly independent web browser.
DHH (00:28:59) We really need that. But I can hold that thought in my head at the same time I hold the thought in my head that Google Chrome was pivotal to the web surviving as the premier web development platform. If it had not been for Google and their entire business depending on a thriving open web, Apple, Microsoft I think would’ve been just as fine to see the web go away to disappear into being something that’s just served native mobile applications and native desktop applications that they could completely control. So I have all sorts of problems with Google, but it’s not Chrome. Chrome is a complete gift to web developers everywhere, to the web as a development platform, and they deserve an enormous amount of credit I think for that. Even if it’s entangled with their business model and half of Chrome is code that spies on you or informs targeted ads and a bunch of things I’m not a big fan of, I can divorce that from the fact that we need champions in the corner of the web who have trillions of dollars of market cap value riding on the open web.

Google Chrome and DOJ

Lex Fridman (00: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?
DHH (00:30:47) 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.
(00:31:44) 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 monopoly fight, that there are real problems and we should be focusing on the premier problems first like the toll booths on our mobile phones. There are far bigger problems. 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, their ad monopoly maybe, or the shenanigans they’ve done in controlling both sides of the ad ledger, that they both control the supply and the demand.
(00:32:45) There are problems. Chrome, isn’t it. And you end up making the web much worse. And this is the thing we’ve always got to remember when we think about legislation, when we think about 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. 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.
Lex Fridman (00:33:29) Yeah, you said that the cookie banner is a monument for why Europe is losing, is doing the worst of all the regions in tech.
DHH (00:33:40) It’s a monument to good intentions leading straight to hell, and Europe is actually world-class in good intentions leading straight to hell.
Lex Fridman (00:33:53) 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-
DHH (00:33:53) Just on a…
Lex Fridman (00:34:00) … over. You don’t actually ever get to the web page.
DHH (00:34:03) 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, 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.
(00:34:50) There’s this one piece of legislation that’s now I think 10 or 12 years old. It’s 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’ll still see a cookie banner. No one in the universe is safe from this nonsense.
Lex Fridman (00:35:33) Probably the interface on the rocket.
DHH (00:35:36) It’d be slower. You have basically 150 second ping time, so it’ll take you 45 seconds just to get through the cookie banners from Mars.
Lex Fridman (00:35:46) All right, let’s walk back up the stack of this 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.
DHH (00:36:03) It is. If I was going to Steelman the other side just for a half second, 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.
(00:36:27) Now, I don’t buy that, and the reason I don’t buy that is because on Android, you are actually allowed to ship a different browser that has a browser engine that’s not the same as Chrome. Unlike an 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.
(00:36:57) 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 One unmerits. 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.
Lex Fridman (00:37:21) And by the way, we’ve never mentioned Edge. Edge is also a good browser.
DHH (00:37:26) Because it’s also Chrome in a dress.
Lex Fridman (00:37:27) But it never gets the love. I don’t think I’ve ever used Bing, and I’m sure Bing is really nice.
DHH (00:37:34) Maybe you have, because you know what is Bing in a dress?
Lex Fridman (00:37:36) What?
DHH (00:37:37) DuckDuckGo.
Lex Fridman (00:37:37) What?
DHH (00:37:38) Which is actually the search engine that I use. DuckDuckGo gets its search results from Bing, or at least it used to. If they changed that, that would be news to me.
Lex Fridman (00:37:47) Well, maybe everything is just a wrap or a dress. Everything is wearing a dress underneath. There’s some other turtles-
DHH (00:37:47) There’s some of that.

Ruby programming language

Lex Fridman (00:37:56) 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.
DHH (00:38:14) Yes.
Lex Fridman (00:38:15) And that’s when the Ruby story came. So your big love affair with programming began there. So can you take me there? What is Ruby? Tell the story of Ruby. Explain Ruby to me.
DHH (00:38:28) 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’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. 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.
(00:39:31) 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 a question on the internet, and I had sent him the answer and he was asking me PHP, and I’d 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? 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.
(00:40:25) Jason would do the design, 37signals would do the design. I would bring the programming PHP. And after we 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 an 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 got to add someone to the project. They don’t have the emails, they don’t have the context. You send them, “Where’s the latest file?” “Oh, I’ve uploaded it on the FTP. It’s like final, final V06 2.0.” Right? That’s the one to get. It’s just a mess, a beautiful mess in some ways. It’s a mess that still runs the vast majority of projects to this day. Email is the lowest common denominator. That’s wonderful.
(00:41:13) 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 going to run a seminar teaching you how to use the system. I’m just going to give you the login code. You’re going to jump into it. So that’s Basecamp. 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?”
(00:42:06) I had free reins. At that time I’d been reading IEEE magazine and a couple of other magazines back from the early 2000s where Dave Thomas and Martin Fowler had been writing about programming patterns and how to write better code. These two guys in particular were both using Ruby to explain their concepts because Ruby looked like pseudocode. Whether you were programming in C or Java or PHP, all three constituencies could understand Ruby because it basically just reads like English. So these guys were using Ruby to describe the concepts, and first of all, I would read these articles for just the concepts they were explaining and I’d be like, “What is this program language?” I mean, I like the concept you’re explaining, but I also want to see the programming language. Why haven’t I heard of this?
(00:43:02) 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, 10 years later, picking up what seems like this hidden gem that’s just laying in obscurity and plain sight. 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 very different. First of all, where are all the semicolons? I’d been programming in PHP, in ASP, I’d even done some Pascal. I’d looked at some C. There were semicolons everywhere.
(00:44:05) That was the first thing that struck me is where are the damn semicolons? And 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. 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 going to give myself two weeks. I’m going to write a proof of concept where I talked to a database, I pulled some records, I format them a bit, and I display them on an HTML page. Can I figure that out in a couple of 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. How is this even possible?

Beautiful code

Lex Fridman (00: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.
DHH (00:45:28) Yes.
Lex Fridman (00:45:29) PHP. I mean that-
DHH (00:45:29) Yes, there’s line noise.
Lex Fridman (00:45:31) Line noise.
DHH (00:45:31) That’s what I like to call it.
Lex Fridman (00:45:31) Line noise. Line noise. That’s such a beautiful phrase. So there’s all these things that look like programs, and with Ruby, I mean there’s some similarities in Python there. It just looks kind of like natural language. You can read it normally,
DHH (00:45:47) Here’s a wild loop that does five iterations. You can literally type the number five, dot, now I’m calling a method under number five. By the way, that’s one of the beautiful aspects of Ruby that primitives like integers are also objects and you can call five dot times start brackets. Now you’re iterating over the code in that bracket five times. That’s it.
Lex Fridman (00:46:15) Okay, that’s nice.
DHH (00:46:16) That’s not just nice, that’s exceptional. There’s literally no other programming language that I know of 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.
Lex Fridman (00:46:32) Wow. That’s a really nice… Well, 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.
DHH (00:46:41) Ruby’s full of that. So let me dive into a couple of examples 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. One of the one ways they’re very different is aesthetically.
(00:47:12) 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 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, underscore, two, init, underscore underscore, parentheses start, self, comma, and then the first argument.
Lex Fridman (00:48:03) Yeah, the whole self thing. Yeah.
DHH (00:48:06) I look at that and go, “I’m sorry I’m out. I can’t do it.” 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?
Lex Fridman (00:48:29) Hey, you’re making me… You know where you’re talking about my marriage or something like this, and I’m not realizing I’ve been in a toxic relationship all along yet. I just get used to it.
DHH (00:48:39) That to me by the way, was the magic of Ruby.
Lex Fridman (00:48:39) That’s the problem.
DHH (00:48:41) It opened my eyes to how beautiful programs could be. I didn’t know. I’d been working in ASP, I’d been working in PHP. I didn’t even have the concept that aesthetics, beautiful code was something we could optimize for. That’s something we could pursue, and even more than that, that we could pursue it above other objectives. That Ruby is as beautiful as it is, it’s not an accident and it’s not easy. Ruby itself is implemented in C. It’s very difficult to parse Ruby code because Ruby is written for humans and humans are messy creatures. They like things in just the right way. I can’t fully explain why the underscore, underscore, init, underscore, underscore make me repulse, but it does. And when I look at the Ruby alternative, it’s really instructive. So it’s def, same part, D-E-F space, initialize, parentheses, not even parentheses if you don’t need to call it within the arguments, there’s not even a parentheses.
(00:49:44) That in itself is actually also a major part. If the human doesn’t need the additional characters, we’re not just going to put them in because it’d be nicer to parse for the computer. We’re going to get rid of the semicolons, we’re going to get rid of the parentheses, we’re going to get rid of the underscores, we’re going to get rid of all that ugliness, all the line noise and boil it down to its pure essentials and at the same time, we’re not going to abbreviate. This is a key difference in the aesthetics between Ruby and Python as well. Init is shorter to type, it’s only five characters. Initialize is a lot longer, but it looks a lot better and you don’t type it very often, so you should look at something pretty. If you don’t have to do it all the time, it’s okay that it’s long.
(00:50:29) Those kinds of aesthetic evaluations are rife all over the Ruby language. But let me give you an even better example. The if conditional, that’s the bedrock of all programming languages. They have the if conditional, if you take most programming languages, they’ll have if, that’s basically the same in almost every language, space, start parentheses, we all do that. And then you have perhaps, let’s say you’re calling a object called user. is admin, close parentheses, close parentheses, start brackets, and here’s what we’re going to do if the user’s an admin, right? That would be a normal programming language. Ruby doesn’t do it like that. Ruby boils almost all of it away. We start with the if. Okay, that’s the same, no parentheses necessary because there’s no ambiguity for the human to distinguish that the next part is just a single statement. So you do if, space, user dot admin, question mark, no open brackets, no parentheses, no nothing. Next open line, here’s your conditional.
(00:51:45) That question mark means nothing to the computer, but it means something to the human. Ruby put in the predicate method style purely as a communication tool between humans. It’s actually more work for the interpreter to be able to see that this question mark is there. Why is this question mark in here? Because it just reads so nicely. If user admin question mark, that’s a very human phrase, but it gets better. You can turn this around. You can have your statement, you want to execute before the conditional. You can do user.upgrade, say you’re calling an upgrade method on a user, space, if, space, user.admin question mark. We do the thing, if the thing is true, instead of saying if the thing is true, do the thing. But it gets even better. This is why I love this example with the conditional because you can keep diving into it. So let’s flip it around. user.downgrade if exclamation point, not user.admin, that’d be a typical way of writing it. Ruby goes that exclamation point is light noise. Why do we have if and then an exclamation point that’s ugly? We could do user.downgrade unless user.admin question mark.
Lex Fridman (00:53:16) That is awesome.
DHH (00:53:17) That to me is an encapsulation of the incredible beauty that Ruby affords the programmer through ambiguity that is only to serve the human reader and writer. All of these statements we’ve just discussed, they’re the same for the computer. It’ll compile down to the same C code. They’ll compile down to the same assembly code. It makes no difference whatsoever. In fact, it just makes it harder to write an interpreter. But for the human who gets to choose whether the statement comes before the conditional or the predicate method has, it’s just incredible. It reads like poetry at some point.
Lex Fridman (00:53:55) It’s also incredible that one language designer is creating that. Guido van Rossum also. It’s like one person gets to make these extremely difficult decision because you have to think about how does that all get parsed and you have to think about the thousands, if it’s a popular language that millions of people that end up using this and what they feel, what that question mark for the if statement, what does that feel like of the user?
DHH (00:54:24) That’s what Matz thought about because he started his entire mission off a different premise than almost every programming language designer that I’d heard at least articulate their vision, that his number one goal was programmer happiness. That his number one goal was the affordances that would allow programmers to articulate code in ways that not just executed correctly, but were a joy to write and were a joy to read. That vision is based on a fundamentally different view of humanity. There’s no greater contrast between Matz and James Gosling, the designer of Java. I wanted to listen to James talk about the design of Java. Why was it the way it was? Why was it so rigid? He was very blunt about it, which by the way, I really appreciate and I think Gosling has done a tremendous job with Java, but his view of humanity is rather dark.
(00:55:24) His view of humanity was programmers at the average are stupid creatures. They cannot be trusted with sophisticated programming languages because they’re going to shoot their foot off or their hand off. And that would be kind of inconvenient to the regional development office of a mid-tier insurance company writing code that has to last for 20 years. Now it’s actually a very Thomas Sowell view of constrained capacity in humans that I’ve come to appreciate much later in life. But it’s also a very depressing view of programmers that there are just certain programmers who are too dumb to appreciate code poetry. They’re too ignorant to learn how to write it well. We need to give them a sandbox where they just won’t hurt themselves too much.
(00:56:20) Matz went the complete opposite direction. He believes in humanity. He believes in the unlimited capacity of programmers to learn and become better so much so that he’s willing to put the stranger at his own level. This is the second part I truly appreciate about Ruby. Ruby allows you to extend base classes. You know how we just talked about five dot times is a way to iterate over a statement five times. That five is obviously a base class, it’s a number. Do you know what? You can add your own methods to that? I did extensively. In Rails, we have something called active support, which is essentially my dialect of Ruby for programming web applications. I’ll give you one example. I’ve added a method called Days to the Number. So if you do five .days, you get five days in seconds because seconds is the way we set cache expiration times and other things like that. So you can say cache expires in five .days and you’re going to get whatever-
Lex Fridman (00:57:34) That’s nice.
DHH (00:57:35) … five times, 24 times 60 times 60 is or whatever the math is, right? Very humanly readable. In a normal programming language, you would type out the seconds and then you would have a little comment above it saying this represent five days. In Ruby, you get to write five days. But even better than that, Matz didn’t come up with it. Matz didn’t need the five days. I needed that because I needed to expire caches. I was allowed by Matz to extend his story with my own chapters on equal footing such that a reader of Ruby could not tell the difference between the code Matz wrote and the code that I wrote.
(00:58:16) He trusted me as a complete stranger from Denmark who he’d never met to mess with his beautiful story. That level of trust is essentially unheard of. I know there are other program languages that allow things with macros and so forth, but none do it in a way like Ruby does it. None does it with an articulated vision of humanity, a trust in humanity like Matz does. That is the opposite end of the spectrum of Java.
Lex Fridman (00:58:46) Yeah, I mean for my aesthetic sensibilities, just the way you described five .days, that’s really pleasant to me. I could see myself sitting alone sleep-deprived and just writing that. It’s just an easy thing. You can write it in a long way with a comment. You can write in multiple lines, you could do… And now with AI, I’m sure it’s going to generate it correctly, but there’s something really pleasant about the simplicity of that. I’m not sure what that is, but you’re right. There is a good feeling there. I’m sure we’ll talk about happiness from all kinds of philosophical angles, but that is what happiness is made of. That little good feeling there.
DHH (00:59:29) Exactly. It’s the good feeling that come out of a concept compressed to its pure essence. There’s nothing you can take away from that statement that’s superfluous.
Lex Fridman (00:59:39) But see, I also want to push back a little bit because it’s not… Because I also programed in Perl a bunch just to be cool. So it’s not all about compression.
DHH (00:59:51) No, you can compress it too far. Perl golf is a thing where you can turn programs into something that’s unreadable for humans. Now the great thing about Perl was that it came out before Ruby. Matz was a great student of Wall, was a great student of Perl, was a great student of Python and Smalltalk and Lisp. He took inspiration from all of these prior attempts at creating good programming languages and really edited down the very best bits into this. So he was able to learn from his lessons. But what I found incredible about Ruby is that here we are, 2025, Ruby has been worked on for over 30 years and essentially the first draft is 90% of what we’re still using.
(01:00:38) There was almost a sense of divine inspiration possible in wherever Matz was writing that initial version of Ruby that transcended time to such a degree that no one has still even begun to reach it. This is the other thing I always find fascinating. I generally believe in the efficient market theory that if someone comes up with a better mousetrap or better idea, others, they’ll eventually copy them to such an extent that perhaps the original mousetrap is no longer even remembered. No one has been able to copy that essence of Ruby. They borrowed elements and that’s totally fine, but Ruby still stands taller than everyone else on these metrics, on this trust in humanity and programmers.
Lex Fridman (01:01:21) And we should also say maybe the perfect programming language is that metric, and then there’s the successful language and those are often different. There’s something wonderful about the Brendan Eich story of creating JavaScript. There’s something truly beautiful about the way JavaScript took over the world. I’ve recently got to visit the Amazon jungle and just one of my favorite things to do is just to watch the ants take over anything, everything. And it’s just like it’s a nice distributed system. It’s a messy thing that doesn’t seem to be ordered, but it just works and the machinery of it.
DHH (01:01:58) Worse is Better. I mean that’s actually the name of a pattern in software development and other ways of how is the pattern of Linux. Linux was quantifiably worse than I think it was Minix at the time, other ways of it that were more cathedral, less bizarre, and it’s still want. That there’s something to it that the imperfections can help something go forward. It’s actually a trick I’ve studied to the degree that I now incorporated in almost all open source that I do. I make sure that when I release the first version of any new thing I work on, it’s a little broken. It’s a little busted in ways that invite people to come in and help me. Because there’s no easier way to get the collaboration of other programmers than to put something out that they know how to fix and improve.
Lex Fridman (01:02:49) Yeah, that’s awesome.
DHH (01:02:49) But Ruby is somehow or was at least a little bit different in that regard. Not in all regards. Matz got the ethos of the language, the design of language just right. But the first versions of Ruby were terribly slow. It’s taken, I mean hundreds of man-years to get Ruby to be both this beautiful yet also highly efficient and really fast.

Metaprogramming

Lex Fridman (01:03:15) We should say that the thing that made you fall in love with this particular programming language is Metaprogramming.
DHH (01:03:21) 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.
Lex Fridman (01:03:28) Yeah, please.
DHH (01:03:29) Metaprogramming is essentially a version of the five .days. You get to add keywords to the language. Active record 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 descends from active record base, 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 underscore many space colon comments.
(01:04:15) 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 use of class, that’s Metaprogramming.
(01:04:49) 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. This is one of those early examples where you can do, user has many comments, belongs underscore two space colon account. Now you’ve set up a one-to-one relationship before we had a one-to-many relationship. Rails is rife with all these kinds of domain-specific languages where at 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 Matz’s keywords and with zero line noise.
Lex Fridman (01:05:56) Yeah, I should say that my first love was Lisp. So there’s a slow tear that you can’t see.
DHH (01:06:01) I’ve actually never written any real Lisp myself.
Lex Fridman (01:06:04) Well, how can you judge it so harshly then?
DHH (01:06:07) Because I have two eyes and I can look at code and my aesthetic sensibilities forbid me to even go much further, which is the limitation, I know. I should actually dive into Lisp because I’ve 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.

Dynamic typing

Lex Fridman (01: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.
DHH (01:07:04) 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.
(01:07:42) We pulled TypeScript out of Turbo, one of the front-end frameworks that we have because I tried to write to 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.
DHH (01:08:00) … 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 an example, for example. 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. 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 auto-complete 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.
(01:09:11) 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. I don’t auto-complete. 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 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 can 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 auto- completing 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 meta-programming part.
(01:10:16) There’s the fact that Ruby’s ethos of duck typing … I don’t know if you’ve heard that term before. It’s essentially not about, can I call this method if an object is of a certain class? Can I call this method if the method responds? It’s very out of small talk in that regard. You don’t actually check 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 meta-programming that we do in Ruby. I don’t want to 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’re going to have fewer bugs. You’re going to have less Null Pointer Exceptions, you’re going to have less of all of this stuff. Yeah, I don’t have any of that. It’s 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.
(01:11:19) 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 five, 10, 50 million lines of code with hundreds, thousands or tens of thousands of programmers, I fully accept that you need different methods. 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 Basecamp, 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 want to muddy the beautiful seats. You don’t want to do any of those things.
(01:12:21) 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 of 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. 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’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.

Scaling

(01:13:22) 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.
(01:14:45) 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.
Lex Fridman (01:15:33) So the thing does scale. That’s a persistent myth, that it doesn’t scale, Shopify, and others, but Shopify I think is a great example. By the way, I love Shopify and I love Toby.
DHH (01:15:45) You’ve got to have Toby on. I just talked to him this morning
Lex Fridman (01:15:47) For sure. He’s a brilliant … I got to hang out with him in the desert somewhere, I forget, in Utah. He’s just a brilliant human. Shopify.com/luxe has been supporting this podcast for the longest time. I don’t think actually Toby knows that they sponsor this podcast. I mean, it’s a big company, right?
DHH (01:16:05) It’s a huge company. I think just under 10,000 employees, market cap of $120 billion, GMV of a quarter of a trillion every quarter.
Lex Fridman (01:16:16) He’s involved with the details though.
DHH (01:16:18) He is, very much so. Funny story about Toby, Toby was on the Rails core team back in the mid-2000s. Toby himself-
Lex Fridman (01:16:28) Really?
DHH (01:16:28) … wrote Active Merchant, 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. I think 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, he runs a company of almost 10,000 people. That is literally, world commerce depends on it, a level of criticality I can’t even begin to understand. 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, 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 yeah, I can probably upload something to an FTP server and so on.
(01:17:33) 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 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 Toby was writing Snow Devil, 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.
(01:18:24) 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 it 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, 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 need. That’s what Shopify needed, that’s what Twitter needed.
(01:19:24) 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 distraction of that. I’m not saying React isn’t a great tool and that can’t used by smaller teams, of course it can, but it’s born in a very different context than something like Ruby on Rails.
Lex Fridman (01:20:00) Let me say as a small aside … because I think we might return to Shopify and celebrate it often, just a personal note. This particular podcast has way more sponsors, and sponsors that want to be sponsors, than I could possibly ever have. It’s really, really important for me to not give a shit and to be able to celebrate people. I celebrate people, I celebrate companies, and I don’t care that they’re sponsoring. I really don’t care. I just want to make that very explicit, because we’re going to continue saying positive things about Shopify. I don’t care, stop sponsoring, it doesn’t really matter to me. Yeah, I just want to make that explicit. But to linger on the scaling thing with the Twitter and the Shopify, can you just explain to me what Shopify is doing with the JIT? What did they have to try to do to scale this thing, because that’s kind of an incredible story, right?
DHH (01:20:59) Yeah. One of the great contributions that Shopify has made to the entire Ruby ecosystem … not just Rails, but in particular Rails, is YJIT. YJIT is their compiler for Ruby that just makes everything a lot more efficient. At Shopify scale, eking out even a five, 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 186 that Toby probably started on, just as I started on. That was enough to propel Shopify to the scale that it has today. A lot of the scaling conversation is lost in a failure to distinguish two things. Scale is 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 going to notice. Your app is going to feel slow and sluggish.
(01:22:16) You have to get that response time down below, let’s say at least 300 milliseconds. I like to target a 100 milliseconds as my latency. That 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. 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. That’s actually one of the 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.
(01:23:28) 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. 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, you can’t afford to use a luxurious language like Ruby to program in it. You simply have to slum it with a C or a Go or some other low-level language, or a Rust, talk about line noise there.
Lex Fridman (01:24:17) That’s like the thrift store of languages.
DHH (01:24:19) Exactly. What you need, you need a very low level to do it. You can’t afford to use a luxury language 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, it’s not CPU cores. It’s web 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, “Oh, if you switch from Ruby to some faster language, you could save a bunch of money.” 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 by seven percentage points, I’d have to pick something twice as fast. That’s quite hard.
(01:25:27) 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, 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.
(01:26:25) And everything 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. It was 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 less.

Future of programming

Lex Fridman (01: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.
DHH (01:27:47) 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.
(01:29:03) One of the reasons I don’t enjoy that way of writing is, I can literally feel competence draining out of my fingers. That level of immediacy with the material disappears. Where I felt this the most was, I did this remix of Ubuntu called Omakub when I switched to Linux. It’s all written in Bash. I’d never written any serious amount of code in Bash before, so I was using AI to collaborate, to write a bunch of Bash with me, because I needed all this. I knew what I wanted, I could express it in Ruby, but I thought it was an interesting challenge to filter it through Bash. Because what I was doing was setting up a Linux machine, that’s basically what Bash was designed for. It’s a great constraint. But what I found myself doing was asking AI for the same way of expressing a conditional, for example, in Bash over and over again. That by not typing it, I wasn’t learning it. I was using it, I was getting the expression I wanted, but I wasn’t learning it. I got a little scared.
(01:30:08) I got a little scared, is this the end of learning? Am I no longer learning if I’m not typing? The way I, for me, recast that was, I don’t want to give up on the AI. It’s such a better experience as a programmer to look up APIs, to get a second opinion on something, to do a draft, but I have to do the typing myself because you learn with your fingers. If you’re learning how to play the guitar, you can watch as many YouTube videos as you want, you’re not going to learn the guitar. You have to put your fingers on the strings to actually learn the motions. I think there is a parallel here to programming, where programming has to be learned in part by the actual typing.
Lex Fridman (01:30:50) I’m just really, this is fascinating. Listen, part of my brain agrees with you 100%, part doesn’t. I think AI should be in the loop of learning. Now, current systems don’t do that, but I think it’s very possible for Cursor to say, to basically force you to type certain things. So if you set the mode of learning … I don’t want to be this, give up on AI. I think vibe coding is a skill, so for an experienced programmer it’s too easy to dismiss vibe coding as a thing.
DHH (01:31:31) I agree, I wouldn’t dismiss it.
Lex Fridman (01:31:32) But I think you need to start building that skill and start to figure out, how do you prevent the competency from slipping away from your fingers and brain? How do you develop that skill in parallel to the other skill? I don’t know. I think it’s a fascinating puzzle though. I know too many really strong programmers that just avoid AI, because it’s currently a little too dumb.
DHH (01:31:57) Yes. It’s a little too slow, is actually my main problem. It’s a little too dumb in some ways, but it’s a little too slow in other ways. When I use Claude’s Code, the terminal version of Claude … which is actually my preferred way of using it, I get too impatient. It feels like I’m going back to a time where code had to compile and I had to go do something else, boil some tea while the code is compiling. Well, I’ve been working in Ruby for 20 years, I don’t have compile wait in me anymore, so there’s that aspect of it. But I think the more crucial aspect for me is, I really care about the competence. I’ve seen what happens to even great programmers the moment they put away the keyboard, because even before AI, this would happen as soon as people would get promoted. Most great programmers who work in large businesses, stop writing code on a daily basis because they simply have too many meetings to attend to, they have too many other things to do, and invariably they lose touch with programming.
(01:32:57) That doesn’t mean they forget everything but if you don’t have your fingers in the sauce, the source, you are going to lose touch with it. There’s just no other way. I don’t want that because I enjoy it too much. This is not just about outcomes. This is what’s crucial to understand, programming for programmers who like to code is not just about the programs they get out of it. That may be the economic value. It’s not the only human value. The human value is just as much in the expression. When someone who sits down on a guitar and plays Stairways to Heaven, there’s a perfect recording of that, that will last in eternity. You can just put it on Spotify, you don’t actually need to do it. The joy is to command the guitar yourself. The joy of a programmer, of me as a programmer, is to type the code myself. If I elevate, if I promote myself out of programming, I turn myself into a project manager, a project manager of a murder of AI crows, as I wrote the other day. I could have become a project manager my whole career.
(01:34:05) I could have become a project manager 20 years ago if I didn’t care to write code myself and I just wanted outcomes. That’s how I got started in programming, I just wanted outcomes. Then I fell in love with programming, and now I’d rather retire than giving it up. Now, that doesn’t mean you can’t have your cake and eat it too. I’ve done some vibe coding where I didn’t care that I wasn’t playing myself. I just wanted to see something that was an idea in my head. I wanted to see something, that’s fine. I also use AI all day long. In fact, I’m already at the point where if you took it away from me, I’d be like, oh my God, how do we even look things up on the Internet anymore? Is Stack Overflow still around, is forum still a thing? How do I even find answers to some of these questions I have all day long? I don’t want to give up AI. In fact, I’d say the way I like to use AI, I’m getting smarter every day because of AI because I’m using AI to have it explain things to me.
(01:35:02) Even the stupid questions I would be a little embarrassed to even enter into Google, AI is perfectly willing to give me the ELI5 explanation of some Unix command I should have known already but I don’t. I’m sorry, can you just explain it to me? Now I know the thing. So at the end of the day, of me working with AI all day long, I’m a little bit smarter, like 5%. Sorry, not 5%, half a percent maybe, that compounds over time. But what I’ve also seen when I worked on the Omakub project and I tried to let AI drive for me, I felt I was maybe half a percent dumber at the end of the day.
Lex Fridman (01:35:41) Okay, you’ve said a lot of interesting things. First of all, let’s just start at the very fact that asking dumb questions, if you go to Stack Overflow and ask a dumb question or read somebody else’s dumb question and the answer to it, there’s a lot of judgment there. AI, sometimes to an excessive degree, has no judgment. It usually says, oh, that’s a great question.
DHH (01:36:00) To a fault.
Lex Fridman (01:36:02) Yeah. Oh, that’s wonderful. Yeah. I mean, it’s so conducive to learning. It’s such a wonderful tool for learning and I too would miss it. It’s a great basically search engine into all kinds of nuances of a particular programming language, especially if you don’t know it that well. Or APIs you can load in documentation, it’s just so great for learning. For me personally, I mean, on the happiness scale, it makes me more excited to program. I don’t know what that is exactly. Part of that is the … I’m really sorry, Stack Overflow is an incredible website but there is a negativity there. There’s a judgment there. It’s just exciting to be with a hype man next to me just saying, yeah, that’s a great idea. I’ll say, no, that’s wrong, I’ll correct the AI. The AI will say, you’re absolutely right, how did I not think about that? You’re ready to go. I’m like, holy shit, I’m having, it’s like a buddy that’s really being positive and is very smart and is challenging me to think.
(01:37:12) And even if I never use the code it generates, I’m already a better programmer. But actually the deeper thing is, for some reason I’m having more fun. That’s a really, really important thing.
DHH (01:37:23) I like to think of it as a pair programmer for exactly that reason. Pair programming came vogue in the 2000s, where you’d have two programmers in front of one machine and you’d push the keyboard between you. One programmer would be driving, they’d be typing in. The other programmer would essentially sit and watch the code, suggest improvements, look something up. That was a really interesting dynamic. Now unfortunately, I’m an introvert, so I can do that for about five minutes before I want to jump off a bridge. So it doesn’t work for me as a full-time occupation, but AI allows me to have all the best of that experience all the time. Now, I think what’s really interesting what we said about, it makes it more fun. I hadn’t actually thought about that, but what it’s made more fun to me is to be a beginner again. It made it more fun to learn Bash successfully for the first time.
(01:38:14) Now, I had to do the detour where I let it write all the code for me, and I realized I wasn’t learning nearly as much as I hoped I would. That I started doing once I typed it out myself. But it gave me the confidence that, you know what? If I need to do some iOS programming myself … I haven’t done that in, probably six years was the last time I dabbled in it. I never really built anything for real. I feel highly confident now that I could sit down with AI and I could have something in the app store by the end of the week. I would not have that confidence unless I had a pair programming body like AI. I don’t actually use it very much for Ruby code. I’m occasionally impressed whenever I try it, like, oh, it got this one thing right, that is truly remarkable and it’s actually pretty good. And then I’ll ask two more questions and I go like, oh yeah, okay, if you were my junior programmer I’d start tapping my fingers and going like, you’ve got to shape up.
(01:39:05) Now, the great thing of course is, we can just wait five minutes. The Anthropic CEO seems to think that 90% of all code by the end of the year is going to be written by AI. I’m more than a little bit skeptical about that, but I’m open-minded about the prospect that programming potentially will turn into a horse when done manually. Something we do recreationally is no longer a mode of transportation to get around LA. You’re not going to saddle up and go to the grocery store and pick up stuff from Whole Foods in your saddlebags. That’s just not a thing anymore. That could be the future for programming, for manual programming, entirely possible. I also don’t care. Even though we have great renditions of all the best songs, as I said, there are millions of people who love to play the guitar. It may no longer have as much economic value as it once did. I think that I’m quite convinced is true, that we perhaps have seen the peak.
(01:40:01) Now, I understand the paradox, when the price of something goes down, actually the overall usage goes up, and total spend on that activity goes up. That could also happen maybe. But what we’re seeing right now is that a lot of the big shops, a lot of the big companies, are not hiring like they were five years ago. They’re not anticipating they’re going to need tons more programmers. Controversially, Toby actually put out a memo inside of Shopify asking everyone who’s considering hiring someone to ask the question, could this be done by AI? Now, he’s further ahead on this question than I am. I look at some of the code and [trenches 01:40:37] and I go like, I’d love to use AI more, and I see how it’s making us more productive. But it’s not yet at the level where I just go like, oh, we have this project, let me just give it to the AI agent and it’s going to go off and do it.
Lex Fridman (01:40:47) But let’s just be honest, you’re like a Clint Eastwood type character cowboy on a horse seeing cars going around. You’re like, well-
DHH (01:40:56) That’s part of it. I think it is important to have that humility, that what you are good at may no longer be what society values. This has happened a million times in history … that you could have been exceptionally good at saddle making, for example. That’s something that a lot of people used to care about because everyone rode a horse. And then suddenly riding a horse became this niche hobby, that there’s some people care about it, but not nearly as many. That’s okay. Now, the other thing of this is, I’ve had the good fortune to have been a programmer for nearly 30 years. That’s a great run. I try to look at life in this way, that I’ve already been blessed with decades of economically viable, highly valuable ways of translating what I like best in the working world, to write Ruby code. That that was so valuable that I could make millions and millions of dollars doing it, and if that’s over tomorrow, I shouldn’t look at that with regret. I should look at it with gratitude.
Lex Fridman (01:41:57) But you’re also a highly experienced, brilliant and opinionated human …
Lex Fridman (01:42:00) Brilliant and opinionated human being. So it’s really interesting to get your opinion on the future of the horse because there’s a lot of young people listening to this who love programming or who are excited by the possibility of building stuff with software, with Ruby on Rails, that kind of language and now the possibility.
DHH (01:42:24) But is it a career?
Lex Fridman (01:42:25) Is it a career and how if indeed a single person can build more and more and more with the help of AI, how do they learn that skill? Is this a good skill to learn? I mean, that to me is the real mystery here because I think it’s still absolutely true that you have to learn how to program from scratch currently, but how do you balance those two skills? Because I too, as I’m thinking now, there is a scary slipping away of skill that happens in a matter of really minutes on a particular piece of code. It’s scary the way driving when you have a car drive for you doesn’t quite slip away that fast. So that really scares me. When somebody comes up to me and asks me how do I learn to program? I don’t know what the advice is because I think it’s not enough to just use Cursor or Copilot to generate code.
DHH (01:43:28) It’s absolutely not enough. Not if you want to learn, none of you want to become better at it. If you just become a tap monkey, maybe you’re productive in a second, but then you have to realize, well, can anyone just tap if that’s all we’re doing is just sitting around all day long tapping? Yes, yes, yes, yes, yes. That’s not a marketable skill. Now, I always preface this both to myself and when I speak to others about it, is rule number note one, nobody fucking knows anything. No one can predict even six months ahead.

Future of AI

(01:43:58) 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.
Lex Fridman (01:44:56) Great movie,
DHH (01:44:57) Incredible movie about virtual reality. Being an avatar and living in VR, the story was a mess, but the aesthetics, the world that build up was incredible and I thought, we’re five years away. I’m going to be living in VR now. I’m just going to be floating around. I’m going to be an avatar. This is where most humans can spend most of the day. That didn’t happen. We’re 30 years later, VR is still not here. It’s here for gaming. It’s here for some specialized applications. My oldest loves playing Gorilla Tag. I don’t know if you’ve tried that. That’s basically the hottest VR game. Wonderful. It’s great. It’s really hard to predict the future because we just don’t know. And then when you factor into AI and you have even the smartest people go like, “I don’t think we fully understand how this works.”
Lex Fridman (01:45:49) But then on the flip side, you have Moore’s law that seems to work for many, many, many years in decreasing the size of transistor, for example. Flash didn’t take over the internet, but Moore’s law worked, so we don’t know which one AI is.
DHH (01:46:07) It is what it is. And this is what I find so fascinating to, I forget who did this presentation, but someone in the web community, this great presentation on the history of the airplane. So you go from the Wright brothers flying in, what was 1903 or something like that, and 40 years later you have a jet flight, just an unbelievable amount of progress in four decades. Then in ’56, I think it was, the whole design for the Boeing 747 century precursor was designed and basically nothing has happened since. Just minor tweaks and improvements on the flying experience since the ’50s. Somehow, if you were to predict where flying was going to go and you were sitting in ’42 and you’d seen, you’d remember the Wright brothers flying in oh three and you were seeing that jet engines coming, you’re like, “We’re going to fly to the stars in another two decades.”
(01:47:04) We’re going to invent super mega hypersonic flights that’s going to traverse the earth in two hours, and then that didn’t happen. It tapped out. This is what’s so hard about predicting the future. We can be so excited in the moment because we’re drawing a line through early dots on a chart, and it looks like those early dots is just going up into the right and sometimes it’s just flattened out. This is also one of those things where we have so much critical infrastructure, for example, that still runs on COBOL, that about five humans around the world really understand truly, deeply that it’s possible for society to lose a competence it still needs because it’s chasing the future.
(01:47:44) COBOL is still with us. This is one of the things I think about with programming. Ruby on Rails is at such a level now that in 50 years from now, it’s exceedingly likely that there’s still a ton of Ruby on Rails systems running around now, very hard to predict what that exact world is going to be like, but yesterday’s weather tells us that if there’s still COBOL code from the ’70s operating social security today, and we haven’t figured out a clean way to convert that, let alone understand it, we should certainly be humble about predicting the future.
(01:48:16) I don’t think any of the programmers who wrote that COBOL code back in the ’70s had any idea that in 2025 checks were still being cut off the business logic that they had encoded back then. But that just brings me to the conclusion on the question for what should a young programmer do? You’re not going to be able to predict the future. No one’s going to be able to predict the future. If you like programming, you should learn programming. Now, is that going to be a career forever? I don’t know, but what’s going to be a career forever? Who knows? A second ago we thought that it was the blue-collar labor that was going to be abstracted. First, it was the robots that were going to take over. Then Gen AI comes out, and then all the artists suddenly look like, “Holy shit, is this going to do all animation now? Is going to do all music now?”
(01:48:59) They get real scared, and now I see the latest Tesla robot going like, “Oh, maybe we’re back now to blue-collar being in trouble because if it can dance like that, it can probably fix a toilet.” So no one knows anything, and you have to then position yourself for the future in such a way that it doesn’t matter that you pick a profession or path where if it turns out that you have to retool and re-skill, you’re not going to regret the path you took. That’s a general life principle. For me, how I look at all endeavors I involved myself in is I want to be content with all outcomes.
(01:49:39) When we start working on a new product at 37 Signals, I set up my mental model for success and I go, “Do you know what? If no one wants this, I will have had another opportunity to write beautiful Ruby code to explore greenfield domain, to learn something new, to build a system I want, even if no one else wants it.” What a blessing, what a privilege. If a bunch of people want it, that’s great. We can pay some salaries, we can keep the business running, and if it’s a blowaway success, wonderful. I get to impact a bunch of people.

Vibe coding

Lex Fridman (01: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.
DHH (01:51:16) 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.
(01:52:15) You’re going to learn in this superficial way that feels like learning but is completely empty calories, and secondly, if you can just vibe code it, you’re not a programmer. Then anyone could do it, which may be wonderful. That’s essentially what happened with the Access database. That’s what happened with Excel. It took the capacity of accountants to become software developers because the tools became so accessible to them that they could build a model for how the business was going to do next week that required a programmer prior to Excel. Now, it didn’t because they could do it themselves by coding enables non-programmers to explore their ideas in a way that I find absolutely wonderful, but it doesn’t make you a programmer.
Lex Fridman (01:53:02) I agree with you, but I want to allow for room for both of us be wrong. For example, there could be vibe coding could actually be a skill that if you train it and by vibe coding, let’s include the step of correction, the iterative correction, it’s possible if you get really good at that, that you’re outperforming the people that write from scratch that you can come up with truly innovative things, especially at this moment in history while the LLMs are a little bit too dumb to create super novel things and a complete product, but they’re starting to creep close to that, so if you are investing time now into becoming a really good vibe coder, maybe this is the right thing to do. If it’s indeed a skill, we kind of meme about vibe coding, like sitting back and it’s in the name, but if you treat it seriously, a competitive vibe coder and get good at riding the wave of AI and get good at the skill of editing code versus writing code from scratch, it’s possible that you can actually get farther in the long term.
(01:54:12) Maybe editing is a fundamentally different task than writing from scratch if you take that seriously as a skill that you develop. I see. To me, that’s an open question. I just think I personally, now you’re on another level, but just personally, I’m not as good at editing the code that I didn’t write. That’s a different-
DHH (01:54:36) No one is.
Lex Fridman (01:54:38) No one is of this generation, but maybe that’s a skill. Maybe if you get on the same page as the AI, because there’s a consistency to the AI. It’s like it really is a pair of programmers with a consistent style and structure and so on. Plus, with your own prompting, you can control the kind of code you write. I mean, it could legitimately be a skill.
DHH (01:54:59) That’s the dream of the prompt engineer. I think it’s complete pipe dream. I don’t think editors exist that aren’t good at writing. I’ve written a number of books. I’ve had a number of professional editors. Not all of them wrote their own great books, but all of them were great writers in some regard. You cannot give someone pointers if you don’t know how to do it. It’s very difficult for an editor to be able to spot what’s wrong with a problem if the data couldn’t make the solution themselves. The capacity to be a good editor is the reward you get from being a good doer. You have to be a doer first. Now, that’s not the same as saying that vibe coding, prompt engineering won’t be able to produce fully formed amazing systems even shortly. I think that’s entirely possible, but then there’s no skill left, which maybe is the greatest payoff at all.
(01:55:57) Wasn’t that the whole promise of AI anyway, that it was just all natural language that even my clumsy way of formulating a question could result in a beautiful succinct answer? That actually to me is a much more appealing vision that there’s going to be these special prompt engineering wizards who know how to tickle the AI just right to produce what they want. The beauty of AI is to think that someone who doesn’t know the first thing about how AI actually works is able to formulate their idea and their aspirations for what they want, and the AI could somehow take that messy clump of ideas and produce something that someone wants.
(01:56:35) That’s actually what programming has always been. There’s very often been people who didn’t know how to program, who wanted programs, who then hired programmers, who gave them messy descriptions of what they wanted, and then when the programmers delivered that back said, “Oh, no, actually that’s not what I meant. I want else.” AI may be able to provide that cycle if that happens to the fullest extent of it, yeah, there’s not going to be as many programmers around, but hopefully presumably someone still, at least for the foreseeable future, have to understand whether what the AI is producing actually works or not.
Lex Fridman (01:57:11) As an interesting case study, maybe a thought experiment, if I wanted to vibe code Basecamp or hey, some of the products you’ve built, what would be the bottlenecks? Where would I fail along the way?
DHH (01:57:30) What I’ve seen when I’ve been trying to do this, trying to use vibe coding to build something real is you actually fail really early. The vibe coding is able to build a veneer at the current present moment of something that looks like it works, but it’s flawed in all sorts of ways. There are the obvious ways, the meme ways that it’s leaking all your API keys, it’s storing your password in plain text. I think that’s ultimately solvable. It’s going to figure that out, or at least it’s going to get better at that, but its capacity to get lost in its own Labyrinth is very great right now. You let it code something and then you want to change something and it becomes a game of Whack-A-Mole real quick.
(01:58:09) Pieter Levels who’ve been doing this wonderful flight simulator was talking to that where at a certain scale the thing just keeps biting its own tail. You want to fix something and it breaks five other things, which I think is actually uniquely human because that’s how most bad programmers are at a certain level of complexity with the domain. They can’t fix one thing without breaking three other things, so in that way I’m actually in some way it’s almost a positive signal for that. The AI is going to figure this out because it’s done an extremely human trajectory right now. The kind of mistakes it’s making are the kind of mistakes that junior programmers make all the time.

Rails manifesto: Principles of a great programming language

Lex Fridman (01:58:43) 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.
DHH (01:59:00) Yes.
Lex Fridman (01:59:00) The underlying objective of Ruby. What else?
DHH (01:59:04) So you’re looking at the nine points I wrote out in I think 2012 and first, before we dive into them, I want to say the reason I wrote it down is that if you want a community to endure, you have to record its values and you have to record its practices. If you don’t, eventually you’re going to get enough new people come in who have their own ideas of where this thing should go, and if we don’t have a guiding light helping us to make decisions, we’re going to start flailing. We’re going to start actually falling apart. I think this is one of the key reasons that institutions of all kinds start falling apart. We forget why Chesterton’s fence is there. We just go like, why is that fence there? Let’s yank it out. Oh, it was to keep the wolves out. Now we’re all dead.
(01:59:49) Oops. So I wanted to write these things down and if we just take them quick one by one, you talked about optimizing for programmer happiness. I put that at number one in homage of Matz, and that’s a lot about accepting that there is occasionally a trade-off between writing beautiful code and other things we want out of systems. There could be a runtime trade-off. There can be a performance trade-off, but we’re going to do it nonetheless. We’re also going to allow ambiguity in a way that many programmers by default are uncomfortable with. I give the example actually here of in the interactive Ruby Shell where you can play with the language or even interact with your domain model. You can quit it in two ways, at least that I found. You can write exit. Boom, you’re out of the program. You can write quit. Boom, you’re out of the program.
(02:00:38) They do the same thing. We just wrote both exit or the people who built that wrote both exit and quit because they knew humans were likely to pick one or the other. Python is the perfect contrast to this. In the Python interactive protocol, if you write exit, it won’t exit. It’ll give you a fucking lesson. It’ll basically tell you to read the fucking manual. It says, “Use exit() or Ctrl+D i.e. end of file to exit.” I’m like one is very human and another is very engineer, and I mean that both of them in the best possible way. Python is pedantic. Python’s the value from the start stated is that there should be preferably one and only one way to do a certain thing. Ruby is the complete opposite. No, we want the full expression that fits different human brains such that it seems like the language is guessing just what they want.
Lex Fridman (02:01:37) And part of that is also you described the principle of the least surprise, which is a difficult thing to engineer a language because it’s a subjective thing.
DHH (02:01:47) Which is why you can’t do it in one way, which is why I used the example of both exit and quit. The principle of least surprise for some people would be like, “Oh, exit. That’s how I get out of the prompt. For other people, it would be quit.” Why don’t we just do both?
Lex Fridman (02:02:01) Okay, so what’s the convention over configuration? That’s a big one.
DHH (02:02:05) That’s a big one. That’s a huge one. And it was born out of a frustration I had in the early days with especially Java frameworks where when you were setting up a web application framework for Java back in the day, it was not uncommon to literally write right hundreds if not thousands of lines of XML configuration files. Oh, I need this. I want the database to use the foreign keys as post underscore ID. No, no, no. I want it as post capital ID. Oh, no, no, no. You have to do a capital PID. There are all these ways where you can configure how foreign relation keys should work in a database and none of them matter. We just need to pick one and then that’s fine, and if pick one and we can depend on it, it becomes a convention. If it’s a convention, we don’t have to configure it if we don’t have to configure it, you can get started with you actually care about much quicker.
(02:02:57) Convention of a configuration is essentially to take that idea that the system should come pre-assembled. I’m not just handing you a box of fucking Legos and asking you to build the Millennium Falcon. I’m giving you a finished toy. You can edit, you can change it. It’s still build out a Legos. You can still take some pieces off and put in some other pieces, but I’m giving you the final product and this cuts against the grain of what most programmers love. They love a box of Legos. They love to put everything together from scratch. They love to make all these detailed little decisions that just don’t matter at all, and I want to elevate that up such that, hey, I’m not trying to take the decisions away from you. I just want you to focus on decisions that actually matter that you truly care about. No one cares about whether it’s post underscore ID or post ID or PID.
Lex Fridman (02:03:41) Yeah, great defaults.
DHH (02:03:43) Yes.
Lex Fridman (02:03:44) It’s just a wonderful thing. You have all these aspirations, they’re going to do some kind of custom, most beautiful Legos castle that nobody’s ever built from these pieces, but in reality to be productive in most situations, you just need to build the basic thing and then on top of that is where your creativity comes.
DHH (02:04:03) Absolutely, and I think this is one of those, part of the doctrine that a lot of programmers who get to use Ruby on Rails begrudgingly will acknowledge it’s a nice thing. Even if they don’t really like it’s hard to beat the attraction to building with Legos from scratch out of programmers. That’s just what we like. This is why we’re programmers in the first place because we’d like to put these little pieces together, but we can direct that instinct towards a more productive end of the stack.
Lex Fridman (02:04:33) Okay. What are some of the other ones?
DHH (02:04:35) The menu is omakase. It actually comes out of the same principle that great defaults really matter. If you look at everything that’s wrong with the JavaScript ecosystem right now, for example, it is that no one is in charge of the menu. There are a billion different dishes and you can configure just your tailored specific configuration of it, but no one done the work to make sure it all fits together, so you have all these unique problems in the JavaScript ecosystem, for example, there’s probably 25 major ways of just doing the controller layer and then as many of how to talk to the database, so you get this permutation of N times N times N of no one is using the same thing.
(02:05:17) And if they are using the same thing, they’re only using the same thing for about five minutes, so we have no retained wisdom. We build up no durable skills. Rails goes the complete opposite way of saying do you know what? Rails is not just a web framework. It is a complete attempt at solving the web problem. It’s complete attempt at solving everything you need to build a great web application, and every piece of that puzzle should ideally be in the box pre-configured, pre-assembled.
(02:05:48) If you want to change some of those pieces later, that’s wonderful, but on day one you’ll get a full menu designed by a chef who really cared about every piece of the ingredient and you’re going to enjoy it, and that’s again one of those things where many programmers think like I know better and they do in some hyperlocal sense of it. Every programmer knows better. This is what Ruby is built on, that every programmer knows better in their specific situation. Maybe they can do something dangerous, maybe they think they know better and then they blow their foot off and then they truly will know better because they’ve blown their foot off once and won’t do it again. But the menu on omakase is that.
Lex Fridman (02:06:28) So you in general see the value in the monolith?
DHH (02:06:32) Yes. The integrated system.
Lex Fridman (02:06:34) Integrated-
DHH (02:06:35) That someone thought of the whole problem. This is one of the reasons why I’ve been on a crusade against microservices since the term was coined. Microservices was born out of essentially a good idea. What do you do at Netflix scale when you have thousands of engineers working on millions of lines of code? No one can keep that entire system in their head at one time. You have to break it down. Microservices can be a reasonable way to do that when you’re at Netflix scale. When you apply that pattern to a team of 20 programmers working on a code base of half a million lines of code, you’re an idiot. You just don’t need to turn method invocations into network calls. It is the first rule of distributed programming. Do not distribute your programming. It makes everything harder. All the failure conditions you have to consider as a programmer just becomes infinitely harder when there’s a network cable involved, so I hate the idea of premature decomposition and microservices is exactly that.
(02:07:35) The monolith says let’s try to focus on building a whole system that a single human can actually understand and push that paradigm as far as possible by compressing all the concepts such that more of it will fit into memory of a single operating human, and then we can have a system where I can actually understand all of Basecamp. I can actually understand all of HEY. Both of those systems are just over a hundred thousand lines of code. I’ve seen people do this that maybe twice, maybe three times that scale and then it starts breaking down. Once you get north of certainly half a million lines of code, no individual human can do it, and that’s when you get into maybe some degree of microservices can make sense.
Lex Fridman (02:08:12) Basecamp and HEY are both a hundred thousand?
DHH (02:08:14) A hundred thousand lines of code.
Lex Fridman (02:08:15) Wow. It’s small.
DHH (02:08:16) It’s considering the fact that Basecamp I think has something like 420 screens, different ways and configurations.
Lex Fridman (02:08:23) Do you include the front end in that?
DHH (02:08:25) No, that’s the Ruby code. Well, it’s front end in the sense that some of that Ruby code is beneficial to the front end, but it’s not JavaScript for example. Now, the other thing we might talk about later is we write very little JavaScript actually for all of our applications. HEY, which is a Gmail competitor. Gmail ships I think 28 of uncompressed JavaScript. If you compress it, I think it’s about six megabytes, 28 megabytes. Think about how many lines of code that is.
(02:08:48) When HEY launched, we shipped 40 kilobytes. It’s trying to solve the same problem. You can solve the email client problem with either 28 megabytes of uncompressed JavaScript or with 40 kilobytes if you do things differently, but that comes to the same problem essentially. This is why I have fiercely fought splitting front end and back end. Apart that in my opinion, this was one of the great crimes against web development that we are still atoning for that we separated and divided what was and should be a unified problem solving mechanism. When you are working both on front end and back end, you understand the whole system and you’re not going to get into these camps that decompose and eventually you end up with shit like GraphQL.
Lex Fridman (02:09:36) Okay. Let’s fly through the rest of the doctrine. No one paradigm.
DHH (02:09:44) No one paradigm goes to the fact that Ruby is a fiercely object-oriented programming language at its core, but it’s also a functional programming language. This five times I told you about, you can essentially do these anonymous function calls and you can chain them together very much in the spirit of how true functional programming languages work, Ruby has even moved closer towards the functional programming and of the scale by making strings immutable. There are ideas from all different disciplines of an all different paradigms of software development that can fit together. Smalltalk, for example, was only object-oriented and that was just it. Ruby tries to be mainly object-oriented, but borrow a little bit of functional programming, a little bit of imperative programming, be able to do all of that. Rails tries to do the same thing. We’re not just going to pick one paradigm and run it through everything.
(02:10:35) Object orientation is at the center of it, but it’s okay to invite all these other disciplines in. It’s okay to be inspired. It’s okay to remix it. I actually think one of the main benefits of Rails is that it’s a remix. I didn’t invent all these ideas. I didn’t come up with ActiveRecord. I didn’t come up with the MVC way of dividing an application. I took all the great ideas that I had learned and picked up from every different camp and I put it together. Not because there was going to be just one single overarching theory of everything, but I was going to have a cohesive unit that incorporated the best from everywhere.
Lex Fridman (02:11:10) Is that idea a bit at tension with the beauty of the monolith system?
DHH (02:11:15) I think the monolith can be thought of as quite roomy, quite as a big tent that the monolith needs actually to borrow a little bit of functional programming for the kinds of problems that that excels, that discipline excels its solving and that paradigm excels its solving. If you also want object orientation at its core, I actually think when I’ve looked at functional programming languages, there’s a lot to love and then I see some of the crazy contortions they have to go through when part of the problem they’re solving calls for mutating something and you go like, “Holy shit, this is a great paradigm from 90% of the problem, and then you’re twisting yourself completely out of shape when you try to solve the last 10.”
Lex Fridman (02:12:00) Ooh, Exalt beautiful code is the next one.
DHH (02:12:03) We’ve talked about that at length and here’s a great example that really summarizes the main specific language quality of Ruby on Rails that you can make code actually pleasant to write and read, which is really funny to me because as we talked about when I started learning programming, it wasn’t even a consideration. I didn’t even know that that could be part of the premise, that that could be part of the solution that writing code could feel as good as writing a poem.
Lex Fridman (02:12:31) Class project, application record belongs to account has many participants, class name person, validates presence of name.
DHH (02:12:41) See, you could read it out. You didn’t even change anything.
Lex Fridman (02:12:44) Like a haiku or something.
DHH (02:12:45) Right. Isn’t that beautiful?
Lex Fridman (02:12:47) Yeah, it’s nice. It’s really nice. There’s an intuitive nature to it. Okay, so I have specific questions there. I mean ActiveRecord, just to take that tangent, that has to be your favorite feature.
DHH (02:13:00) It’s the crown jewel of Rails. It really is. It’s the defining characteristic of how to work with Ruby on Rails. And it’s born in an interesting level of controversy because it actually uses a pattern that had been described by Martin Fowler in the patterns of enterprise application architecture. One of the greatest books for anyone working on business systems and if you had not read it, you must pick it up immediately. Patterns of enterprise application architecture, I think it was published in 2001. It is one of the very few programming books that I have read many times over. It’s incredible in it. Martin describes a bunch of different patterns of how to build business systems essentially. An ActiveRecord is a little bit of a footnote in there. The pattern is literally called ActiveRecord. You can look it up. It’s called ActiveRecord. I wouldn’t even creative enough to come up a name of my own, but it allows the creation, the marriage of database and object orientation in a way that a lot of programmers find a little off-putting.
(02:14:04) They don’t actually want to pollute the beautiful object-oriented nature of that kind of programming with SQL. There was a rant by Uncle Bob the other day about how SQL is the worst thing ever. Okay, fine, whatever. I don’t care. This is practical. We are making crud applications. You’re taking things out of an HTML form and you’re sticking them into a database. It’s not more complicated than that. The more abstractions you put in between those two ends of the spectrum, the more you’re just fooling yourself. This is what we’re doing. We’re talking to SQL databases.
(02:14:39) By the way, quick aside, SQL was one of those things that have endured the onslaught of NoSQL databases structured list data for a better part of a decade and still reign supreme. SQL was a good thing to invest your time in learning. Every program I’m working with the web should know SQL to a fair degree, even if they’re working with an ORM, an object relational mapper as ActiveRecord, you still need to understand SQL. What ActiveRecord does is not so much try to abstract the SQL away behind a different kind of paradigm. It’s just making it less cumbersome to write, making it more amenable to build domain models on top of other domain models in a way, since you don’t have to write every SQL statement by hand.
Lex Fridman (02:15:23) Let’s just say that ActiveRecord is an ORM, which is a layer that makes it intuitive and human interpretable to communicate with a database.
DHH (02:15:33) Even simpler than that. It turns tables into classes and rows into objects. I actually think SQL is very easy to understand most of it. You can write some SQL golf too, that’s very hard to understand, but SQL at its base and much of the criticism against SQL was it was written for human consumption. It’s actually quite verbose, especially if you’re doing things like inserts over and over again. It’s quite verbose. Insert into table, parentheses, enumerate every column you want to insert, values, parentheses.
DHH (02:16:00) In every column you want to insert values, parentheses, every value that fits with that column, it gets tedious to write SQL by hand, but it’s actually very humanly readable. ActiveRecord just takes that tediousness away, it makes it possible to combine things in a way that a humanly describable language just doesn’t. It composes things into methods and you can combine these methods and you can build structures around them. I don’t dislike SQL, I just like a lot of things in programming, I try to get rid of them. SQL wasn’t really one of them, it was just a sense of, “I don’t want to write the same thing over and over again.” It was a, “Can we be a little more succinct? Can we match it just slightly better to the object orientation without trying to hide away the fact that we’re persisting these objects into a database?”
(02:16:47) That’s where I think a lot of ORMs went wrong. They tried to live in the pure world of objects, never to consider that those objects had to be consistent into a SQL database, and then they came up with convoluted way of translating back and forth. ActiveRecord says, “You know what? Just accept it.” This record, this object is not going to get saved into some no-SQL database, it’s going to be saved into SQL database, so just structure the whole thing around that. It’s going to have attributes, those attributes are going to respond to columns in the database. It’s not more complicated than that stuff making it so.
Lex Fridman (02:17:22) Yeah, but I should say, I personally love SQL, because I’m an algorithms person, so I love optimization, I love to know how the databases actually work, so I can match the SQL queries and the design of the tables such that there is optimal… Squeeze the optimal performance out of the table. Okay. Based on the actual way that that table is used. I think that pushes to the point that there is value in understanding SQL. I wonder, because I started looking at ActiveRecord and it looks really awesome. Does that make you lazy? Not you, but a person that rolls in and starts using Rails, you can probably get away with never really learning SQL, right?
DHH (02:18:10) As long as you want to stay at the entry level of competence. This is actually my overarching mission with Rails, is to lower the barrier of entry so far down that someone can start seeing stuff on their browser without basically understanding anything. They can run Rails, new blog, run a couple of generators. They have a whole system… They don’t understand anything, but it’s an invitation to learn more. Where I get fired up, and this ties back to the AI discussion, is when that’s turned into this meme that programmers no longer have to be competent. “The AI is going to figure it out, the generators is going to figure it out. I don’t need to know SQL, ActiveRecord is going to abstract it away from me.” No, no, no. Dude, hold up. The path here is competence. I’m trying to teach you things.
(02:18:58) I understand I can’t teach you everything in five minutes. No one who’s ever become good at anything worthwhile could be taught everything in five minutes. If you want to be a fully well-rounded application developer, that takes years, but you can actually become somewhat productive in a few days, you can have fun in a few days. For sure, you’re going to have fun in a few minutes, in a few hours, and over time, I can teach you a little more. ActiveRecord says like, “Yeah, yeah. All right, start here and then, next week, we’ll do a class on SQL.”
Lex Fridman (02:19:30) Actually, you have this beautiful expression that I love. That a great programming language, like Ruby, has a soft ramp, but the ramp goes to infinity.
DHH (02:19:39) That’s exactly right.
Lex Fridman (02:19:40) Yeah. It’s super accessible, super easy to get started-
DHH (02:19:43) And it never stops.
Lex Fridman (02:19:45) Yeah.
DHH (02:19:45) There’s always more to learn. This is one of the reasons I’m still having fun programming, that I’m still learning new things, I can still incorporate new things. The web is deep enough as a domain, you never going to learn all of it.
Lex Fridman (02:19:56) Provide sharp knives.
DHH (02:19:58) This is a good one, because another way of saying this… The opposite way of saying this, the Java way of saying is, “Do not provide foot guns,” right?
Lex Fridman (02:20:06) Yeah.
DHH (02:20:06) I don’t want to give you a sharp knife. You’re a child, you can’t handle a sharp knife. Here’s a dull butter knife, cut your damn steak, right? That’s a very frustrating experience. You want a sharp knife, even though you might be able to cut yourself. I trust humans in the same way that maths trust humans. Maybe you cut off a finger. All right, you’re not going to do that again. Thankfully, if it was a virtual finger, it’s going to grow back out. Your competence is going to grow, it’s more fun to work with sharp tools.
Lex Fridman (02:20:35) That actually contributes to the ramp that goes to infinity.
DHH (02:20:38) Yes, to the learning.
Lex Fridman (02:20:39) Value-integrated systems.
DHH (02:20:42) We hit on that one. Rails is trying to solve the whole problem of the web, not just one little component. It’s not leaving you a bunch of pieces you have to put together yourself.
Lex Fridman (02:20:51) Progress over stability.
DHH (02:20:52) You know what? If there’s one that’s dated, it’s probably that one. At this stage, Rails has been incredibly stable over many, many generations. The last major release, Rails 8, was basically a no-op upgrade for anyone running Rails 7. Rails 7 was almost a no-op upgrade for anyone running Rails 6. I used to think it required more churn to get progress, to stay on the leading edge of new stuff, and I wrote this before I experienced the indignity of the 2010s in the JavaScript community, where it seemed like stability was not just unvalued, it was actually despised. The churn in and of itself was a value we should be pursuing. If you were still working with the same framework three months later, you were an idiot, and I saw that and I actually recoiled. If I was going to write the doctrine today, I’d write that differently. I wouldn’t say, “Progress over stability.”
Lex Fridman (02:21:50) Maybe it’d be a function of the age of the programming language also.
DHH (02:21:55) Maybe or a deeper understanding of the problem. I think part of what’s so fascinating about technology is that we have this perception that everything constantly moves so fast. No, it doesn’t. Everything moves at a glacial pace. There is occasionally a paradigm shift, like what’s happening with AI right now, like what happened with the introduction of the iPhone in 2007, like what happened with the internet in ’95. That’s basically the total sum of my career, three things changed. Everything else in between was incremental small improvements. You can recognize a Rails application written in 2003. I know, because the Basecamp I wrote back then is still operating, making millions of dollars in ARR, servicing customers on the initial version that was launched back then, and it looks like the Rails code, if I squint a little, that I would write today. Most things don’t change, even in computing, and that’s actually a good thing. We saw with the JavaScript ecosystem, what happens when everyone gets just mad about constant churn. Things don’t change that often.
Lex Fridman (02:23:00) By the way, on that small tangent, you just visibly verbally changed your mind with the you of 15 years ago?
DHH (02:23:09) Yes.

Why managers are useless

Lex Fridman (02:23:10) That’s interesting. Have you noticed yourself changing your mind quite a bit over the years?
DHH (02:23:17) 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.”
(02:24:11) We tried that for a couple of years where we hired some very good engineering managers who did engineering management the way you’re supposed to do it, the way it’s done all over the place, and after that, I thought, “No. No, I was right. This was correct, we should not have had managers.” Not every programmer needs a therapy session with an engineering manager every week, we don’t need these endlessly scheduled huddles, we don’t need all these meetings. We just need to leave people the hell alone to work on problems that they enjoy for long stretches of uninterrupted time. That is where happiness is found, that’s where productivity is found, and if you can get away with it, you absolutely should. Engineering management is a necessary evil when that breaks down.
Lex Fridman (02:24:54) What’s the case for managers then?
DHH (02:24:57) The case for managers is that, if you do have a lot of people, there’s a bunch of work that just crops up. The one-on-one is one example, that programmers need someone to check in with, there’s another idealized version that someone needs to guide the career of juniors, for example, to give them redirecting feedback, and all this other stuff. It’s not that, in the abstract, I don’t agree with some of those things, but in practice, I’ve found that they often create more problems that they solve. A good example here is, can you get feedback from someone who’s not better at your job than you are? You can get some feedback, you can get feedback on how you show up at work. Are you being courteous to others? Are you being a good communicator? Okay, yes, but you can’t get feedback on your work, and that’s more important.
(02:25:44) It’s more important that you work under and with someone who’s better at your job than you are if you wish to progress in your career, and every single programmer I’ve ever worked with was far more interested in progressing in their career on that metric, getting better at their craft, than they were in picking up pointers that a middle manager could teach them. That’s not saying that there isn’t value in it, it’s not saying there isn’t value in being a better person or a better communicator. Of course, there is all those things, but if I have to choose one or the other, I value competence higher. Again, I cavit this a million times, because I know what people sometimes hear, they hear the genius asshole is just fine, and that’s great and you should excuse all sorts of malicious behavior if someone’s just really good at what they do.
(02:26:30) I’m not saying that at all. What I am saying is that the history of competence is a history of learning from people who are better than you, and that relationship should take precedence over all else. That relationship gets put aside a bit when engineering manager’s introduced. Now, the funny thing is this conversation ties back to the earlier things we were talking about. Most engineering managers are actually former programmers. They at least know program to some extent, but what I’ve seen time and again is that they lose their touch, their feel with it very, very quickly and turn into pointy-haired bosses very, very quickly who are really good at checking for updates, “Just seeing where we are on project A here if you need anything,” or, “We’re really to deliver?” Okay, yes. Also, no. Shut up, leave me the hell alone. Let me program and then I’ll come up for air.
(02:27:22) I’ll talk with other programmers who I can spar with, that we can learn something with, where I can turn the problems over with and we can move forward. If you look back on the history of computer industry, all the great innovation that’s happened, it’s all been done by tiny teams with no engineering managers. Just full of highly-skilled individuals. You’ve had John Carmack on here. I used to look up to its software so much, not just because I love Quake, not just because I loved what they were doing, but because he shared a bit about how the company worked. There were no managers or maybe they had one business guy doing some business stuff, but that was just to get paid. Everything else was basically just designers and programmers, and there were about eight of them and they created goddamn Quake 2. Why do you need all these people again?
(02:28:09) Why do you need all these managers again? I think, again, at a certain scale, it does break down. It’s hard to just have 100,000 programmers running around wild without any product mommies or daddies telling them what to do. I understand that. Then even as I say that, I also don’t understand it, because if you look at something like Gmail for example, that was like a side project done by Buchheit at Google at the time. So much of the enduring long-term value of even all these huge companies were created by people who didn’t have a god damn manager, and that’s not an accident. That’s a direct cause and effect. I’ve turned in some way even more militant over the years against this notion of management, at least for myself and knowing who I am and how I want to work, because the other part of this is I don’t want to be a manager, and maybe this is just me projecting the fact that I’m an introvert who don’t like to talk to people on one-on-one calls every week, but it also encapsulates how I was able to progress my career.
(02:29:06) I did not really go to the next level with Ruby or otherwise until I had a door I could close and no one could bother me for six hours straight.
Lex Fridman (02:29:15) In companies probably one of the reasons is it’s very easy to hire managers, and managers also delegate responsibility from you, so if you just have a bunch of programmers running around, your response… It’s work, it’s intellectual work to have to deal with the first principles of every problem that’s going on.
DHH (02:29:39) Yep.
Lex Fridman (02:29:39) Manager’s like, “You can relax, all will be taken care of,” but they then hire their own managers, and it just multiplies and multiplies and multiplies. I would love it if some of the great companies we have in the United States, if there was an extra side branch that we could always run… Maybe physicists can come up how to split the simulation to where it just all the managers are removed. Just in that branch, just the PR and the comms people also, and even the lawyers. Just the engineers and let’s just see, and then we merge it back.
DHH (02:30:16) I have a sense you run that branch at 37 singles for 20 years. I’ve experimented with forking back on the other side, I’ve experimented with having a full-time lawyer on staff, I’ve experimented with having engineering managers, and I can tell you life is much better at 50, 60 people when none of those individuals or none of those roles… It’s never about the individuals, it’s about the roles. None of those roles are in your organization full-time. Occasionally, you need a manager. Occasionally, you need a lawyer. I can play the role of manager occasionally, fine, and then I can set it back down to zero. It’s almost like a cloud surface. I want a manager service I can call on for seven hours this week and then I want to take it down to zero for the next three months.
Lex Fridman (02:31:01) Yeah, I read, I don’t know if this is still the case, that Basecamp is an LLC and doesn’t have a CFO, like a full-time accountant. Is that [inaudible 02:31:10].
DHH (02:31:10) These days, we do have a head of finance. We did not for the first 19 years of life, I think. We got away with basically just having an accountant do our books in the same way you would do a small ice cream shop, except we would, over time, have done hundreds of millions of dollars in revenue. The scale seemed quirky and, at some point, you can also fall in love with your own quirkiness to a degree that isn’t actually healthy, and I’ve certainly done that over time, and we should have had count the beans a little more diligently, a little earlier. This was part of a blessing of just being wildly profitable and selling software that can have infinite margins, basically, that you can get away with a bunch of stuff that you perhaps shouldn’t. What partially taught me this lesson was when we realized we had not been collecting sales tax in different US states where we had Nexus, and it took us about two years and $5 million in settlements and cleanups to get out of that mess. After that, I went like, “Okay, fine, we can hire a finance person.”
Lex Fridman (02:32:10) Okay.
DHH (02:32:11) We now have a wonderful finance person, Ron, who actually ended up replacing something else we used to have. We used to have a full-time data analytics person who would do all sorts of insight mining for, “Why are people signing up for this thing?” We ran that for 10 years and realized, “You know what? If I can have either a data analytics person or an accountant, I’m picking the accountant.”

Small teams

Lex Fridman (02:32:30) 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.
DHH (02:32:47) Worse is better on adoption with technology a lot of times.
Lex Fridman (02:32:51) Yeah.
DHH (02:32:51) I think it actually comes out of the same thing. It comes out of the fact that many of the great breakthroughs are created by not even just tiny teams, but individuals, individuals writing something. An individual writing something on some parameter, what they do is worse. Of course, it’s worse when one person has to make something that a huge company have hundreds if not thousands of developers that they can have work on that problem, but in so many other parameters, that worstness is the value, that less is the value. In Getting Real, which we wrote back in 2006, we talk about this notion of less software. When we first got started with Basecamp back in 2004, people would ask us all the time, “Aren’t you petrified of Microsoft? They have so many more resources, they have so many more programmers. What if they take a liking to your little niche here and they show up and they just throw a thousand programmers at the problem?”
(02:33:46) My answer, perhaps partly because I was like 24 was, first of all, “No, no care in the world,” but the real answer was they’re not going to produce the same thing. You cannot produce the software that Basecamp is with a team of a 1,000 people. You will build the software that 1,000 people build, and that’s not the same thing at all. So much of the main breakthrough in both end-user systems but also in open-source systems and fundamental systems, they’re done by individuals or very small teams. Even all these classical histories of Apple has always been like, well, there’s a big organization, but then you had the team that was actually working on the breakthrough. It was four people, it was eight people, it was never 200.
Lex Fridman (02:34:32) The large team seems to slow things down.
DHH (02:34:36) Yes.
Lex Fridman (02:34:37) It’s so fascinating, part of it’s the manager thing.
DHH (02:34:40) Because humans don’t scale, communication between humans certainly don’t scale. You basically get the network-cost effect. Every time you add a new node, it goes up exponentially. This is perhaps the key thing of why I get to be so fond of having no managers at Basecamp, because our default team size is two. One programmer, one designer, one feature. When you’re operating at that level of scale, you don’t need sophistication, you don’t need advanced methodologies, you don’t need multiple layers of management, because you can just do. The magic of small teams is that they just do. They don’t have to argue, because we don’t have to set direction, we won’t have to worry about the road map. We can just sit down and make something, and then see if it’s good. When you can get away with just making things, you don’t have to plan, and if you can get out of planning, you can follow the truth that emerges from the code, from the product, from the thing you’re working on in the moment.
(02:35:43) You know far more about what the great next step is when you’re one step behind, rather than if you try 18 months in advance to map out all the steps. “How do we get from here to very far away?” You know what? That’s difficult to imagine in advance, because humans are very poor at that. Maybe AI one day will be much better than us, but humans can put one foot in front of each other. That’s not that hard, and that allows you to get away with all that sophistication. The process has become much simpler, you need far fewer people, it compounds, you need much less process, you need to waste less time in meetings. You can just spend these long glorious days and weeks of uninterrupted time solving real problems you care about and that are valuable, and you’re going to find that that’s what the market actually wants.
(02:36:33) No one is buying something because there’s a huge company behind it, most of the time. They’re buying something because it’s good, and the way you get something good is you don’t sit around and have a meeting about it, you try stuff, you build stuff.
Lex Fridman (02:36:48) It really is incredible what one person, honestly one person can do in 100 hours of deep work, of focused work. Even less.
DHH (02:36:58) I’ll tell you this, I tracked exactly the number of hours I spent on the first version of Basecamp. I was doing this, because at the time, I was working on a contract basis for Jason. He was paying me… I was going to say $15 an hour, that’s what I got paid when we first got started. I think he had bumped my pay to a glorious $25, but I was billing him, and I know that the invoice for the first version of Basecamp was 400 hours. That’s what it took for one sole individual in 2004 to create an entire system that has then gone on to gross hundreds of millions of dollars and continues to do extremely well. One person, just me setting up everything. Part of that story is Ruby, part of that story’s Rails, but a lot of it is also just me plus Jason plus Ryan plus Matt.
(02:37:46) That was the entire company at the time, and we could create something of sheer sustaining value with such a tiny team, because we were a tiny team. Not despite off. Small is not a stepping stone. This is the other thing that people get into their head, this is one of the big topics about a rework, that it gave entrepreneurs the permission to embrace being a small team not as a waypoint, not as, “I’m trying to become 1,000 people.” No, I actually like being a small team. Small teams are more fun. If you ask almost anyone, I’m sure Toby would say this too, even at his scale, the sheer enjoyment of building something is in the enjoyment of building it with a tiny team. Now, you can have impact at a different scale when you have a huge company, I fully recognize that and I see the appeal of it, but in the actual building of things, it’s always small teams. Always.

Jeff Bezos

Lex Fridman (02: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?
DHH (02:38:55) Don’t take venture capital.
Lex Fridman (02:38:56) Okay, that that’s step one.
DHH (02:38:57) That is point number one.
Lex Fridman (02:39:00) First of all-
DHH (02:39:00) Number two is-
Lex Fridman (02:39:01) … everybody takes venture capital, so you already went.
DHH (02:39:05) That’s been the answer for the longest time, because the problem isn’t just venture capital, it’s other people’s money. Once you take other people’s money, completely understandably, they want a return, and they would prefer to have the largest return possible, because it’s not them sitting in the code, it’s not them getting the daily satisfaction out of building something, chiseling beautiful code poems out of the editor, right? They don’t get that satisfaction. They get the satisfaction maybe of seeing something nice put into the world, that’s fair, but they certainly also get a satisfaction of a higher return. There is this sense, certainly in venture capital, stated in venture capital, that the whole point of you taking the money is to get to $1 billion or more.
(02:39:44) Now, the path to that usually does go through running established playbooks, and then when it comes to software, the enterprise sales playbook is that playbook. If you’re doing B2B, software SaaS, you will try to find product market fit, and the second you have it, you will abandon your small and medium-sized accounts to chase the big whales with a huge sales force and, by then, you’re 1,000 people and life sucks.
Lex Fridman (02:40:10) That said, people are just curious about this. Have gotten a chance to get to know Jeff Bezos. He invested in Basecamp, not controlling…
DHH (02:40:22) He bought secondaries. This was the funny thing, is that when… Investing have these two dual meanings. Normally, when people think about investing, they think you’re putting in growth capital, because you want the business to hire more people, to do more R&D, so they can grow bigger. Bezos didn’t do that, actually. He bought an ownership stake directly from Jason and I, and 100% of the proceeds of that purchase went into my and Jason’s bank account. Personal bank accounts. Not a single cent went into the account of the company, because we didn’t need the money to grow. What we needed or what we certainly enjoyed was, to some extent, maybe the vote of confidence, but more so the security of taking a little bit off the tables is that we dared turn down the big bucks from venture capitals.
(02:41:14) It was essentially a vaccine against wanting to take a larger check from people who then wanted to take the company to something enormous that we didn’t want to go with it. Jeff gave Jason and I just enough money that we were comfortable turning all these people down in a way where, if it had turned belly up six months later, we wouldn’t have been kicking ourselves and gone, “We had something here that was worth millions, and now we have nothing and I have to worry about rent and groceries again.”
Lex Fridman (02:41:44) It is a vote of confidence. I’d love to hear Jeff’s side of this story of why, because he doesn’t need the money. I think it probably is just believing in people and wanting to have cool stuff be created in the world and make money off of it, but not like-
DHH (02:42:05) 100% the motivation for Jeff wasn’t a return, because he actually has a team, his private office, that runs these investments, who did the calculus on the investment pitch we gave him, which was so ridiculous that Jason and I were laughing our asses off when we were writing down our metrics. I was like, “No one’s going to pay this. No one is going to give us this multiple of this amount of revenue, and that’s fine.” I mean, we took the call essentially out of an awe that Jeff Bezos even wanted to look at us. “Do you know what? We don’t want venture capital, we don’t need other people’s money, but let’s just give him a bullshit number that no sane person would actually say yes to, and then we can each go our own way.”
(02:42:48) His investment team said like, “Jeff, no way. This makes no economic sense at all, they’re asking for way too much money with way too little revenue,” and Jeff just went like, “I don’t care, I want to invest in this guy,” because to him, at the time, it was chump change. Jason and I each got a few million dollars, whatever the currency swing between the yen and the dollar that day probably moved 10X for his net worth than our investment did. Jeff seemed genuinely interested in being around interesting people, interesting companies, helping someone go to distance. I actually look back on that relationship with some degree of regret, because I took that vote of confidence for granted in ways that I’m a little bit ashamed of. Over the years, I’ve been more critical about some of the things that Amazon had done that I feel now is justified.
(02:43:41) That’s just part of that processing of it, but on the economic sense, he gave us that confidence. He gave us the economic confidence, but then he also gave us the confidence of a CEO running, perhaps at the time the most important internet business in the US, showing up to our calls, which we would have with him once a year, and basically, just going like, “Yeah, you guys are doing awesome stuff. You should just keep doing awesome stuff. I read your book, it’s awesome. You launched this thing, it’s awesome. You should just do more of that. I don’t actually know how to run your business, you guys know.”
Lex Fridman (02:44:13) The book was out. From a fan perspective, I’m curious about how Jeff Bezos is able to see… Because to me, you and Jason are special humans in the space of tech, and the fact that Jeff was able to see that, right? How hard is it to see that?
DHH (02:44:29) He certainly saw it very early, and I think this is something that Jeff does better than almost anyone else. He spots that opportunity so far in advance of anyone else even opened their eyes to it, or certainly is willing to bet on it far early and far harder than anyone else is, and he’s just right time and again. We were not the only investment that he made and, certainly, Amazon had an extremely long-term vision, far longer than I have ever had the gumption to keep… I think of myself as a long-term thinker, I’m playing a child’s game compared to the game that Jeff is playing. When I looked at Amazon’s economics around the dot-com boom and bust, they looked ridiculous. They were losing so much money, they were so hated by the market. No one believed that it was going to turn into what it is, but Jeff did in a way that, that level of conviction, I really aspire to.
(02:45:23) I think that’s one of the main things I’ve taken away from that relationship is that you can just believe in yourself. To that degree against those odds? That’s ridiculous. He did that so many times at our level that it’s pathetic if I’m doubting myself.
Lex Fridman (02:45:42) Yeah. I think Amazon is one of those companies. It’s come under a bunch of criticism over the years. This is something about humans that I don’t appreciate so much, that we take for granted the positive that a thing brings real quick, and then we just start criticizing the thing. It’s the Wi-Fi and the airplanes.
DHH (02:46:02) That’s exactly it.
Lex Fridman (02:46:04) I think Amazon, there could be a case made that Amazon is one of the greatest companies in the last 100 years.
DHH (02:46:15) For sure, I think it’s an easy case to make. What I also think is that the price you pay to be one of the greatest companies in the last 100 years is a lot of detractors, a lot of pushback, a lot of criticism. That this is actually order restored in the universe. One of my favorite teachers in all the time I’ve been on the internet is Kathy Sierra. I don’t know if you know her work, but she was active for only a few short years before the cruel internet ran her off, but she wrote a blog called Creating Passionate Users, and she carved into my brain this notion of balance in the universe. If you’re creating something of value that a lot of people love, you must create an equal and opposite force of haters. You cannot have people who love what you do without also having people who hate what you do.
(02:47:05) The only escape from that is mediocrity. If you are so boring and so uninteresting that no one gives a damn whether you exist or not, yeah, you don’t get the haters, but you also don’t get the impact of people who really enjoy your work. I think Amazon is that just at the massive scale, right? They’ve brought so much value and change to technology, to commerce that they must simply have a black hole size of haters. Otherwise, the universe is simply going to tip over.
Lex Fridman (02:47:34) Let me ask you about small teams. You mentioned Jason a bunch of times, Jason Fried. You have been partners for a long, long time. Perhaps it’s fair to say he’s more on the the design, business side and you’re the tech, the engineering wizard. How have you guys over all these years, creating so many amazing products, not murder each other? It’s a great story of partnership. What can you say about collaboration? What can you say about Jason that you love, that you’ve learned from? Why does this work?
DHH (02:48:07) First, I’ll say we have tried to murder each other several times over the years, but far less, I think in the last decade. In the early days, our product discussions were so fierce that, when we were having them in the office and there were other employees around, some of them were legitimately worried that the company was about to fall apart, because the volume coming out of the room would be so high and sound so acrimonious that they were legitimately worried the whole thing was going to fall apart. You know what’s funny? Is that it never felt like that in the moment. It always felt like just a peak vigorous search for something better, and that we were able to stomach that level of adversity on the merits of an idea, because it was about the idea. It wasn’t about the person and it never really got personal. Not even never, really, it didn’t get personal. It wasn’t like, “Jason, you’re an asshole.” It was like, “Jason, you’re an idiot, and you’re an idiot because you’re looking at this problem the wrong way, and let me tell you the right way to do it.”
Lex Fridman (02:49:21) As a small tangent, let me say that some people have said, we’ll probably return to this, that you sometimes can have flights of temper on the internet and so on. I never take it that way, because it is the same kind of ilk. Maybe I haven’t seen the right traces of temper, but usually, it’s about the idea, and it’s just excited, passionate human.
DHH (02:49:46) That’s exactly what I like to think of it as. It doesn’t always come across as that and I can see why spectators in particular sometimes would see something that looks like I’m going after the man rather than the ball. I do think I’ve tried to get better at that, but in my relationship with-
DHH (02:50:00) I do think I’ve tried to get better at that, but in my relationship with Jason, I think it’s worked so well because we have our own distinct areas of competence, where we fully trust each other. Jason trusts me to make the correct technical decisions. I trust him to make the correct design and product direction decisions, and then we can overlap and share on the business, on marketing, on writing, on other aspects of it. So that’s one thing, is that if you’re starting a business with someone where you do exactly the same as they do, and you’re constantly contesting who’s the more competent person, I think that’s far more difficult and far more volatile. So if you’re starting a business and you’re both programmers and you both work on the same kind of programming, good luck. I think that’s hard.
(02:50:49) I tried to pick an easier path, working with a designer, where I knew that at least half of the time I could just delegate to his experience and competence and say like, do you know what? I may have an opinion. I have an opinion all the time on design, but I don’t have to win the argument because I trust you. Now, occasionally we would have overlaps on business or direction where we’d both feel like we had a strong stake in the game and we both had a claim to competence in that area, but then for whatever reason, we also both had a long-term vision, where I would go, do you know what? I think we’re wrong here, but as I learned from Jeff Bezos, by the way, I’m going to disagree and commit. That was one of those early lessons he gave us, that was absolutely crucial and perhaps even instrumental in ensuring that Jason and I have been working together for a quarter of a century. Disagree and commit is one of the all time Jeff Bezos’ greats.
Lex Fridman (02:51:42) I’m just surprised that Yoko Ono hasn’t come along. You know what I mean? There’s so many Yokos in this world.
DHH (02:51:51) It might’ve happened if not in part because we don’t sit on each other’s lap all the time. Most of our careers, we haven’t even lived in the same city. I lived in Chicago for a couple of years while we were getting going after I’d moved to the US in 2005, but then I moved to Malibu and then I lived in Spain and then I lived in Copenhagen. And Jason and I, from the foundation of our relationship learned how to work together in a remarkably efficient way where we didn’t have to actually talk that much. On any given week, I’d be surprised if Jason and I spent more than two hours of direct exchange and communication.
Lex Fridman (02:52:33) Yeah. Sometimes it’s the basic human frictions that just accumulate all time.
DHH (02:52:37) Yes. I think if you rub up against another person, that person damn well better be your spouse, if it’s too much for too long.
Lex Fridman (02:52:43) Yeah. But even there, COVID has really tested the relationship. It’s fascinating to watch.
DHH (02:52:48) It has, and I do think that having some separation, which is kind of counterintuitive because I think a lot of people think the more collaboration you can have, the better. The more ideas that can bounce back and forth, the better. And both Jason and I, for whatever reason came to the conclusion early on in careers, absolutely not. That’s complete baloney. This is why we were huge proponents of remote work. This is why I enjoy working in my home office where I can close the door and not see another human for six hours at the time. I don’t want to bounce ideas off you all the time. I want to bounce ideas off you occasionally and then I want to go off and implement those ideas.
(02:53:24) There’s way too much bouncing going on and not enough scoring, not enough dunking, and I think this is one of the great traps of executive rule. Once a founder elevates themselves all the way up to an executive, where what they’re doing is just telling other people what to do, that’s the realm they live in 24/7. They just live in the idea realm. Oh, I can just tell more people, more things what to do and we can just see it happen. If you actually have to be part of implementing that, you slow your horse. Do you know what? I had a good idea last week. I’m going to save the rest of my good ideas until next month.

Why meetings are toxic

Lex Fridman (02:53:58) 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-
DHH (02:54:11) Yes. Their job is telling other people what to do.
Lex Fridman (02:54:13) Yeah. And the meeting, so this is one of the big things you’re against is meeting-
DHH (02:54:17) Meetings are toxic. And this really I think ties into this with Jason and I. If I had to count out the total number of meetings we’ve had in 24 years of collaborations, where we in person sat in front of each other and discussed a topic, probably it’d be less than whatever three months at a fan company. We just haven’t done that that much. We haven’t worn it out. One of this funny metaphors that Trump came up with at one point was, a human has a limited number of steps in their life. That’s the longevity argument here. You can do so much activity and then you run out.
(02:54:53) There’s some kernel in that idea that can be applied to relationship. There’s some amount of exchange we can have. There’s some amount of time we can spend together, where you can wear it out. Jason and I were diligent about not wearing each other out, and I think that is absolutely key to the longevity of the relationship combined with that level of trust and then just combining with the level that we really like the work itself. We don’t just like the brainstorming the [inaudible 02:55:21] where we just come up with good ideas. Now we like to do the ideas, and we like to be part of that process directly ourselves. I like to program, he likes to do design. We could go off and do our little things for long stretches of time. In case you come together and go like, hey, let’s launch a great product.
Lex Fridman (02:55:35) This might sound like I’m asking you to do therapy, but I find myself to sometimes want or long for a meeting because I’m lonely. Remote work is just sitting by yourself, I don’t know, it can get really lonely for long stretches of time.
DHH (02:55:56) Let me give you a tip. Get a wife.
Lex Fridman (02:56:00) Yes. God, damn it.
DHH (02:56:03) Get a couple kids.
Lex Fridman (02:56:05) All right.
DHH (02:56:05) Family really is the great antidote to loneliness, and I mean that as sincerely as I can possibly say it. I certainly had exactly that feeling you described early in my career when I was working remotely, and I was just like me living in an apartment, a total stereotype, where for the longest time when I first moved to Chicago, all I had on the floor was a mattress. And then I bought this big TV and I didn’t even mount it, and then I had a stack of DVDs. And I was basically, I was working a lot of time and then I would just go home and I’d do that, and it wasn’t great. It really wasn’t. I do think that humans need humans. And if you can’t get them at work, and I actually sort of kind of don’t want them at work, at least I don’t want them for 40 hours a week. That’s not what I prefer.
(02:56:51) You need something else. You need other relationships in your life, and there is no greater depth of relationship if you can find someone that you actually just want to spend a lot of time with. That’s key to it and I think it’s key for both Jason and I that we’ve had families for quite a long time, and it grounds you to in a way where the sprint of a startup can get traded in for the marathon of an enduring company, and you get settled in a way. We talked briefly about sometimes I get fired up. I mean, a lot of times, maybe even most of the times I get fired up about topics, but I don’t get fired up in the same way now as I used to when I was 24. I’m still extremely passionate about ideas and trying to find the right things, but having a family, meeting my wife, building a life around that has just mellowed everything out in a completely cliche way, but I think it’s actually key.
(02:57:51) I think if we could get more even younger people not to wait until they were in their god-damn 30s or early 40s to hitch up with someone, we’d be better off and we’d have more stable business relationships as well, because folks would get that nurturing human relation somewhere else. Now, when I say all of that, I also accept that there are plenty of great businesses that’s been built over the years that have not been built remote, that have been built by a gang of hooligans sitting in an office for immense hours at time.
(02:58:23) I mean, both John Carmack and Tim Sweeney talked about that in the ’90s with their careers that that was just basically work, sleep, hang out with the guys at the office, right? Totally fair. That never appealed to me. Both Jason and I saw eye to eye on the idea that 40 hours a week dedicated to work was enough that if we were going to go to distance for not just the five to seven years it takes to build a VC case up to an exit, but for potentially 10 years, 20 years or further, we needed to become whole humans, because only that whole human-ness was going to go to distance, which included building up friendships outside of work, having hobbies, finding a mate and having a family. And that entire existence, those legs of the stool that work is not the only thing in life is completely related to the fact that we’ve been around for 25 years. There’s way too much, especially in America of false trade-offs. Oh, you want to build a successful business? Well, you can either have money enjoyment or family or health, pick one.
(02:59:40) What? Why do we have to give up all of this? Now, again, I’m not saying, and there are moments, prayers, life where you can sprint, but I am saying if that sprint turns into a decade, you’re going to pay for it. And you’re going to pay for it in ways I’ve seen time and again, seemed like a very bad trade, that even if it works. And by the way most of the time it does not. Most of the time startups go bust. Most of the times people spend five, seven years or something that does not pan out, and they don’t get the payout. And then they just sit with regret of like, what the fuck happened to my 20s? Early on, Jason and I basically made the pact that working together was not going to lead to that kind of regret, that we were going to allow ourselves and each other to build a whole life outside of work. And the fact that that worked is something I feel is almost like forbidden knowledge.
(03:00:38) Certainly in technology circles in US, it’s something that we’ve tried to champion for 20 years and we still get slacked for. Just two days ago, I had another Twitter beef with someone saying like, “Oh, well, okay, maybe it worked, but you didn’t turn into Atlassian, so you’re a failure. Basecamp isn’t Jira, so why are you even bothering?” And it’s such a fascinating winner-takes- all mentality that unless you dominate everyone else in all the ways, you’ve lost. When so much of life is far more open to multiple winners, where we can end up with a business that have made hundreds of millions of dollars over the years and we’ve kept much of that to do whatever we want and that that’s enough. That’s good. That’s great. That’s actually something worth aspiring to. Certainly, it should be a path for someone to consider choosing rather than the VC unicorn of bust mentality that dominates everything.

Case against retirement

Lex Fridman (03:01:39) 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.
DHH (03:02:40) 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].
Lex Fridman (03:03:38) Nice, the pronunciations.
DHH (03:03:40) Do you know what? I had to practice that with AI over the last few days because I knew I was going to cite him and I butchered his name several times. So AI taught me how to pronounce that at least somewhat correctly. But his main work over his career was essentially the concept of flow that came out of a search for understanding happiness. Why are some people happy? When are they happy? And what he learned was quite illuminating. He learned that people aren’t happy when they sit on Mojito Island. They’re not happy when they’re free of all obligations and responsibilities. No. They’re happy in these moments where they’re reaching and stretching their capacities just beyond what they can currently do. In those moments of flow, they can forget time and space. They can sit in front of the keyboard, program a hard problem, think 20 minutes have passed and suddenly it’s been three hours.
(03:04:36) They look back upon those moments with the greatest amount of joy, and that is what peak happiness is. If you take away the pursuit of those kinds of problems, if you eliminate all the problems from your plate, you’re going to get depressed. You’re not going to have a good time. Now, there are people who can do that, but they’re not the same kind of people who built these kinds of companies. So you have to accept the kind of individual you are. If you are on this path, don’t bullshit yourself. Don’t bullshit yourself into thinking, I’m just going to sacrifice everything, my health, my family, my hobbies, my friends, but in 10 years I’m going to make it all up, because in 10 years I can do it.
(03:05:15) It never works out like that. It doesn’t work out on both ends of it. It does not work out if you’re successful and you sell your company, because you’ll get bored out of your mind after two weeks on retirement. It doesn’t work out if the company is a failure and you regret the last 10 years spent for nothing. It doesn’t work out if it all works and you stay in the business because it never gets any easier. So you’re going to fail on all metrics if you just go, there’s only work and nothing else. And I didn’t want that. I wanted the happiness of flow. I understood that insight was true, but I wanted to do it in a way where I could sustain the journey for 40 or 50 years.
Lex Fridman (03:05:53) And there’s other interesting caveat that I’ve heard you say is that if you do exit and you sell your company, and you want to stay in, you want to do another company, that’s going to usually not be as fulfilling because really your first baby like…
DHH (03:06:09) You can’t do it again or most people can’t do it again. A, because their second idea is not going to be as good as the first one. It is so rare to capture lightning in the bottle like we have, for example with Basecamp. I know this from experience because if you’re trying to build a lot of other businesses since, and some of them have been moderate successes, even good successes, none of them have been Basecamp. It’s really difficult to do that twice. But founders are arrogant pricks, including myself, and we like to think that, do you know what we succeeded in large part because we’re just awesome. We’re just so much better than everyone else. And in some ways that’s true some of the time, but you can also be really good at something that matters for a hot moment. That door is open, the door closes. Now you’re still good at the thing, but it doesn’t matter. No one cares.
(03:06:54) There’s that part of it. And then there’s the part of it that going back to experience things for the first time only happens the first time. You can’t do it again. I don’t know if I have it in me to go through the bullshit of the early days again. And I say bullshit in the sense of the most endearing sense. It’s all great to do it. I know too much. This is one of the reasons why whenever I’m asked the questions, if you could tell your younger self something that would really, what would you say to your younger self? I would fucking not say a thing. I would not rob my younger self of all the life experiences that I’ve been blessed with due to the ignorance of how the world works. Building up the wisdom about how the world works is a joy, and you got to build it one break at a time.
(03:07:40) If you just handed all the results, it’s like, oh, should we watch your movie? Here’s how it ends. I don’t want to watch the movie now. You spoiled it. I don’t want you to spoil my business experience. I don’t want to spoil any of my ignorance. The greatest blessing half the time when you’re starting something new is A, you don’t know how hard it’s going to be. B, you don’t know what you don’t know. The adventure is to pay off. The responsibility is to pay off. This is something Jordan Peterson has really taught me to articulate. This notion that responsibility is actually key to meaning.
(03:08:16) Man’s Search for Meaning, Viktor Frankl talks about this as well, that we can endure any hardship if there’s a reason why. Now, he talked about it in truly life altering concentration camp ways, but you can also apply at a smaller scale with less criticality of even just your daily life that all that hardship in building the original business that is responsibility you take upon yourself. The appeal, the reason you take that on you is in part because you don’t know fully what it entails. If you had known upfront, if I had known upfront how hard it would be, how much frustration there’d be along the way, if you just told me that in a narrative before I got started, I would’ve been like, eh, maybe I should just go get a job.

Hard work

Lex Fridman (03: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…
DHH (03:09:37) I think you should stretch. Should you have to stretch for a decade? I’m not so sure.
Lex Fridman (03:09:40) Yeah. The decade thing is 20s is a special time.
DHH (03:09:43) It’s a lot to trade. You don’t get your 20s back, you don’t get your 30s back, you don’t get your 40s back. I would’ve regret it personally if I hadn’t done the other things I did in my 20s. If I hadn’t had the fun I had, if I hadn’t had the friends I had, if I hadn’t built up the hobbies that I did, if I hadn’t started driving race cars at an early enough age to actually get really good at it, if I had just gone all in on business because I would’ve got the same out in the end. This is something Derek Sivers really taught me, is he has this great essay about how when he went for a bike ride, he could go really hard all out and he could do the ride, I think, in whatever 19 minutes, or he could enjoy the ride, go 5% slower, do the ride in 21 minutes and realize there’s only two minutes apart.
(03:10:32) Either I go all in all the time, there’s nothing else, I’m completely exhausted at the [inaudible 03:10:37] or I traveled the same distance and I arrived maybe two minutes later, but I got to enjoy the scenery, listen to the birds, smell the flowers. That journey is also valuable. Now, I say that while accepting and celebrating that if you want to be the best at one thing in the world, no, you have to sacrifice everything. You have to be obsessed with just that thing. There is no instant of someone who’s the best in the world at something who’s not completely obsessed. I didn’t need to be best at anything. This was a rare blessing of humility I had early on is like, do you know what? I am not that smart. I’m not that good. I’m not that talented. I can do interesting things by combining different aspects and elements that I know, but I’m not going to be the best at anything.
(03:11:27) And that released me from this singular obsession with just going, I’m going to be the best programmer in the world. I know I’m not. I fucking failed at it twice before I even got how conditional it’s worked. I’m not smart enough to be the best at anything. I’m not dedicated enough to do that. That’s a bit of a blessing. And I think as a society, we have to straddle both celebrating peak excellence, which we do all the time, and celebrating the peak intensity of mission it takes to become that. And then also going like, do you know what? We don’t all need to be Michael Jordan. There’s only going to be one of those.
Lex Fridman (03:12:04) Well, we should say that there’s certain pursuits where a singular obsession is required. Basketball is one of them. By the way, probably racing. If you want to be the best at F-1 in the world-
DHH (03:12:17) If you want to be Senna, you got to be a maniac.
Lex Fridman (03:12:20) But I would argue that there’s most disciplines like programming allows if you want to be, quote, unquote, “the best,” whatever that means. I think that’s judged at the end of your life. And usually if you look at that path, it’s going to be a nonlinear one. You’re not going to look like the life of an Olympic athlete who’s singular focused. There’s going to be some acid there in the 20s or there’s going to be several detours, which should the true greats, there’s going to be detours, and sometimes they’re not going to be Steve Jobs’ asset type of situation. There’ll be just different companies you’ve worked for different careers or different efforts you allocated your life to, but it’s going to be nonlinear. It’s not going to be a singular focus.
DHH (03:13:09) The way I think about this sometimes is I want a good bargain on learning. I can become in the top 5% of whatever I defined as good at something, much, much easier. Perhaps it’s 20 times easier, a hundred times easier to get into the top 5% than it is to get into the top 0.1%. That’s almost impossibly hard to get into that. But if I’m content just being at the top 5%, I could be at the top 5% on five things at once. I can get really good at writing. I can get decent at driving a race car. I can become pretty good at programming, I can run a company, I can have a family.
(03:13:48) I can do a lot of things at the same time that gives me sort of that variety that almost was idealized. Karl Marx has this idea, oh, I’m going to fish in the morning and hammer in the evening and paint on the weekends, right? That there’s a sense for me at least, where his diagnosis of alienation was true, that just that tunnel vision, there’s just this one thing I’m just going to focus on that gives me a sense of alienation. I can’t stomach.
(03:14:15) When I’m really deep on programming. And sometimes I go deep for weeks, maybe even in a few cases months, I have to come up for air and I have to go do something else like, all right, that was programming for this year. I’ve done my part, and I’m going to go off riding or annoy people on the internet or drive some race cars to do something else, and then I can do the programming thing with full intensity again next year.

Why we left the cloud

Lex Fridman (03: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?
DHH (03:15:14) 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.
Lex Fridman (03:15:20) And for the moon includes?
DHH (03:15:22) Venture Capital includes other things, not caring about cost.
Lex Fridman (03:15:26) But also because AGI is around the corner, you should have been investing into AI, right? Is this just part of-
DHH (03:15:32) Sort of [inaudible 03:15:33]. I think it’s a bit of a muddy argument, but if we just take it at its peak ideal, which I actually think is a reasonable point, is that you can get myopically focused on counting pennies when you should be focused on getting pounds that I’ve optimized our spend on infrastructure by getting out of the cloud, and that took some time and I could have taken that time and spend it on making more features that would attract more customers or spend even more time with AI or done other things. Opportunity cost is real. I’m not denying that. I’m pushing back on the idea that for a company of our size saving $2 million a year on our infrastructure bill, which is about somewhere between 1/2 to 2/3 goes directly to the bottom line, which means its return to Jason or I as owners and our employees part of our profit sharing plan is totally worth doing.
(03:16:34) This idea that cost don’t matter is a very Silicon Valley way of thinking that I again understand at the scale of something maybe, but I also actually think it’s aesthetically unpleasing. I find an inefficient business as I find an inefficient program full of line noise to just be a splinter in my brain. I hate looking at an expense report and just seeing disproportionate waste. And when I was looking at our spend at 37signals a while back, a few years back, I saw bills that did not pass my smell test. I remembered how much we used to spend on infrastructure before the cloud, and I saw numbers I could not recognize in proportion to what we needed. The fact that computers had gotten so much faster over time, shouldn’t things be getting cheaper? Why are we spending more and more money servicing more customers? Yes, but with much faster computers. Moore’s law should be lowering the costs, and the opposite is happening. Why is that happening? And that started a journey of unwinding why the cloud isn’t as great as the deal as people like to think [inaudible 03:17:48].

AWS

Lex Fridman (03: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.
DHH (03:18:03) 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.
(03:18:58) I actually thought that was a compelling pitch. I bought in on that pitch for several years and thought, do you know what? I’m done ever owning a server again. We are just going to rent our capacity, and Amazon is going to be able to offer us services much cheaper than we could buy them themselves because they’re going to have these economies of scale. And I was thinking Jeff’s word ringing, “My competitor’s margin is my opportunity.” That was something he used to drive amazon.com with, that if he could just make 2% when the other guy was trying to make 4%, he would end up with all the money and on volume he would still win.
(03:19:34) So I thought that was the operating ethos for AWS. It turns out that’s not true at all. AWS, by the way, operates at almost 40% margin. So just in that, there’s a clue that competitors are not able to do the competitive thing we like about capitalism, which is to lower costs and so forth. So the cloud pitch in my optics, it’s fundamentally false. It did not get easier, first of all. I don’t know if you’ve used AWS recently. It is hella complicated. If you think Linux is hard, you’ve never tried to set up IAM rules or access parameters or whatever for AWS.
Lex Fridman (03:20:13) AWS was always difficult. It was always [inaudible 03:20:15].
DHH (03:20:14) Well, I think it’s gotten even more difficult, but yes, now some of that is, it’s difficult because it’s very capable and you have a bunch of capacity on tap, and there are reasons I don’t think they’re good enough to justify how complicated the whole jing-a-ma-jing has become. But what’s certainly true is that it’s no longer easier, it’s not easier to use AWS than it is to run your own machines, which we learned when we pulled out the cloud and didn’t hire a single extra person. Even though we operate all our own hardware, the team stayed exactly the same. So you have this three-way pitch, right? It’s going to be easier, it’s going to be cheaper. Certainly wasn’t cheaper. We’ve just proved that by cutting our spend on infrastructure by 1/2 to 2/3 and it’s going to be faster. The last bit was true, but way too many people overestimated the value of that speed.
(03:21:05) If you need a thousand computers online in the next 15 minutes, nothing beats the cloud. How would you even procure that? If we just need another 20 servers, it’s going to take a week or two to get boxes shipped on pallets, delivered to a data center and unwrapped and racked and all that stuff. But how often do we need to do that? And how often do we need to do that if buying those servers is way, way cheaper so we get vastly more compute for the same amount of money? Could we just buy more servers and not even care about the fact that we’re not hyper-optimized on the compute utility, that we don’t have to use things like automatic scaling to figure things out because we have to reduce costs? Yes, we can. So we went through this journey over a realization in early 2023, when I had finally had enough with our bills.
(03:21:57) I wanted to get rid of them. I wanted to spend less money. I wanted to keep more of the money ourselves. And in just over six months, we moved seven major applications out of the cloud in terms of compute, caching, databases to works onto our own servers. A glorious, beautiful new fleet bought from the king of servers, Michael Dell, who really, by the way, is another icon of mine. I saw he just celebrated 41 years in business. 41 years, this man has been selling awesome servers that we’ve been using for our entire existence. But anyway, these pallets arrive in a couple of weeks and we rack them up and get everything going, and we were out, at least with the compute part. We then had a long multi-year commitment to S3, because the only way to get decent pricing in the cloud, by the way, is not to buy on a day-to-day basis, not to rent on a day-to-day basis, but to bind yourself up to multi-year contracts. With compute, it’s often a year. That was in our case.
(03:22:58) And with storage, this was four years. We signed a four-year contract to store our petabytes of customer files in the cloud to be able to get something just halfway decent affordable. So all of these projects came together to the sense that we’re now saving literally millions of dollars, projected about 10 million over five years. It’s always hard. How do you do the accounting exactly and TOC this, that and the other thing, but it’s millions of dollars. But it’s not just that. It’s also the fact that getting out of the cloud meant returning to more of an original idea of the internet. The internet was not the sign such that three computers should run everything. It was a distributed network such that the individual nodes could disappear and the whole thing would still carry on. DARPA designed this such that the Russians could take out Washington and they could still fight back from New York, that the entire communication infrastructure wouldn’t disappear because there was no hub and spoke. It was a network. I always found that an immensely beautiful vision, that you could have this glorious…
DHH (03:24:00) An immensely beautiful vision that you could have this glorious internet and no single node was in control of everything and we’ve returned to much more of a single node controlling everything idea with these hyperscalers. When US-East one, the main and original region for AWS goes offline, which has happened more than a few times over the years, seemingly a third of the internet is offline. That in itself is just an insult to DARPA’s design. It doesn’t detract from the fact that what AWS built was marvelous, I think the Cloud has moved so many things so far forward especially around virtualization, automation, setup, it’s all those giant leaps forward for system administration that’s allowing us now to be able to run things on-prem in a way that smells and feels much like the Cloud just at half the cost or less and with the autonomy and the satisfaction of owning hardware.
(03:24:59) I don’t know the last time you looked at an actual server and took it apart and looked inside of, these things are gorgeous. I posted a couple of pictures of our racks out in the data center and people always go crazy for them because we’ve gotten so abstracted from what the underlying metal looks like in this Cloud age that most people have no idea. They have no idea how powerful a modern CPU is, they have no idea how much RAM you can fit into a 1U rack. Progress in computing has been really exciting especially, I’d say, in the last four to five years after TSMC, with Apple’s help, really pushed the envelope. We sat still there for a while while Intel was spinning their wheels going nowhere and then TSMC, with Apple propelling them, really move things forward and now servers are exciting again. You’re getting jumps year over year in the 15, 20% rather than the single digit we were stuck with for a while and that all means that owning your own hardware is a more feasible proposition than it’s ever been, that you need fewer machines to run ever more and that more people should do it because, as much as I love Jeff and Amazon, he doesn’t need another, whatever, 40% margin on all the tech stuff that I buy to run our business.
(03:26:19) And this is just something I’ve been focused on both because of the ideology around honoring DARPA’s original design, the practicality of running our own hardware, seeing how fast we can push things with the latest machines and then saving the money. And that has all been so enjoyable to do but also so counterintuitive for a lot of people because it seemed, I think, for a lot of people in the industry, that we’d all decided that we were done buying computers, that that was something we would just delegate to AWS and Azure and Google Cloud, that we didn’t have to own these things anymore. So, I think there’s a little bit of whiplash for some people that, oh, I thought we agreed we were done with that and then along come us and say, “Ah, you know what? Maybe you should have a computer.”

Owning your own servers

Lex Fridman (03:27:07) Is there some pain points to running your own servers?
DHH (03:27:10) 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.
(03:27:58) Literally, the entire internet was built on people knowing how to plug in a computer to the internet. Oh, ethernet cable goes here, power cable goes here, let’s boot up Linux. That’s how everyone put anything online until 10, 12 years ago when the Cloud took over. So, the expertise is there and can be rediscovered, you too can learn how to operate a Linux computer.
Lex Fridman (03:28:21) Yeah. And when you get a bunch of them, there’s a bunch of flashing LEDs and it’s just so exciting.
DHH (03:28:26) Well, that’s beautiful, calming, amazing. Computers are really fun. This is actually something I’ve gotten into even deeper after we moved out of the Cloud. Now, my next tingle is that, if you could move out of the Cloud, can you also move out of the data center? Personal servers have gotten really scarily quick inefficient and personal internet connections rival what we connected data centers with just a decade or two ago. So, there’s a whole community around this concept of homelabbing which is essentially installing server hardware in your own apartment, connecting it to the internet and exposing that directly to the internet that harks back to those glorious days of the ’90s when people building for the internet would host the actual website on their actual computer in the closet.
(03:29:20) And I’m pretty fired up about that, I’m doing a bunch of experiments, I’ve ordered a bunch of home servers for my own apartment. I marvel at the fact that I can get a five gigabit fiber connection now, I think. Do you know what five gigabit, that could have taken Basecamp to multiple millions of MRR in the way that back then I ran the whole business on a single box with 2004 technology and probably 100 megabit cable. The capacity we have access to, both in terms of compute and connectivity, is something that people haven’t readjusted to. And this happens sometimes in technology where progress sneaks up on you, this happened with SSDs, I love that by the way.
(03:30:04) We designed so much of our technology and storage approach and database design around spinning metal disks that had certain seek rate properties and then we went to NVMe and SSDs and it took quite a while for people to realize that the systems had to be built fundamentally different now. That the difference between memory and disk was now far smaller when you weren’t spinning these metal plates around with a little head that had to read off them, you were essentially just dealing with another type of memory. I think we’re a little bit in that same phase when it comes to the capacity of new businesses to be launched literally out of your bedroom.
Lex Fridman (03:30:45) So, you can get pretty far with a large user base with homelabbing.
DHH (03:30:50) Absolutely.
Lex Fridman (03:30:51) That’s exciting. That’s like the old school. That’s really exciting, right?
DHH (03:30:54) It’s bringing back the start-up in the garage in the literal physical sense of the word. Now, some of that is do we need to, you can get relatively cheap Cloud capacity if you don’t need very much.
Lex Fridman (03:31:07) Hell, yes, we need to. The feeling of doing that by yourself, of seeing the LED lights in your own home, there’s nothing like that.
DHH (03:31:17) There’s just an aesthetic to it that I am completely in love with and I want to try to push on. Now, it’s not going to be the same thing as getting out of the Cloud? I’m not sure. Our exit out of the cloud was not the exit out of the data center. We basically just bought hardware, shipped it to a professionally managed data center that we didn’t even actually touch. This is the other misconception people have about moving out of the Cloud, that we have a bunch of people who are constantly driving to a data center somewhere to rack new boxes and change dead RAM, that’s not how things happen in the modern world at all. We have a company called Summit, previously Deft, that is what we call white gloves, they work in the data center.
(03:31:54) When we need something like, “Hey, Deft, can you go down and swap the dead SSD in box number six?” They do it and what we see is akin to what someone working with the Cloud would see. You see IP addresses coming online, you see drives coming online, it’s not that different but it is a whole heck of a lot cheaper when you are operating at our scale. And of course it is, of course it’s cheaper to own things if you need those things for years rather than it is to rent it. In no other domain would we confuse those two things that it’s cheaper to own for the long duration than it is to rent.
Lex Fridman (03:32:29) There is some gray area, I’ve gotten a chance to interact with the XAI team a bunch, I’m probably going back out there in Memphis to do a big podcast associated with the Grok release. And those folks, in order to achieve the speed of building up the cluster and to solve some of the novel aspects that have to do with the GPU, with the training, they have to be a little bit more hands-on, it’s less white glove.
DHH (03:32:54) Oh, and I love that. They’re dealing with a frontier problem and they’re dealing with it not by renting a bunch of GPUs at a huge markup from their main competitor, they’re going like, “No, screw that. We’re going to put 100,000 GPUs in our own tents and build it in absolute record time.” So, I think, if anything, this is testament to the idea that owning hardware can give you an advantage both at the small scale, at the medium scale and at the pioneer levels of computing.

Elon Musk

Lex Fridman (03:33:20) 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.
DHH (03:33:48) 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.
(03:34:48) We think of Elon as finding great talent, and I’m sure he is also good at that, but I also think that this beacon of the mission. We’re going to fucking Mars, we’re going to transform transportation into using electricity, we’re going to cover the earth in internet is so grand that there are days where I wake up and go like, “What the fuck am I doing with these to-do lists?” Like, “Jesus, should I go sign up for something like that?”
Lex Fridman (03:35:16) Yeah.
DHH (03:35:17) That sounds invigorating in a sense I can only imagine a Viking back in 1050 going, “Should we go to Normandy? You may die along the way but, oh, boy, does that sound like a journey and an adventure.”
Lex Fridman (03:35:31) There’s a few components there, one definitely this bigger than life mission and really believing it. Every other sentence is about Mars, really believing it. It doesn’t really matter what anybody else, the criticism, anything, there’s a very singular focused big mission. But I think it also has to do a bunch of the other components like being able to hire well once the people, once wants to beacon attracts. And I’ve just seen people that don’t necessarily on paper have a resume with a track record, I’ve seen who now turned out to be legendary people who basically tosses on the ball of leadership, sees something in them and says and gives them the ownership and they run with it and that happens at every scale that, there’s a real meritocracy.
(03:36:23) And there’s just you could see the flourishing of human intellect in these meetings, in these group getting together where the energy is palpable. It’s exciting for me to just be around that because there’s not many companies I’ve seen that in because, when a company becomes successful and larger, it somehow suffocates that energy that, I guess, you see in start-ups at the early stages but it’s cool to see it at a large company that’s actually able to achieve scale.
DHH (03:37:01) I think part of the secret there is that Elon actually knows things and, when you know things, you can evaluate the quality of work products. And when you can evaluate the quality of work products, you can very quickly tell who’s full of shit and who will actually take you to Mars and you can fire the people who is full of shit and you can bet on the people who’ll get us to Mars. That capacity to directly evaluate the competency of individuals is actually a little bit rare. It’s not widely distributed amongst managers, hiring managers. It’s not something you can easily delegate to people who are not very skilled at the work itself. And Elon obviously knows a lot about a lot and he can smell who knows stuff for real.
(03:37:51) And is this, at our tiny scale, something I’ve tried to do in the same order where, when we hire programmers, for example, it’s going to be interesting now with AI as the new challenge, but up until this point, the main pivot point for getting hired was not your resume, was not the schooling you’ve had, it was not your grades, it was not your pedigree, it was how well you did on two things. A, your cover letter because I can only work with people remotely if they’re good writers. So, if you can’t pen a proper cover letter and can’t bother to put in the effort to write it specifically for us, you’re out. Two, you have to be able to program really well to the degree that I can look at your code and go like, “Yeah, I want to work with that person.” Not only I want to work with that person, I want to work on that person’s code when I have to see it again in five years to fix some damn bug.
(03:38:44) So, we’re going to give you a programming test that simulates the way we work for real and we’re going to see how you do. And I’ve been surprised time and again where I thought for sure this candidate is a shoe-in, they sound just right, the CV is just right and then you see the code getting turned in and I’m like, “No way. No way are we hiring this person.” And the other way has been true as well. I’d go like, “I don’t know about this guy or this woman Eeh, I don’t know.” and then they turn in their code stuff and I’m like, “Holy shit, can that person be on my team tomorrow preferably?” The capacity to evaluate work product is a superpower when it comes to hiring.
Lex Fridman (03:39:24) There’s a step that I’ve seen Elon do really well which is be able to show up and say this can be done simpler.
DHH (03:39:31) Yes.
Lex Fridman (03:39:32) But he knows what he’s talking about and then the engineer, because Elon knows enough, the engineer’s first reaction, you can tell, it’s almost like rolling your eyes if your parent tells you something, this is not, no, I’ve been working on this for a month, you don’t … But then, when you have that conversation a little more, you realize, no, it can be done simpler, find the way. So, there’s a good … When two engineers are talking, one might not have perfect information but if the senior engineer has good instinct that’s been battle earned, then you can say simplify and it actually will result in simplification.
DHH (03:40:17) And I think this is the hallmark of the true greats that they, not only have the insight into what’s required to do the work, but they also have the transcendent vision to go beyond what the engineer would do, the programmer would do. I think if we are looking at these rarities, obviously, the myth of Steve Jobs was also this. Even though perhaps he was less technical than Elon is in many ways, he had the same capacity to show up to a product team and really challenge them to look harder for the simplification or for making things greater in a way that would garner disbelief from the people who are supposed to do it. This guy is full of, this is crazy, we can never … And then, two months later, this.
(03:41:05) So, there is something of this where you need the vision, you need it anchored by the reality of knowing enough about what’s possible, knowing enough about physics, knowing enough about software that you’re not just building bullshit. There are plenty of people who can tell a group of engineers, “No, just do it faster,” but that’s not a skill, it’s got to be anchored in something real. But it’s also got to be anchored in, it’s a tired word, but a passion for the outcome to a degree where you get personally insulted if a bad job is done. This is what I’ve been writing about lately with Apple, they’ve lost that asshole who would show up and tell engineers that what they did was not good enough in ways that would actually perhaps make them feel a little small in the moment but would spark that zest to really fix it. Now they have a logistics person who’s very good at sourcing components and lining up production Gantt charts but you’re not getting that magic.
(03:42:12) Now, what’s interesting with that whole scenario was I actually thought how well Tim Cook ran things and has run things at Apple for so long that maybe we were wrong, maybe we were wrong about the criticality of Steve Jobs to the whole mission, maybe you could get away with not having it. I think the bill was just going to come later and now it has, Apple is failing in all these ways that someone who would blow up Steve’s ghost and really exalt him would say like, “See, this is what’s happening now.” So, the other thing here too, of course, is it’s impossible to divorce your perception of what’s a critical component of the system and the messy reality of a million different moving parts in the reality of life and you should be skeptical about your own analysis and your own thesis at all time.

Apple

Lex Fridman (03:43:02) 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?
DHH (03:43:25) 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.
(03:44:23) But then in the early 2000s, Apple emerged as a credible alternative because they bet the new generation of Macs on Unix underpinnings and that allowed me to escape from Microsoft and suddenly I became one of the biggest boosters of Apple. I was in my graduating class at the Copenhagen Business School, I started with the first white iBook, first person using Mac and, by the time we were done in graduating, I had basically converted half the class to using Apple computers because I would evangelize them so hard and demonstrate them and do all the things that a super fan would do and I continued that work over many years.
(03:45:07) Jason and I actually in, I think, 2004, 2005, did an ad for Apple that they posted on the developer side where we were all about Apple is so integral to everything that we do and we look up to them and we are inspired by them. And that love relationship actually continued for a very long time, I basically just became a Mac person for 20 years. I didn’t even care about looking at PCs, it seemed irrelevant to me whatever Microsoft was doing which felt like such a relief because in the ’90s I felt like I couldn’t escape Microsoft and suddenly I had found my escape. And now I was with Apple and it was glorious and they shared so many of my sensibilities and my aesthetics and they kept pushing the envelope and there was so much to be proud of, so much to look up to.
(03:45:53) And then that started to change with the iPhone which is weird because the iPhone is what made modern Apple. It’s what I lined up in 2007 together with Jason for five hours to stand in the line to buy a first generation product where Apple staff would clap at you when you walked out the store, I don’t know if you remember that. It was a whole ceremony and it was part of that myth and mystique and awe of Apple. So, I wasn’t in the market for other computers, I wasn’t in the market for other computer ideas, I thought perhaps I’d be with the Mac until the end of days. But as Apple discovered the gold mine it is to operate a toll booth where you don’t have to innovate, where you don’t actually even have to make anything, where you can just take 30% of other people’s business, there was a rot that crept in to the foundation of Apple and that started all the way back from the initial launch of the app store.
(03:46:55) But I don’t think we saw at the time, I didn’t see at the time, just how critical the mobile phone would become to computing in general. I thought when the iPhone came out that like, “Oh, it’s like a mobile phone, I’ve had a mobile phone since the early ’90s.” Well, it wasn’t a mobile phone, it was a mobile computer and, even more than that, it was the most important computer or it would become the most important computer for most people around the world which meant that, if you like to make software and wanted to sell it to people, you had to go through that computer. And if going through that computer meant going through Apple’s toll booth and not just having to ask them permission which in and of itself was just an indignity. When you’re used to the internet where you don’t have to ask anyone for permission about anything, you buy a domain and you launch a business and, if customers show up, boom, you’re a success and, if they don’t, well, you’re a failure.
(03:47:47) Now, suddenly, before you could even launch, you’d have to ask Apple for permission? That always sat wrong with me. But it wasn’t until we launched HEY in 2001 that I saw the full extent of the rot that has snuck into Apple’s apple.
Lex Fridman (03:48:05) For people who don’t know and we’ll talk about it, HEY is this amazing attempt to solve the email problem.
DHH (03:48:14) Yes. I like to pitch it as what Gmail would’ve been with 20 years of lessons applied in a way where they could actually ship. Gmail was incredible when it launched in 2004 and it still is a great product but it’s also trapped in its initial success. You can’t redesign Gmail today, it just has way too many users. So, if you want fresh thinking on email, I wanted fresh thinking on email, I needed to build my own email system. And not just my own email client, that’s what a lot of people have done over the years, they build a client for Gmail but you’re severely constrained if you don’t control the email server as well. If you really want to move the ball forward with email, you have to control both the server and the client and that was the audacious mission we set out to do with HEY.
(03:49:00) And that was what’s funny, I thought our main obstacle here would be Gmail, it’s the 800-pound gorilla in the email space. Something like 70% of all email in the US is sent through Gmail, I think their world rates are probably in that neighborhood as well, they’re just absolutely huge. And trying to attack an enormous established competitor like that who’s so, actually, still loved by plenty of people and it’s free seems like a suicide mission. And it was only a mission we signed up for because we had grown ambitious enough after making Basecamp for 20 years that we thought we could tackle that problem. So, I thought, hey, this is dumb, I would not advise anyone to go head to head with Gmail, that seems like a suicide mission. We’re going to try anyway because, you know what, if we fail, it’s going to be fine, we’re just going to build a better email experience for me and Jason and the people at the company and our cat and that’ll be okay because we can afford to do so.
(03:50:03) But when we got ready to launch after spending two years building this product, millions of dollars in investment to it, we obviously needed mobile apps. You’re not going to be a serious contender with email if you’re not on a mobile phone and you need to be there with a native client. So, we had built a great native client for both iOS and for Android and, as we were getting ready to launch, we submitted both of them to the app stores, got both of them approved on, I think, Friday afternoon for the iOS app and we then went live on Monday and we were so excited. Hey, world, we’ve been working on this new thing, I’d love for you to check it out. And of course, as with anything when you launch a new product, there are some bugs so we quickly found a few in the iOS client and submitted a new build to Apple. Hey, here’s our bug fixes, can you please update and that’s when all hell broke loose.
(03:50:56) Not only were they not going to approve our update, they said, “Oh, wait a minute, we gave you permission to be in the app store but, I’m sorry, that was a mistake. We see that you’re not using our in-app payment system which means that we don’t get 30% of your business, you will have to rectify that or you can’t be in the app store.” And first I thought, well, it got approved already, we’re running on the same model we’ve run Basecamp on in the app store for a decade, if you’re not signing up through the app and we’re signing up our own customers on our own website and they’re just going to the app store to download their companion app, we’re going to be fine. That was the truth, right? That was why I never got so fired up about the app store. Even as Apple started tightening the screws, it was like, “My business was okay.”
(03:51:42) Now, suddenly, my business wasn’t okay. Apple was willing to destroy HEY if we did not agree to give them 30% of all the signups that came through the iOS app. And it wasn’t just about the 30%, it was also about splitting and not longer having a direct relationship with our customers. When you sell an app in the app store, you’re not selling an app to a customer, you’re selling an app to inventory at Apple and then Apple sells an app to that customer. That customer has a purchasing relationship with Apple so, if you want to give discounts or refunds or whatever, it’s complete hell. If you want to easily support multi-platform, that’s complete hell. If someone signs up for HEY on their iPhone and they want to switch to Android but, that billing relationship, it’s tied to Apple, it’s complete hell. For a million reasons, I did not want to hand my business over to Apple, I did not want to hand 30% of our revenue over to Apple so we decided to do something that seemingly Apple had never heard before, we said no.
(03:52:48) We’re not going to add the in-app payment. I don’t care if you’re threatening us, this is not fair, this is not reasonable, please approve. And of course they didn’t and it escalated and, after a couple of days, we realized, you know what, this isn’t a mistake, this isn’t going away, we’re going to be dead if they go through with this. If we’re not going to yield and give them the 30%, they’re going to kick us off unless we make such a racket, such noise that they will regret it and that’s exactly what then happened. We were blessed by the fact that we launched HEY one week before the WWDC, the Worldwide Developer Conference, where Apple loves to get up on stage and harp on how much they do for developers, how much they love them and why you should build their new devices and so on and so forth.
(03:53:44) And then we also just happened to have a platform on the internet which is very convenient when you need to go to war with a $3 trillion company. So, I started kicking and screaming-
Lex Fridman (03:53:55) Oh, boy.
DHH (03:53:55) … and essentially turning it up to 11 in terms of the fight and going public with our denial to be in the app store. And that turned into a prolonged two-week battle with Apple that essentially ended in the best possible outcome we could have gotten as David fighting Goliath which was a bit of a truce. We wouldn’t hand 30% over to Apple, they wouldn’t kick us out of the app store but we had to build some bullshit dummy accounts such that the app did something when you downloaded it. That was a rule that Phil Schiller seemingly made up on the fly when pressed for the fifth time by the media about why we couldn’t be in the app store when a million other companion apps could. But we just happened to be able to create so much pain and noise for Apple that it was easier for them to just let us be than to keep on fighting.

Tim Sweeney

Lex Fridman (03:54:48) What do you think about Tim Sweeney’s victory with Epic over Apple?
DHH (03:54:54) 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.
(03:55:54) Now, we now learn the actual price tag was 10 times higher, right? Epic spend over 100 million. It would’ve destroyed us to take on Apple in the legal realm, only a company like Epic could do it. And only a company run by founders like Tim, like Mark could risk the business in the way that they did, the audacity they had to provoke the fight in the first place, which I thought was just incredible, and to stick with it for the long term. No board would’ve signed off on this lawsuit to a professional CEO, no freaking way. So, the fact that they’ve been able to beat Apple in also the most hilarious way possible, I think it’s just incredible. Because, remember, their first victory in the case was actually not much of a victory, there were about 11 counts in the trial, Apple basically won 10 of them and the judge awarded Epic this one little win that Apple couldn’t tell them not to link up to the internet to be able to do the payment processing.
(03:57:04) So, they want this one little thing and, Apple, instead of just taking the 10 out of 11 wins and going, fine, you can have your little links but all these other rules stay in place decided to essentially commit criminal contempt of court as they’ve now been referred to for prosecution and angered the judge to such a degree that the rule of law in the US now is that you can launch an app in the app store and you don’t have to use in-app payment but you can have a direct billing relationship with a customer if you just link out to the open internet when you take the credit card and then hop back into the app. And we owe all of that to Tim and Mark, we owe all of that to Epic. We’re going to launch new apps any minute now, I hope, actually, in the next week to take advantage of this that revamp the HEY app so that people who download the HEY app off the Apple app store can sign up in the app and can then use the web to put in their credit card so we don’t-
DHH (03:58:00) And can then use the web to put in their credit cards so we don’t have to pay 30% of the time. We have a direct billing relationship and such that they can take that subscription to Android, to PCs, whatever, without any hassle. And we have Tim and Mark to thank for it.
Lex Fridman (03:58:16) Yeah, Tim … I mean, like you said, founders, but also specific kind of founders because I think … Maybe you can educate me on this, but Tim is somebody who maintains to this day the unreasonableness of principles.
DHH (03:58:32) Yes. That’s what I love.
Lex Fridman (03:58:33) I think sometimes maybe even with founders, you can get worn down. It’s a large company.
DHH (03:58:37) Yes.
Lex Fridman (03:58:38) There’s a lot of smart “people” around you, lawyers, and just whispering your ear over time, and you’re like, “Well, just be reasonable.” This is a different thing to maintain … I mean, Steve Jobs did this. Still are the asshole.
DHH (03:58:56) Yes.
Lex Fridman (03:58:57) Who says, “No, this whole company, I’ll sink this whole fucking company over this.”
DHH (03:59:02) That’s the exact language, basically, I used in our original campaign. I will burn this business down before I hand over 30% of it to Apple. And that indignation, that actual rage, is something I try to be a little careful about tapping into because it is a little bit of a volatile compound because, I mean, I have a bunch of employees, we have a bunch of customers. It would be pretty sad if the journey of 37 singles after 25 years would come to an end because Apple would burn us down or I would burn the business down over this fight with Apple. But I think you also need that level of conviction to be able to even drive the day-to-day decisions.
(03:59:42) One of the other Apple examples … And I know we’re racking on Apple a little bit here, and I don’t actually hate them. I really don’t. I am tremendously disappointed at the squandered relationship that did not need to be sold away for so little. Now I understand that the app store toll booth is actually a pretty big business. It’s multiple billions, but Apple is a trillion-dollar company. And I think in the lens of history, this is going to come off as a tremendous mistake, and I think it’s already coming off as a tremendous mistake. The flop that was the Vision Pro was partly because Apple had pissed off every other developer.
(04:00:20) No one was eager to come build the kind of experiences for their new hardware that would perhaps have made it a success. So when you’re on top and you have all the cards, you can dilute yourself into thinking that you can dictate all terms at all times and there are no long-term consequences. Apple is learning, finally, the fact that there are long-term consequences and that developers actually are important to Apple’s business and the relationship is not entirely one-sided. We don’t owe our existence to Apple and Apple alone. We’ve built our own customer bases.
(04:00:53) Apple has been beneficial to the industry. I’m glad the iPhone exists, da da da da. It’s not that it doesn’t go both ways, but Apple wants it only one way. And I think that is a mistake and it’s a mistake that was avoidable and, A, that’s disappointing. Certainly disappointing for me. I’ve literally spent 20 years evangelizing this shit, right? I’ve spent so much money buying Apple hardware, excusing a bunch of things they’ve done over the years, and then for what? For the fact that you wanted 30% of something that I created in the most unreasonable way possible. Couldn’t we have found a better way to do this? I think they’re going to get forced to do a better way. But did you also have to go through the indignity of having a criminal contempt charge against you getting referred to prosecution? It just seems so beneath Apple, but it also seems so in line with what happens to huge companies who are run by “professional managers” rather than founders and unreasonable people.
Lex Fridman (04:02:01) Well, we should probably also say that the thing you love about Apple, the great spirit of Apple, I think, still persists and there’s a case to be made that this 30% thing’s a particular slice of a company, not a defining aspect of the company and that Apple is still on top in the hardware that it makes and a lot of things that it makes. And this is … That could be just a hiccup in a long story of a great company that does a lot of awesome stuff for humanity. So Apple is a truly special company. We mentioned Amazon. There is no company like Apple.
DHH (04:02:40) I agree. This is why the disappointment is all greater.
Lex Fridman (04:02:44) Yeah, yeah.
DHH (04:02:44) Because we had such high aspirations and expectations to Apple, that they were the shining city on the hill and they were guiding the industry in a million positive ways. I think, as we talked about earlier, hardware is exciting again in large part because Apple bought PA Semi and pursued a against all odds mission to get ARM up to the level it is today. And we have these incredible M chips now because of it. And the design sensibilities that Apple bring to the table are unparalleled. No one has taste certainly at the hardware level like Apple does. Even at the software level, I’d say there’s a lot of taste left in Apple, but there’s also some real sour taste now.
(04:03:34) So they have to wash that off first, I think, before they find their way back. But Apple’s been in a mora as before. I mean, Wozniak and Steve Jobs started this thing in the garage, has great success with the Apple II. He hands the company over to a sugar drink salesman who tanks the company into the ’90s. He doesn’t learn the lesson, spends the next 20 years building up this amazing company, then hands the company over again to a logistics person who presumably had more redeeming qualities than the first guy who put in charge, but still ends up leading the company astray.
(04:04:13) Now this is the norm. The norm is that great companies don’t last forever. In the long arc of history, almost no company lasts forever. There are very few companies around that was here a hundred years ago, even fewer 200 years ago, and virtually nothing that are a thousand years old outside of a handful of Japanese swords makers or something like that, right? So you can get deluded into thinking that something is forever when you’re in the moment and they seem so large.
(04:04:43) Apple could absolutely stumble and I think they have more reason to stumble now than ever. They’re behind on AI, terribly behind. Their software quality is faltering in a bunch of ways. The competition is catching up on the hardware game in part because TSMC is not an Apple subsidiary, but a foundry that services AMD and Nvidia, and others who were now able to use the same kind of advanced processes. This is something I learned after not looking at PC hardware for the longest time, that holy smokes, AMD actually makes CPUs that are just as fast, if not faster, than Apple’s. They’re not quite as efficient yet because ARM has some fundamental efficiencies over x86, but they’re still pretty good.
(04:05:27) So Apple should have reason to worry. Apple shareholders should have reason to be concerned, not just about all these stumbles, but also by the fact that Apple is run by old people. Apple’s board has an average age of, I think, 75. Their entire executive team is above 60. Now, that sounds horribly ageist. And in some ways, it a little bit is, in the same way I’m ageist against myself. I’m 45 now. And I have to force myself to really get into AI because it is such a paradigm shift and a lot of people, when they reach a certain age, are just happy to stay with what they know. They don’t want to go back to being a beginner. They don’t want to go back to having to relearn everything. And I think this is a little hard for me at 45. How the hell do you do that at 75?

Fatherhood

Lex Fridman (04: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?
DHH (04:06:32) 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.
(04:07:55) And looking back on it now, it almost seems crazy, like there’s this fork in the road of reality where if that hadn’t happened and I had been sitting here now not being a father, not having a family, the level of regret knowing what I know now about the joys of having that family would have been existential. I don’t know if they would have been devastating. I think men have a little bit of a longer window to pursue these things than women do. There are just certain biological facts, but ending up with the family I have now, ending up with my three boys, have been just a transformative experience in the sense that here’s something that turned out to be the most important thing. And it was an open secret. Not even an open secret. It was an open truth through all of history.
(04:08:59) You listen to anyone who’s ever had children, they will all say, “My children are the most important to me.” Yet somehow that wisdom couldn’t sink in until you were in the situation yourself. I find those truths fascinating when you can’t actually relay them with words. I can tell you, “Hey, Lex, what are you doing? Get a wife, make some kids, get a move on it.” And these are just words. They’re not communicating the gravity of what it actually feels to go through the experience. And you can’t really learn it without going through it.
(04:09:33) Now, of course, you can be influenced and whatever, we can all help contribute and little sparks and little seeds can grow in your mind about it, but it still has to happen. And now that I am in this situation and just the sheer joy on a daily basis where you think your level of life satisfaction is on a scale of one to 10.
Lex Fridman (04:09:55) Yeah.
DHH (04:09:57) And then the satisfaction of seeing your children understand something, accomplish something, learn something, do something, just be, just goes like, oh my God, the scale doesn’t go from one to 10, it goes from one to a hundred. And I’ve been playing down here in the one to 10 range all this time and there’s a one to a hundred. That has been humbling in a way that is impactful in and of itself. This whole idea that I thought I had a fair understanding of the boundaries of life in my early 30s, like what is this about? I mean, I’ve been on this earth long enough now here to know something.
(04:10:39) And you realize, “I don’t know.” I did not know. I did not know that the scale was much broader. And I’ve often talked about the joys of having kids and just seeing your own DNA, which is remarkable to me because literally that’s been the pursuit of humans since the dawn of time. I am here today because, whatever, 30,000 years ago, some Neanderthal had the same realization that I should procreate and I should continue my bloodline. And that all amounts to me sitting here now, but it didn’t become a practical reality to me before meeting the right woman. And I think that that’s sometimes not part of the conversation enough that there’s something broken at the moment about how people pair up in the western world.
Lex Fridman (04:11:33) Yeah.
DHH (04:11:33) And it’s at the source of why we’re not having enough children because there’s not enough couples, there’s not enough marriage, there’s not enough of all these traditional values that even 50, 60, 70 years ago was just taken for granted. We’re in this grand experiment of what happens if we just remove a bunch of institutions? What happens if we no longer value marriage as something to aspire to? What happened if parenthood is now seen in some camps as almost something weird or against your own self-expression? It’s a grand experiment that I’m curious how it turns out. I prefer to watch it as a movie, like The Children of Men, that was a good show. I wish that wasn’t reality, but we’re seeing that reality play out while I’m sitting here in a very traditional two-parent loving household with three children and going, “This is now at the top.”
(04:12:38) I’ve done a lot of things in my life. I’ve built software, I’ve built companies, I’ve raced cars, I’ve done all sorts of things, and I would trade all of it in a heartbeat for my kids. That’s just a really fascinating human experience, that the depth of that bond is something you can’t appreciate before you have it. But I also think there is a role to play to talk it up because we’re being bombarded constantly with reasons why not to. Oh, it’s too expensive.
(04:13:14) Well, you could get divorced and then you might lose half. There’s all these voices constantly articulating the case against marriage, the case against having children, that those of us who’ve chosen to do the traditional thing, to get married and to have children, have an obligation to talk it up a little bit, which would have seen ridiculous again 50 years ago that you’d have to talk up something so fundamental of that.
(04:13:42) But I have become obligated in that sense to do just that, to talk it up, to say, “You know what? You can look at everything that I’ve done and if you like some of those parts, realize that to me, in the situation, the kids, the family, the wife is more important than all of it.” And it sounds like a cliche because you’ve heard it a thousand times before, and by becoming a cliché, maybe you start believing it’s not true, that it’s just something people say, but it is reality.
(04:14:16) I know almost no parents that I have personal relationships with that don’t consider their children to be the most important thing in their life.
Lex Fridman (04:14:23) So there’s a lot of interesting things you said. So one, it does seem to be … I know a lot of parents, perhaps more interestingly, I know a lot of super successful people who are parents who really love their kids and who say that the kids even help them to be more successful. Now, the interesting thing, speaking to what you’re saying, is it does seem for us humans, it’s easier to articulate the negatives because they’re concrete, pragmatic. It costs more, it takes some time. They can be crying all over the place. They’re tiny narcissists running around or whatever.
DHH (04:15:07) Which is all true, by the way.
Lex Fridman (04:15:08) Yeah, pooping everywhere, that kind of stuff. But to articulate the thing you were speaking to of there’s this little creature that you love more than anything you’ve ever loved in your life, it’s hard to convert that into words. You have to really experience it. But I believe it and I want to experience that, but I believe, because just from a scientific method, have seen a lot of people who are not honestly not very capable of love, fall completely in love with their kids.
DHH (04:15:39) Yes.
Lex Fridman (04:15:40) Very sort of, let’s just call it what it is, engineers that are very like beep boop bop.
DHH (04:15:46) Yes.
Lex Fridman (04:15:47) They just fall in love and it’s like, all right. People who, just like you said, they don’t really care or don’t really think about having kids, that kind of stuff, once they do, it changes everything. But it’s hard to convert into words.
DHH (04:16:03) One of the reasons I think it’s also difficult is … I mean, I like kids, not that I actively dislike them, but when I was around other people’s kids, I didn’t have a emotional reaction. Some women have. They see a baby and they go, “Oh.” I never had any emotion of that. I mean, I could appreciate, I’m glad for you that you have children. It did not provoke anything in me. The emotions that are provoked in me when I look at my own children, this doesn’t exist in the same universe, so you don’t have a complete parallel or at least a lot of men, or at least me, I didn’t have a framework to put it into, what would it be like to have my own child?
(04:16:41) And then you experience it. It’s like the poof. And it happened so quickly, too. This is what I found fascinating. It happens before that little human is even able to return any words to you that the love you develop to an infant, it happens quite quickly, not necessarily immediately. I don’t know, different people have different experiences, but it took me a little bit. But then once it hit, it just hit like kick of a horse. And I love that it’s also just such a universal experience that you can be the most successful person in the world, you can be the poorest person in the world, you can be somewhere in the middle, and we share this experience that being a parent, for most of them, turns out to be the most important thing in their life.
Lex Fridman (04:17:33) But it is really nice to do that kind of experience with the right partner. But I think because I’m such an empath, the cost of having the wrong partner is high for me. But then I also realized, man … I have a friend of mine who’s divorced happily and he still loves the shit out of his kids and it’s still beautiful. It’s a mess, but all of that love is still there and you just have to make it work. It’s just that, I don’t know, that kind of divorce would destroy me.
DHH (04:18:02) You should listen to The School of Life. He has this great bit on YouTube, you’ll marry the wrong person. If you accept upfront that you will marry the wrong person, that every potential person you can marry is going to be the wrong person on some dimension. They’re going to annoy you. They’re going to be not what you hoped in certain dimensions. The romantic ideal that everything’s just perfect all the time is not very conducive to the reality of hitching up and making babies. Because I think as you just accounted, even when it turns to shit, I find that most of the people I personally know where things have fallen apart and have turned to shit never in a million years would they go, “I regret it. I would rather my children did not exist because a relationship turned sour.” I mean, I think you should try very hard and I think this is also one of those things where we didn’t fully understand those fences, and when we pulled them up and celebrated how easy it is to get divorced, for example, that that wasn’t going to have some negative consequences.
(04:19:12) I’m not saying you shouldn’t have divorces. I’m not saying return to times past. I am saying, though, that civilization over thousands of years developed certain technologies for ensuring the continuation of its own institutions and its own life that perhaps we didn’t fully appreciate. I mean, again, this is something Jordan Peterson and others are far more articulate to speak about, and that I’ve learned a lot to just analyze my own situation. Why is it that this incredible burden it is, to be responsible for someone else’s life that you brought into this world is also the most rewarding part of existence? That’s just curious. Before I heard Peterson articulate the value of taking on the greatest burden you know how to carry, I always thought about burdens as a negative things. Why would I want the burden of a child? I might screw it up. I might be a bad parent. They might have bad … All this stuff, right? All the reasons why you shouldn’t. And so few voices articulating why you should.
Lex Fridman (04:20:21) Yeah, but I should also add on top of that, the thing you mentioned currently, perhaps in the West, the matchmaking process …
DHH (04:20:28) Is broken.
Lex Fridman (04:20:29) … is broken and technology made it worse. It’s fascinating, this whole thing that hasn’t been solved. So hiring great teams, that’s probably been solved the best out of matchmaking, finding great people to hire.
DHH (04:20:44) Right.
Lex Fridman (04:20:45) Second, finding great friends. That also hasn’t been solved.
DHH (04:20:49) And it’s breaking down.
Lex Fridman (04:20:50) It’s breaking down. And the third is matchmaking for relationships. That’s the worst. And in fact, technology made it even worse.
DHH (04:20:58) Yes.
Lex Fridman (04:20:58) It’s fascinating.
DHH (04:20:59) It is. It’s a great example again of how all the greatest intentions still led us straight to hell. I really enjoyed Louise Perry’s analysis of the sexual revolution not being an unqualified good, which was something I hadn’t thought about at all before she articulated it, that, of course, women should be able to have freedom and self-determination and abortions, and all of these things. And Louise Perry is not arguing against that either, of course. But there are second order facts that we don’t appreciate at the time, and we may not have ready-made solutions for, and that’s just interesting.
(04:21:40) You make life better in a million different ways and somehow we end up more miserable. Why is that? Why is it that humans find meaning in hardship? And I think some of that is that it’s a difficult question to answer through science. And again, Peterson articulates well this idea that you have to find some of it through art, some of it through authors, some of it through different … I was just about to say modes of knowing before I stopped myself because that sounds like woo bullshit. But there are different ways to acquire those deep lessons that paper is not going to tell you.
Lex Fridman (04:22:33) I mean, this is really … The point also applies to religion, for example. If you remove from society the software of religion, you better have a good replacement.
DHH (04:22:45) And we’ve had a bunch of bad replacements, especially over the last few decades. Religion is one of those things I’ve struggled with a lot because I’m not religious, but I wish I was. I can now fully appreciate the enormous value having an operating system like that brings, not just at the individual level, but rather at a societal level. And it’s not clear at all what the answer is. I think we’ve tried a lot of dead ends when it came to replacements and people have been filling that void in a million different ways that seem worse than all the religions, despite their faults in a myriad of ways have been able to deliver.
Lex Fridman (04:23:28) Yeah, religions like the cobalt code. It’s just-
DHH (04:23:33) Yes. It’s the institutions where we don’t fully understand the rules and why they’re there and what’s going to happen if we remove them. Some of them seems obvious to me are just bullshit of the time. Oh, you should need, whatever, shellfish, because in that region of the world, there was something, something, something. Okay, fine. But there’s a bunch of other things that are pivotal to keeping society functioning for the long term, and we don’t fully understand which is which. What’s the bullshit and what’s the load-bearing pillars of society?
Lex Fridman (04:24:04) Can you speak to the hit on productivity that kids have? Did they increase your productivity, decrease it, or is that even the wrong question to ask?
DHH (04:24:13) I think it’s one of the reasons why ambitious people are often afraid of having children because they think I have so much more to do and I barely have enough time now. How would I possibly be able to accomplish the things I want to accomplish if I add another human into the mix? Now, A, we’ve always worked 40 hours a week, not 80 or a hundred or 120. I think that’s very beneficial. B, kids don’t exist in this vacuum of just them alone being entered into your life. Hopefully, there’s a partner. And in my life, I’m married to a wonderful woman who decided to stop working her corporate job when we got together and have been able to carry a huge part of that responsibility.
(04:25:02) I was just about to say burden, and I think that’s exactly how it often gets presented, especially from a feminist perspective, that carrying for your own children is some unpaid labor that has to be compensated for in some specific way beyond the compensation of what bringing life into this world, raising wonderful humans. There’s something screwy about that analysis that I actually think the modern trad movement is a reply against. Whether they have all the answers, I’m certainly not sure of either, but there’s something that’s just not right in the analysis that children are a burden and that if woman chooses to stay at home with the kids, that that’s some failure mode of feminist ambition. I think that’s actually a complete dead end. Now, depends on different people, different circumstances. I can just speak to my life being married to a wonderful woman who have decided to be home with the kids, at least at their early age, and taken on a lot of those responsibilities. Now, it doesn’t mean there isn’t plenty of ways that I have to be part of that and have to chip in, but it’s allowed me to continue to work the 40 hours a week that I’ve always worked. But it’s made the 40 hours more strict. I have a schedule where I wake up, whatever, 6:30, and we have to get out of the door a little before 8:00. I usually have to play at least one or two rounds of Fortnite with my youngest and sometimes middle child.
(04:26:48) Then take the kids to school, get in, start work at, I don’t know, 8:39, then work until 5:00, 5:30, sometimes 6:00, but then it’s dinner and I have to be there for that, and then I have to read to the kids. And by the time that’s done, I don’t want to go back to work. So my work time really is 9:00 to 5:00, 9:00 to 6:00, depending of whatever is going on. Sometimes there’s emergencies and you have to tend to them, but it’s made it more structured and I found some benefit in that and I found some productivity in that, that I can’t goof around quite as much, that the day will end at around 5:36. That’s just if I didn’t accomplish what I wanted to do today, if I get to that time, it’s done. I’m over. I have to try again tomorrow. Whereas before having a family and before having kids, I could just not do it and just make it up in the evening.
(04:27:45) So in that way, it’s made me more structured, but it hasn’t really changed my volume of work all that much. I still work about the same amount of hours. And that’s, by the way, enough. This is one of the key points we make in It Doesn’t Have to Be Crazy at Work, the latest book we wrote, is that there’s enough time. 40 hours a week is actually a ton if you don’t piss it away. Most people do piss it away. They piss it away in meetings, they piss it away on just stuff that doesn’t matter when even three hours, four hours of concentrated uninterrupted time every day would move the goals they truly care about way down the field.
Lex Fridman (04:28:26) I think kids do make you more productive in that way for people who need it, especially people like me, they create their urgency.
DHH (04:28:34) Yes.
Lex Fridman (04:28:34) If you have to be done by 5:00, it’s maybe counterintuitive notion, but for people like me who like to work, you can really fill the day with fluff of work. And if you have to be done by 5:00, you’re going to have to do the deep work and get it done, really focus singular work. And then you’re just going to cut off all the pressure-
DHH (04:29:02) It just keeps you honest. It keeps you honest because you can squander one day, you can squander two days, but if I squander a whole week, I feel terrible. Now, that’s just some drive I have in me where I feel content and full meaning if I actually do stuff that matters, if I can look back upon the week and go like, “That was a nice week.” Really, we moved forward. Maybe we didn’t get done, but we moved forward and everything got better. And I think kids really helped just time bucks things in that way. And a lot of people need that because I find just so much of the celebration of overwork to be so tiresome. Oh, I work 60 hours or 80 hours, 100 hours a week, and just like, first of all, no, you don’t. No, you don’t.
(04:29:50) Those 80 hours are full of all sorts of fluff that you label work, but that I would laugh at, and that most people laugh at, that you would laugh at if you actually did the analysis of where’s that time going. Most of the important stuff that have to be done is done in these uninterrupted chunks of two hours here or four hours there or five hours there. The hard part is making sure you get them in the whole piece. So don’t give me that. There’s time enough. And also, what’s so important that it ranks above continuing your lineage? I think there’s just some ancient honor in the fact that, again, this DNA that’s sitting on this chair traveled 30,000 years to get here, and you’re going to squander all that away just so you can send a few more emails.
Lex Fridman (04:30:41) There is something that’s also hard to convert into words of just the kind of fun you can have just playing with your kids. I don’t know what that on the surface it’s like, I can have that kind of fun just playing video games by myself, but no, it’s like there’s something magical about it, right?
DHH (04:31:00) I have a thousand hours logged in Fortnite since 19, I think, all of it with my kids. I’d never be playing Fortnite. Well, I don’t know if I never would be. I wouldn’t be playing a thousand hours of Fortnite if it wasn’t for my kids. The enjoyment for me is to do something with them that I also happen to enjoy. I really love Fortnite. It’s a phenomenal game. I don’t have to force myself to play that with them. I often ask like, “Hey, do you want to play Fortnite?” But still, it’s an activity that I get to share with them. It’s a passion that I get to share with them. I’ve started doing go-karting with my oldest. I’ve been driving race cars for a long time, and now they’re getting into go-karting, and just being at the go-kart track, seeing them go around, seeing them get faster, seeing them learn that skill, you just go look at what else would I be doing with my life. At my age, 45, I’m standing here truly enjoying life I brought into this world. What else was so important at this stage that I would otherwise be spending my time on?
DHH (04:32:00) … so important at this stage that I would otherwise be spending my time on.

Racing

Lex Fridman (04: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?
DHH (04:32:17) 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.
(04:32:53) But when I was 25, I realized I wanted to spend more time in the U.S. I wasn’t sure yet that I was going to move there. That turned out later to be true, but I knew that if I wanted to spend time in the U.S., I needed to have a driver’s license. I was not going to get around very well if I didn’t know how to drive a car.
(04:33:10) So I got a driver’s license at 25. Then ended up moving to the U.S. later that year, and I’d always been into video games, racing video games. Metropolitan Street Racer on the Dreamcast was one of those games that really sucked me into … It was the precursor to Project Gotham, which was the precursor to essentially, Forza Horizon, I think.
Lex Fridman (04:33:37) Oh, okay.
DHH (04:33:37) I think that’s how the lineage goes. It’s just a great game. I actually just fired it up on an emulator a few weeks ago and it still sort of, kind of holds up because it has enough real car dynamics that it smells a little bit like driving a real car. It’s not just like an arcade racer like Sega Rally or something like that, but I’d always been into that.
(04:33:57) Then I got my driver’s license at 25 and moved to the U.S., and then two years later a friend that I’d met in Chicago took me to the Chicago Autobahn Country Club, which is this great track about 45 minutes from Chicago. And I sat in a race car and I drove a race car for the first time, and I had the same kind of pseudo-religious experience I did as when I started working on Ruby, where I did maybe 20 laps in this basically, a Mazda race car from, I think it was the ’90s or something, a pretty cheap race car, but a real race car. Single-seater, manual gearbox, but exposed slick wheels, all the stuff.
(04:34:42) And after having had that experience, first of all it was just the most amazing thing ever. The physical sensation of driving a race car is really unique. And I think if you’ve driven a car fast, you have maybe a 2% taste of it. The exposure to the elements that you get in a single-seat race car, especially one like that where your head is actually out in the elements, you can see the individual wheels and sensation of speed is just so much higher, is at a completely different level.
Lex Fridman (04:35:13) So can you actually speak to that? So even in that Mazda, so you can feel … What, can you feel the track reverberating? You feel the grip?
DHH (04:35:22) Oh, yeah. Not only can you see the bumps because you’re literally looking straight at the wheels, you can feel all the bumps because you’re running a slick tire and it’s a really stiff setup. It’s nothing like taking a fast street car out on a racetrack and tried to driving a little bit around.
Lex Fridman (04:35:37) So can you feel the slipping, the traction?
DHH (04:35:38) Yeah, you’d feel the slipping. 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 the car’s actually sliding a little bit. A couple of percent of slip angle is the fastest way to drive a race car. You don’t want to slide it too much. That looks great, lots of smoke, but it’s not fast.
(04:35:58) How you want to drive it is just at the limit of adhesion where you’re rotating the car as much as your tires can manage and then slightly more than that. And playing at it, keeping it just at that level because when you’re at the level of, or at the limit of adhesion, you’re essentially just a tiny movement away from spinning out. I mean, it doesn’t take much. Then the car starts rotating. Once it starts rotating, you lose grip and you’re going for the wall.
(04:36:28) That balance of danger and skill is what’s so intoxicating, and it’s so much better than racing video games too because the criticality is taken up two notches. I often think about people who really like gambling, where I think, “Aren’t you just playing poker? No, the point is not poker. Poker is maybe part of it, but the point is that I could lose my house.” Right? That’s the addiction that some people get to gambling, that there’s something real on the line.
(04:36:58) When you’re in a race car, there’s something very real on the line. If you get it wrong, at the very least you’re going to spin out and probably hit a wall and it’s going to be expensive. At the very worst, you’re not getting out alive. And even if modern race cars have gotten way safer than they used to be, there is that element of danger that’s real, that there are people who still get seriously hurt or even killed in a race car.
(04:37:25) It’s mercifully rare compared to what it used to be when those maniacs in the ’60s would do Formula 1 and whatever, 13% of the grid wouldn’t make it to the end of the year because they’d just die in a fiery flaming fireball, but there’s still some of it there.
(04:37:42) And I think that since that there’s something on the line really contributes to it, but it’s more than that. It’s not just a physical sensation. There’s activation of all your forces. There’s the flow, and I think that really cements why I got addicted, because I love that flow I got out of programming, but getting flow out of programming is a very inconsistent process.
(04:38:06) I can’t just sit down in front of a keyboard and go like, “All right, let’s get the flow going.” It doesn’t happen like that. The problem has to be just right. It has to meet my skills in just the right moment. It’s a bit of a lottery.
(04:38:19) In a race car, it’s not a lottery at all. You sit down in that car, you turn the ignition, you go out on track and I get flow virtually guaranteed because you need, or I need at least 100% of my brain processing power to be able to go at the speed I go without crashing. So there’s no time to think about dinner tonight or the meeting next week or product launch. It’s completely zen in actually, the literal sense of the word.
(04:38:49) I think of someone who’s really good at meditation, that’s probably kind of state they get into where it’s just clear you’re in the now, there’s nothing but you and the next corner. That’s a really addictive experience.
(04:39:02) So after I’ve had that, I couldn’t get enough. I kept going to the track every opportunity I got. Every single weekend for about four years, I would go to the track. And by the end of that time, I’d finally worked up enough skill and enough success with the company that I could afford to go “real racing.”
(04:39:20) So I started doing that. I started driving these Porsches, and then as soon as I got into that, as soon as I got into “real competition,” I was like, “I wonder how far you can take this?” And it didn’t take that long before I decided, “You know what? I can take this all the way.”
(04:39:34) My great hero in racing is Tom Kristensen, fellow Dane. The Mr. Le Mans, as they call him, the greatest endurance race in the world. The 24 Hours of Le Mans has been won more times than any other by Tom Kristensen. He won the race nine times. So Tom just really turned me on to Le Mans. I’d been watching Le Mans since, I think, the ’80s. I have my earliest memories of watching that on TV. The race has been going since, I think, ’20s, but in the ’80s I got kind of into it.
(04:40:07) And then in the late ’90s, early 2000s when Tom started winning, I, like pretty much every other Dane started watching the race almost religiously. So I thought, “You know what? I want to get to Le Mans.”
(04:40:18) This is the magic thing about racing, that if I get into basketball, I can’t set a realistic expectation that I’m going to play in the NBA, that I’m going to go to the finals, or I get into tennis and I’m going to play at Wimbledon. That just doesn’t happen. But racing is special in this way because it requires a fair amount of money to keep these cars running. It’s really expensive. It’s like having a small startup. You need to fly a bunch of people around the world and buy expensive equipment and so forth. So you need a bunch of capital, and I had some through the success of the company so I could do it, which meant that I could get to Le Mans.
(04:40:50) So I set that as my goal. “I want to get to Le Mans,” and I started racing in real competition 2009, and three years later in 2012, I was at the grid of Le Mans for the first time.
Lex Fridman (04:41:02) We should say, so Le Mans, 24-hour race, endurance. I mean, this is insane.
DHH (04:41:10) There are three drivers, mind you. So it’s not like one guy just drives for 24 hours straight, but still it’s a pretty tough race, both physically and mentally, especially mentally. When you’ve been up for 24 plus hours, you’re not quite as sharp as when you first wake up.
(04:41:28) And this is funny about Le Mans too, it starts at around 4:00 in the afternoon, so you’ve already been up for half a day by the time the race starts and then there’s 24 hours to go before you’re done, and you’ll be in the car for anywhere from usually an hour and a half to a maximum of four hours. The regulations say four out of six is the max you can do.
(04:41:46) I’ve spent perhaps two and a half hours in a single stint at Le Mans. It’s pretty taxing. You’re going 200 miles an hour into some of these turns and there’s another 60 cars on track. Whenever I’m in my normal category, which is the LMP2 category, I have GT cars which are more like a Ferrari and a Porsche that I have to overtake, and then I have these hyper cars, which is the top-class that are overtaking me.
(04:42:14) So you got a lot going on and you got to stay sharp for two and a half hours straight to do that. That is just a guaranteed way to get incredible flow for long, long stretches of time. That’s why you get addicted to it. That was why I got addicted.
Lex Fridman (04:42:27) You got to talk me through this video, this video of you in these LMP2s.
DHH (04:42:31) Oh, yes.
Lex Fridman (04:42:31) This is such a cool … This is so cool.
DHH (04:42:34) Yeah, this was probably my favorite battle of my career.
Speaker 1 (04:42:41) And Heinemeier Hansson has beat past to add five-
DHH (04:42:42) Yeah, so this is me driving against Nico Müller at the Shanghai International Circuit.
Lex Fridman (04:42:47) You’re on the outside here?
DHH (04:42:48) I’m on the outside in the blue and white and we go a whole track around with basically a piece of paper between us. See, down this back straight, I get so close to him because I want to force him over on the other side of the track such that he can’t just box me in, and we’ve been fighting already at this point for basically 40 minutes straight.
(04:43:06) I’ve been managing to keep this professional driver behind me for 40 minutes, and he finally passes me, but we just keep the battle on for the whole time. And it really just shows both these kinds of cars, the Le Mans Prototypes. We don’t actually ever touch. We get within about an inch and keep going around the Shanghai Circuit to-
Lex Fridman (04:43:26) How did you get so good? I mean, that’s a fascinating story, right, that you are able to get so good?
DHH (04:43:34) I’m pretty good for the kind of driver I am, which is called the gentleman driver, which means I’m not a professional driver. And like many good gentlemen drivers, when we’re at our really best, we can be quite competitive with even professional drivers who have been doing this their whole life.
(04:43:50) The difference between us and the professionals is the professionals can do it every time, or more or less every time. So I can’t be this good all the time. When everything is just right, I can be competitive with professional drivers, but that’s not how you win championships. That’s not how you get paid by factories to drive. You got to be good every time you go out.
(04:44:07) So that’s a huge difference. But some of it was also just, I really put my mind to it. By the time I realized race cars is what I want to do as my serious hobby, I put in thousands of hours.
Lex Fridman (04:44:21) Have you crashed? What’s the worst crash?
DHH (04:44:23) I’ve had a lot of crashes, but thankfully, knock on wood, I haven’t had any crashes where I’ve gotten really seriously hurt.
Lex Fridman (04:44:30) Have you wrecked the car?
DHH (04:44:31) Oh, yes. Oh, yes. I’ve wrecked many a cars.
Lex Fridman (04:44:34) So what’s that feel like, just you wreck a car? How do you get-
DHH (04:44:37) It feels like total shit if you’re in a real race and other people depend on you. It’s not even so much the car, although it’s also sometimes that these cars are expensive to repair and that sucks and it feels so wasteful in a way when you crash some of these cars, but the sense that you’re letting a team down.
(04:44:55) Endurance racing is a team sport. Not only do you have your mechanics, you usually have co- drivers. So when I crash, I just feel like, “Damn it, I could have avoided this.”
Lex Fridman (04:45:05) Yeah, but also you could have died.
DHH (04:45:08) Do you know what’s funny? I never think about that. I don’t think you can because I think the moment you start thinking about being able to die, you can’t do it. You can’t go fast.
Lex Fridman (04:45:18) Well, I’m sure, not to go all Carl Jung and Freud here, but I’m sure that’s always present in the back of your mind somewhere. You’re not just bringing it to the surface.
DHH (04:45:31) It is in the sense that it’s part of the appeal. It’s part of the sense that there’s something on the line, that this isn’t just virtual. I can’t just hit reset, restart, reboot. If I crash this car, we’re going to be out, or we’re going to be disadvantaged, or it’s going to get destroyed, or I might get hurt.
(04:45:49) I’ve gotten lightly hurt a few times. I actually had, the year we won 24 Hours of Le Mans in our class, I’d been training in this Formula 3.5 car. It’s a really fast car, it’s a really nice exercise to do, but it’s also, it doesn’t have power steering. So some of these race cars, especially the open-seaters, they don’t have power steering, which means that the steering wheel is basically, directly connected to the front wheels.
(04:46:19) So if you crash one of those cars and the front wheels suddenly turn, you’re really going to hurt your hands if you don’t get your hands off the wheel. I hadn’t raced enough of those cars to know that I had to get, or to have the instinct, to have developed the instinct that I had to get my hands off the wheel, so I didn’t and I really hurt my hand.
(04:46:36) This was just, I think a month before the 24 Hours of Le Mans. So I thought, “Oh man, I’m going to have to miss it this year.” I had, not a cast. It was just seriously sprained. And then somehow, miraculously a week before the event, I was like, “Oh yeah, actually it’s okay now.” So, got to do it.
(04:46:51) And that would’ve been grave regret if I would’ve seen my team go on to win the race and I would have to sit on the sidelines. But I really have been quite fortunate in the sense that most of my crashes have just been expensive or sporting-inconvenient. They’ve never been something where I got seriously hurt, but I’ve seen plenty of people who have.
(04:47:13) In fact, my co-driver this year, and for several years, Pietro Fittipaldi drove a race car at Spa. Spa is one of the great racetracks of all time and it has this iconic corner called Eau Rouge, which is probably the most famous corner in all of Motorsports that has a great compression before you climb uphill.
(04:47:34) It’s extremely fast, very difficult corner. And just as he does the compression, his car basically sets out and he loses his power steering and he drives straight into the wall and breaks both his legs and basically, face the prospect that maybe his career was over. I’ve had other teammates and people I know have serious injuries that’s really hurt them.
(04:47:57) And yet what’s funny, as you say, you’d think that would sink in. The year before we won in 2014, that same car had a Danish driver in it at Le Mans at the race I was driving, who died. He lost control of the car when there was a bit of rain on the track, and the track was unfortunately designed in such a poor way that there was a very big tree right behind the railing. And he hit that tree at full speed, pulled 90gs and was dead on the spot, which was just such an extremely awful experience to go through.
(04:48:42) I finished second that year, which should have been cause for a bunch of celebration, but it was just tainted by the fact that not only did a driver die, a fellow Dane died, a guy I knew died. That was pretty tough.
Lex Fridman (04:49:01) So throw that into the pile of the things that have to be considered, is the weather conditions, like you mentioned of the track, whether it’s dry or wet.
DHH (04:49:12) It’s a huge part of it. Even just last year at Le Mans, it was raining and I was out and I hadn’t made a serious mistake at 24 Hours of Le Mans since I did the first race in 2012, where I put it in the sand trap with four hours to go. And we lost a couple of laps getting pulled out, but it didn’t actually change anything for our result because that was just how the field was spread out.
(04:49:41) I’d made minor mistakes over the years, but nothing that really set us out. And at the race last year when it was raining, I first clobbered a Ford Mustang when I made an overambitious pass on a damp part of the track and couldn’t stop in time and then felt absolutely awful as I sat in the gravel pit for two laps and knew that our race was over, a race where we were highly competitive.
(04:50:07) You’re not blessed with a competitive car, a competitive team and competitive setup every year. I know how rare that is. So to know that we had had a chance that year and I sort of squandered it felt really bad. But that got compounded when I got back on track, barely made it another stint and then put it into gravel trap again when it started raining on the entrance into Porsche.
(04:50:29) So this is part of why racing is so addicting too because the highs are very, very high. When you win a race like the 24 Hours of Le Mans, it feels just incredible. There’s so much emotion, but if you fuck it up, the lows are very, very low.
Lex Fridman (04:50:44) What are the things you’re paying attention to when you’re driving? What are the parameters? What are you loading in? Are you feeling the grip? Are you basically increasing the speed and seeing a constant feedback system effect it has on the grip, and you’re trying to manage that and trying to find that optimal slip angle?
(04:51:09) Are you looking around using your eyes? Are you smelling things? Are you listening, just feeling the wind or are you looking at the field, too? How’d you not hit that guy at all? You get close within inches, right? So you have to pay attention to that, too.
DHH (04:51:26) It’s really interesting about that specific battle where we’re literally a few inches apart. I can’t fully explain it, but humans can develop an incredible sense of space where I can’t see the edge of the back of my car, but I can know exactly where it is. I can have a mental model in my head that gives me the exact dimensions of this car such that I can run within a few inches of a competitor car or within a few inches of the wall and not hit either when things go well.
(04:51:57) The car is about two meters wide and it’s quite long, five meters and you can’t see everything. The mirrors are actually kind of shit. There’s no rear-view mirror in these cars. You can’t see out the back. You can only see through your two side mirrors, but you form this intuitive mental model when you get good enough at this.
(04:52:14) But what I actually pay attention to most is I run a program. What I try to do when I go to a racetrack is I try to load up the best program I know how for every single corner. What’s my brake point? What’s my acceleration point? What’s my brake trailing curve? And I try to pick up that program in part just by finding it myself and how fast I can go. But even more so than that by copying my professional competitors, or not competitors, co-drivers.
(04:52:45) So I usually always race with a pro, and modern race cars produce an absolute enormous amount of data, and you can analyze all that data after each outing. You can see an exact trace of how much you pushed the brake pedal, how much you did in terms of steering inputs, when you got on the gas. You can see every millisecond you’re losing is evident in those charts.
(04:53:09) So what I try to do is I try to look at the chart and then I try to load that in, and that’s what I got to do. “Oh, in this corner 17, I have to be 10 bar lighter on the brake,” so I try to load that program in and then I try to repeat it.
(04:53:23) Now, then there are all the things that changes. Your tires change quite a lot. These tires are made to only last 40 minutes in many cases. Sometimes at Le Mans we can go longer, but at some racetracks they’ll last as little as 40 minutes before they really fall off. So you got to manage that, that the grip is constantly changing, so your program have to suddenly fit those changing circumstances.
(04:53:45) And then in endurance racing, you’re constantly interacting with other cars because you’re passing slower classes or you’re getting passed by a faster class. So that’s part of the equation. And then you’re trying to dance the car around the limit of adhesion.
(04:53:59) So you got all those factors playing at the same time. But above all else for me is to try to become a robot. How can I repeat this set of steps exactly as I’m supposed to for two and a half hours straight without making 100 milliseconds worth of mistakes?
Lex Fridman (04:54:17) Yeah. Low latency algorithm.
DHH (04:54:20) That’s really a huge part of it actually. Your latency is enormously important in terms of being able to catch when the car starts slipping. You get this sensation in your body that the G-forces are a little off, the slip angle is a little off and then you have to counter steer.
(04:54:38) And obviously, the best race car drivers just feel like an intuition. I have some intuition. I don’t have all of it, so I do occasionally spin my car, but that’s the challenge.
Lex Fridman (04:54:48) From everything you’ve studied and understand, what does it take to achieve mastery in racing? What does it take to become the best race car driver in the world?
DHH (04:54:58) Obsession is part of it. When I read and hear about Senna and the other greats, they were just singularly focused. Max Verstappen is the current champion of the world and he is the same kind. Max has been fascinating to watch. I mean, he’s a phenomenal race car driver, but he also literally does nothing else. When he’s not at the racetrack, he’s driving sim racing. He’s literally in video games doing more racing when he’s not doing all the racing he’s already doing.
Lex Fridman (04:55:30) Is there a specific skill they have that stands out to you as supernatural through all of that obsession? Is it a bunch of factors or are they actually able to, like you said, develop a sense? Is it, they’re able to get to the very edge of the slip?
DHH (04:55:45) They’re able to develop very fine-tuned sensibilities for when the car is sliding. They can feel just these tiny moments or movements in the chassis that transports up usually through their ass. That’s why you call it a butt meter that goes up and you feel like the car is loose, or you feel like you’re just about to lock up. You can really hone that tuning.
(04:56:10) Then the other thing is you have to have really good reaction time. And when you look at great Formula 1 drivers, they can generally have a reaction time of just under 200 milliseconds, which is awesome, and even 10 milliseconds’ difference makes a huge difference.
(04:56:26) You’ll see it when the Formula 1 grid, for example, they do a standing start and you see the five red lights come on. And when the last light goes out, they’re supposed to release the clutch and get going, and they can time this. So you can see exactly who has the reaction time.
(04:56:40) And even being off by 20 milliseconds can make the difference of whether you’re in front or behind at the first corner.
Lex Fridman (04:56:48) How much of winning is also just the strategy of jostling for position?
DHH (04:56:53) There’s some of that, and some of it is also just nerve. Who wants it more? That’s exactly when that sense of danger comes in. There’s a great quote from Fernando Alonso when he was driving at Suzuka against Schumacher, I think.
(04:57:09) They’re coming up to this incredibly fast corner. It’s very dangerous, and Alonso basically accounts, “I was going to make the pass because I knew he had a wife and kids at home.”
Lex Fridman (04:57:22) That’s so gangster.
DHH (04:57:23) Just absolutely ruthless, right?
Lex Fridman (04:57:25) Yeah. Wow.
DHH (04:57:26) That, “I knew he valued life more than I did.” So there’s a bit of poker sometimes in that, who’s going to yield? There’s a bit of chicken raised in that regard, and sometimes it doesn’t work. No one yields and you both crash, but very often one person will blink first.
Lex Fridman (04:57:41) Can the pass be both on the inside and the outside or is it-
DHH (04:57:44) You can pass wherever you want as long as you have just a slight part of the car on the racetrack.
Lex Fridman (04:57:50) And then you just improvise and take risks. What a sport. And then Senna, of course is a legendary risk-taker.
DHH (04:58:00) Yes. And even before him. By the time … I mean, he died in the ’90s, but by the time we got to the ’90s, racing was already a lot safer than it was when Nik Lauda raced in the ’60s. That level of danger is no longer there. There’s still just a remnant of it and it is still dangerous, but nothing like that.
(04:58:21) And it’s a little hard to compare through the ages who’s the greatest driver of all time. I think there’s a fair argument that Senna is, but we don’t have the data. We don’t know who he was up against. How would he fare if we pitted him against Max Verstappen today?
(04:58:35) I do think sometimes that you can have a bit of a nostalgia for the all-time greats, but the world moves forward and new records are being set all the time and the professionalism keeps improving, sometimes to the detriment of the sport, I think.
(04:58:48) There’s a lot of professional drivers who are not only just very good at driving, but are very good at being corporate spokespeople, and it used to be quite different. There used to be more characters in racing that had a bit more personality that they were allowed to shine because there weren’t a billion sponsorships on the line that they were afraid to lose.

Cars

Lex Fridman (04:59:06) Ridiculous question, what’s the greatest car ever made, or maybe what’s the funnest one to drive?
DHH (04:59:11) The greatest car for me of all time is the Pagani Zonda.
Lex Fridman (04:59:15) Okay, I’m looking this up, Pagani Zonda.
DHH (04:59:18) So the Pagani Zonda was made by this wonderful Argentinian called Horacio Pagani.
Lex Fridman (04:59:25) My God, that’s a beautiful car. Wow.
DHH (04:59:26) It’s a gorgeous car. You can look up mine. It’s the Pagani Zonda HH. Yep. So, that’s a car I had made in 2010 after we visited the factory in Modena, and by sheer accident ended up with this car, but it became my favorite car in the world basically. When I watched an episode of Top Gear, I think in 2005, where one of the presenters was driving the Pagani Zonda F around and I just thought, “That’s the most beautiful car in the world. It is the most incredibly sounding car in the world. If I one day have the option, this is what I want.”
(05:00:14) And then I had the option in 2010. I’ve had the car ever since. I’m never ever going to sell it. It’s truly a masterpiece that’s stood the test of time. There’s some great cars from history that are recognized as being great in their time. This car is still great.
Lex Fridman (05:00:30) Have you taken it on the racetrack?
DHH (05:00:32) I have. It’s terrible at that. But I don’t want to say it’s terrible at that. That’s not what it’s designed for. It’s designed for the road and that’s why it’s great. There are a lot of fast cars that are straddling their race car for the road. You don’t actually want a race car for the world. A race car for the world is a pain in the ass. It’s way too stiff. It’s way too loud. It’s way too uncomfortable. You can’t actually take it on a road trip.
Lex Fridman (05:00:55) So this actually feels good driving on normal roads?
DHH (05:00:55) Oh, totally, totally.
Lex Fridman (05:00:59) And you, of course always go to speed limit?
DHH (05:01:00) Always. This is why I love having this car in Spain because they’re a little more relaxed. Not entirely relaxed, but more relaxed than they are in a lot of places. In Denmark, I kid you not, if you are on the highway and you go more than twice the speed limit, they confiscate your car and keep it. You’re not getting it back. They don’t even care if it’s your car or not. If you were borrowing my car and you went twice the speed limit, it’s gone.
(05:01:26) So they don’t do that in Spain. I mean, in most places, except for the German Autobahn, they get pissy if you go twice the speed limit for all sorts of fair reasons. I’m not advocating that you should be going much more than that, but there are certain special roads where you can’t open things up and no one’s in harm’s way, and that’s an incredible sensation. And I do think that some of those speed limits actually are kind of silly, and I’m not just saying that in a vacuum.
(05:01:50) In Germany, they have the glorious Autobahn, and on the Autobahn there is no speed limit in a bunch of segments. And they’re so committed to their speed-limitless Autobahn, which is by the way, very weird of Germans. They usually love rules. They’re usually very precise about it, and then they have this glorious thing called the Autobahn.
(05:02:09) There was a great case a couple of years ago where a guy took out a Bugatti Chiron, went 400 kilometers an hour on the Autobahn, and he filmed it and put it on YouTube and a case was brought against him because even though they don’t have a speed limit, they do have rules that you can’t drive recklessly, and he won the case. He wasn’t driving recklessly. He was just going very, very fast.
(05:02:32) I’ve done the Autobahn a couple of times. My wife and I went on a road trip in Europe in 2009, and I got the Lamborghini Gallardo we were driving up to 200 miles an hour. And I’d driven 200 miles an hour or close to it on a racetrack before. That feels like one thing. Driving on a public road 200 miles an hour feels really, really fast.
Lex Fridman (05:02:52) Scary?
DHH (05:02:54) Actually a little scary, yes, because you constantly think, on a racetrack you know the road, you know the surface. You can walk the track in most of the time. You can know if there’s a dip. On a public road you can’t know if there’s suddenly a pothole. Presumably there’s not going to be a pothole on the German Autobahn, but it does feel a little scary, but also exhilarating.
(05:03:13) Speed is just intrinsically, really fun. I don’t know anyone I’ve taken out in a fast car … Well, actually I do know a few people. Most people I take out in a fast car, they grin. It’s a human reaction to grin when you go really fast.
Lex Fridman (05:03:28) Do you know what’s the fastest you’ve ever gone?
DHH (05:03:31) It was probably at Le Mans, I think when the LMP2s were at their maximum power and had 600 horsepower and really sticky tires, we were going 340 kilometers an hour, which is just over 200 miles an hour, a bit over 200 miles an hour. That does feel fast.
(05:03:47) And it’s really interesting with speed, is that the difference between going, let’s say 150 and 160 doesn’t feel that much actually, those 10 miles an hour. But the difference between going 190 and 200 feels crazy faster, which as a percentage change is actually less than going from 150 to 160, but there’s some sense of exponentiality once you get up to those limits, where it’s just on a completely different level.
Lex Fridman (05:04:16) Yeah, because to me, 110, 120 feels fast. 200, that’s crazy.
DHH (05:04:24) It really is crazy.

Programming setup

Lex Fridman (05: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?
DHH (05:04:51) 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.
(05:05:25) I do like a big screen, but I don’t want multiple screens. I’ve never found that, that really works with my perception. I want to be able to just focus on a single thing. I don’t want all of it all over the place, and I’ve always used multiple virtual desktops and being able to switch back and forth between those things.
(05:05:41) But the setup I have today is Linux, I switched to a little over a year ago after I finally got fed up with Apple enough that I couldn’t do that anymore. And then I use this low-profile mechanical keyboard called the Lofree Flow84, which is just a …
DHH (05:06:01) … Flow84, which is just the most glorious-sounding keyboard I’ve ever heard. I know there are a lot of connoisseurs of mechanical keyboards that’ll probably contest me on this. This is too thocky or too clicky or too clacky or whatever. But for me, the Lofree Flow84 is just a delight that I did not even know existed, which is so funny because I’ve been programming for a long time. Mechanical keyboards have been a thing for a long time.
(05:06:31) And the keyboard, when you look at it like this, it looks plain. It doesn’t look extravagant. But the tactile sensation you get out of pushing those keys, the thocky sound that you hear when the keys hit the board, it’s just sublime. And I’m kicking myself that I was in this Mac bubble for so long that I wasn’t even in the market to find this.
(05:06:57) I knew mechanical keyboards existed, but to be blunt, I thought it was a bit of a nerd thing that only real nerds that were much more nerdy than me would ever care about. And then I got out of the Apple bubble and suddenly, I had to find everything again. I had to find a new mouse, I had to find a new keyboard, I had to find everything. And I thought, “All right. Let me give mechanical keyboards a try.” And I gave quite a few of them a try.
(05:07:19) The Keychron is one of the big brands in that. I didn’t like that at all. I tried a bunch of other keyboards. And then I finally found this keyboard and I just went like… Angels are singing. Where have you been my whole life? We spend, as programmers, so much of our time interacting with those keys. It really kind of matters.
(05:07:36) In a way, I didn’t fully appreciate it. I used to defend the Apple Magic Keyboard like, “Hey, it’s great. It’s actually a great keyboard.” And I think for what it is, this ultra-low profile, ultra-low travel, it’s actually a really nice keyboard. But once you’ve tried a longer-travel mechanical keyboard, there’s no going back.
Lex Fridman (05:07:54) You do have to remember, in many ways, both on the software side and the hardware side, that you do spend a lot of hours-
DHH (05:08:01) Yes.
Lex Fridman (05:08:01) … behind the computer. It’s worth-
DHH (05:08:03) It’s worth investing in.
Lex Fridman (05:08:04) And also worth exploring until you find the thing where the angels start singing, whatever.
DHH (05:08:09) That’s exactly right. And I actually do regret that a little bit, especially with this damn keyboard. I could have been listening to these beautiful thocky keys for years and years. But sometimes you have to get really pissed off before you open your eyes and see that something else exists.
(05:08:26) I feel the same way about Linux. So I’ve been using Linux on the server since late ’90s probably. We ran servers on Linux back then. I never seriously considered it as a desktop option. I never ran Linux before directly myself. I always thought, “Do you know what? I want to focus on programming. I don’t have time for all these configuration files and all this setup bullshit and whatnot. And Apple is close enough. It’s built on Unix underpinnings. Why do I need to bother with Linux?”
(05:08:56) And again, it was one of those things. I needed to try new things and try something else to realize that there is other things other than Apple. And again, it’s not because I hate Apple. I think they still make good computers. I think a lot of the software is still also pretty okay. But I have come to realize that as a web developer, Linux is just better.
Lex Fridman (05:09:19) Yeah.
DHH (05:09:20) Linux is just better. It’s closer to what I deploy on. The tooling is actually phenomenal. And if you spend a bit of time setting it up, you can record a reproducible environment that I’ve now done with this Omakub concept or project that I’ve done, that I can set up a new Linux machine in less than 30 minutes and it’s perfect.
(05:09:41) It’s not pretty good. It’s not like I still need to spend two hours on it. It’s perfect. Because you can encode all aspects of the development environment into this. And I didn’t know. I didn’t even know, to be fair, that Linux could look as good as it can.
(05:09:56) If you look at a stock Ubuntu or Fedora boot, I mean, not that it’s ugly, but I’d pick the Mac any day of the week. You look at Omakub, I mean, I’m biased here, of course, because I built it with my own sensibilities, but I look at that and go like, “This is better. This is beautiful.”
(05:10:13) And then you look at some of those true Linux ricing setups where people go nuts with everything. And you go, “Oh, yeah, I remember when computers used to be fun in this way,” when there was this individuality and this setup, and it wasn’t just all bland, the sameness. And I think that’s the flip side sometimes of something like Apple, where they have really strong opinions and they have really good opinions and they have very good taste, and it looks very nice, and it also looks totally the same.
(05:10:40) And Linux has far more variety and far more texture and flavor, sometimes also annoyances and bugs and whatever. But I run Linux now. It’s Ubuntu-based with the Omakub stuff on top, the Lofree keyboard. I use a Logitech. What’s it called? The MX 3 mouse, which I love how it feels in my hand. I don’t love how it looks.
(05:11:03) I actually was a Magic Mouse stan for the longest time. I thought it was genius that Apple integrated the trackpad into a mouse, and I used that. And I always thought it was ridiculous that people would slag it just because you had to charge it by flipping it over because the battery would last for three months and then you’d charge it for half an hour.
(05:11:23) I thought that was a perfect compatibility with my sensibilities. I don’t mind giving up a little inconvenience if something is beautiful, and that Magic Mouse is beautiful. But it wasn’t going to work on Linux, so I found something else. The MX 3 is nice, but I sometimes do wish the Magic Mouse… That’s pretty good.
Lex Fridman (05:11:40) Yeah. Linux is really great for customizing everything, for tiling, for macros, for all of that. I also do the same in Windows with AutoHotKey, where you just customize the whole thing to your preferences.
DHH (05:11:52) If you’re a developer, you should learn how to control your environment with the keyboard. It’s faster, it’s more fluid. I think one of those silly things I’ve come to truly appreciate about my Omakub setup is that I can, in whatever time it takes to refresh the screen, probably five milliseconds, switch from one virtual desktop to another.
(05:12:14) Even on Windows, you can’t get it that smooth. You can get close. You can’t get it that smooth. On macOS, for whatever reason, Apple insists on having this infuriating animation when you switch between virtual desktops, which makes it just that you don’t want to. You don’t want to run full-screen apps because it’s too cumbersome to switch between the virtual desktops. The kind of immediacy that you can get from a wonderful Linux setup in that regard is just next-level.
Lex Fridman (05:12:43) Yeah. And it seems like a subtle thing, but a difference of milliseconds and latency between switching the virtual desktops, for example, I don’t know, it changes-
DHH (05:12:53) It changes how you use the computer. It really does.
Lex Fridman (05:12:55) Similar thing with VR, right? If there’s some kind of latency, it just completely takes you out of it. Yeah.
DHH (05:13:01) And it’s funny. I actually had to watch… I think it was ThePrimeagen on YouTube when he was showing off his setup, and I was seeing how quickly he was switching between those virtual desktops. And I’d always been using virtual desktops, but I didn’t like switching too much because just of that latency. And it’s like, “Oh, you can do that on Linux? Oh, that’s pretty cool.”
Lex Fridman (05:13:21) Yeah.
DHH (05:13:21) So I run that. And then my editor of choice now is Neovim.
Lex Fridman (05:13:24) Oh, good. All right. Well, we’re out of time. No. All right. You did, for many, many years, used, what is it? TextMate.
DHH (05:13:25) Yes.
Lex Fridman (05:13:25) TextMate.
DHH (05:13:34) TextMate. That was the main blocker of moving away from Apple. Everything else, I thought, “Do you know what? I can swing it.” But TextMate was and is a wonderful editor, one I helped birth into this world. The programmer, Allan Odgaard, is a good friend of mine, all the way back from the party days when we were lugging our computers around.
Lex Fridman (05:13:55) Nice.
DHH (05:13:55) And he was a big Mac guy. And in 2005, he was writing this editor, and I helped him with the project management of keeping him on track, keeping him focused, and getting something released because I really wanted it for myself. And I thought this was the last editor. I thought I was never going to switch.
Lex Fridman (05:14:14) Forgive me for not knowing, but how featureful is this editor?
DHH (05:14:20) It’s quite featureful, but it’s a GUI-driven editor in some regards. It was really early on with ways of recording macros and having sophisticated syntax highlighting, and it did a bunch of firsts. And it was just a really pleasant editing experience.
(05:14:40) I think these days, a lot of people would just use VS Code. VS Code exists in the same universe as TextMate in some ways. And actually, I think it’s compatible with the original TextMate bundles, the original TextMate format. So it really trailed a path there, but it also just didn’t evolve.
(05:14:58) Now, a lot of people saw a huge problem with that. They were like, “Oh, it needs to have more features. It needs to have all these things.” I was like, I’m happy with this text editor that hasn’t changed at all basically when Allan stopped working on it for a decade or more. I don’t need anything else. Because as our original discussion went, I don’t want an IDE. I don’t want the editor to write code for me. I want a text editor. I want to interact with characters directly.
(05:15:25) And Neovim allows me to do that in some ways that are even better than TextMate, and I love TextMate. But Vi, as you know, once you learn the commands, and it sounds… I sometimes feel like Vi fans overplay how difficult it is to learn because it makes them perhaps seem kind of more awesome that they were able to do it. It’s not that difficult. And it doesn’t take that long, in my opinion, to learn just enough combo moves to get that high of, “Holy shit. I could not do this in any other editor.”
Lex Fridman (05:15:56) How long did it take you? And by the way, I don’t know. I haven’t yet… Well, I know intellectually, but just like with kids, I haven’t gone in all the way in. I haven’t used Vim.
DHH (05:16:08) You have a treat in mind. Well, I switched in about… When I switched here about a year ago, I had three days of cursing, where I thought it was absolutely terrible and it was never going to happen, and I had three days of annoyance. And already, the next week, I was like, “This is sweet. I’m not going anywhere.”
Lex Fridman (05:16:26) Oh, wow.
DHH (05:16:26) But I also had a bit of a headstart. About 20 years ago in the early 2000s, I tried Vim for a summer and it didn’t stick. I didn’t, for whatever reason, love it at the time. But Neovim is really good.
(05:16:40) The key to Neovim is to realize that you don’t have to build the whole damn editor yourself. So a lot of Neovim stans are like, “Here’s how to write the config from scratch.” Over 17 episodes, that’s going to take you three weeks. I don’t care that much.
(05:16:54) I love a great editor, I love to tailor it a little bit, but not that much. So you have to pair Neovim with this thing called LazyVim. LazyVim.org is a distribution for Neovim that takes all the drudgery out of getting an amazing editor experience right out of the box.
Lex Fridman (05:17:14) Ridiculous question. We talked about a bunch of programming languages. You told us how much you love JavaScript. It’s your second favorite programming language. Would TypeScript be the third then?
DHH (05:17:26) TypeScript wouldn’t even be in this universe. I hate TypeScript as much as I like JavaScript.
Lex Fridman (05:17:33) You hate… Oh, man. I’m not smart enough to understand the math of that. Okay. Before I ask about other programming languages, if you can encapsulate your hatred of TypeScript into something that could be human-interpretable, what would be the reasoning?
DHH (05:17:50) JavaScript smells a lot like Ruby when it comes to some aspects of its metaprogramming, and TypeScript just complicates that to an infuriating degree when you’re trying to write that kind of code. And even when you’re trying to write the normal kind of code, none of the benefits that accrue to people who like it, like auto-completion, is something I care about. I don’t care about auto-completion because I’m not using an IDE.
(05:18:14) Now, I understand that that is part of what separates it and why I don’t see the benefits. I only see the costs. I see the extra typing, I see the type gymnastics that you sometimes have to do and where a bunch of people give up and just do any instead, right? That they don’t actually use the type system because it’s just too frustrating to use.
(05:18:35) So I’ve ever only felt the frustration of TypeScript and the obfuscation of TypeScript in the code that gave me no payoff. Again, I understand that there is a payoff. I don’t want the payoff. So for my situation, I’m not willing to make the trade and I’m not willing to take a language that underneath is as dynamic of a language as Ruby is and then turn it into this pretend statically typed language. I find that just intellectually insulting.
Lex Fridman (05:19:08) Do you think it will and do you think it should die, TypeScript?
DHH (05:19:12) I don’t want to take something away from people who enjoy it. So if you like TypeScript, all the power to you. If you’re using TypeScript because you think that’s what a professional program is supposed to do, here’s my permission; you don’t have to use TypeScript.
Lex Fridman (05:19:24) There’s something deeply enjoyable about a brilliant programmer such as yourself, DHH, talking shit. It’s one of my favorite things in life. What are the top three programming languages everyone should learn if you’re talking to a beginner?

Programming language for beginners

DHH (05:19:41) 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.
(05:20:10) 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.
(05:20:26) There’s a book called Learn to Program by Pine that uses Ruby essentially to just teach basic programming principles that I’ve seen heavily recommended. So that’s a great language.
Lex Fridman (05:20:38) How quickly would you go to Rails?
DHH (05:20:39) It depends on what you want to do. If you want to build web applications, go to Rails right away, learn Ruby along with Rails. Because I think what really helps power through learning programming is to build programs that you want. Right? If you’re just learning it in the abstract, it’s difficult to motivate yourself to actually do it well.
(05:20:56) Some people learn languages just for the fun of them. Most people do not. Most people learn it because they have a mission; they want to build a program, they want to become a programmer. So you got to use it for something real. And I actually find that it’s easier to learn programming that way too because it drives your learning process.
(05:21:12) You can’t just learn the whole thing upfront. You can’t just sit down and read the language specification and then go like, “Ooh,” like Neo, “Now I know kung fu. Now I know Ruby.” It doesn’t download that way. You actually have to type it out in anger on a real program.
Lex Fridman (05:21:29) Yeah. Yeah, for sure.
DHH (05:21:30) So I would start there. But then number two probably would be JavaScript because JavaScript just is the language you need to know if you want to work with the web, and the web is the greatest application platform of all time if you’re making business software or collaboration software, all this kind of stuff.
(05:21:47) If you’re making video games, you should probably go off and learn C++ or C or something else like that. But if you’re in the realm of web applications, you got to learn JavaScript. Regardless of what else you learn, you got to learn JavaScript.
Lex Fridman (05:21:58) So if you’re learning Ruby, what does Ruby not have in terms of programming concepts that you would need other languages for?
DHH (05:22:09) I don’t know if there’s any concepts missing, but it doesn’t have the speed or the low-level access of memory manipulation-
Lex Fridman (05:22:17) Sure.
DHH (05:22:17) … that you would need to build a 3D gaming engine, for example. No one’s going to build that in Ruby. You could build quite low-level stuff when it comes to web technologies in Ruby, but at some point, you’re going to hit the limit and you should use something else.
(05:22:32) I’m not someone who prescribes just Ruby for everything. Just once you reach the level of abstraction that’s involved with web applications, Ruby is superb. But if you’re writing, for example, a HTTP proxy, Go is great for that. We’ve written quite a few HTTP proxies lately at the company for various reasons, including our cloud exit and so forth.
(05:22:54) And Kevin, one of the programmers I’m working with, he writes all of that in Go. Go just have the primitives and it has the pace and the speed to do that really well. I highly recommend it. If you’re writing an HTTP general proxy, do it in Go. Great language for that. Don’t write your business logic in Go. I know people do, but I don’t see the point in that.
Lex Fridman (05:23:14) So what would you say are the three? So, Go, Ruby, plus Rails, JavaScript.
DHH (05:23:19) Yeah. If you’re interested in working with the web, I’d probably pick those three. Go, Ruby, and JavaScript.
Lex Fridman (05:23:25) Go, Ruby, and JavaScript. Okay. Functional languages.
DHH (05:23:28) Someone’s talking about OCaml.
Lex Fridman (05:23:30) They are always going to show up. It must be some kind of OCaml industrial complex or something like this, but they always say, “Mention OCaml.”
DHH (05:23:41) I love that there are people who love functional languages to that degree. Those people are not me. I don’t care at all. I care about functional principles when they help me in these isolated cases where that’s just better than everything else. But at heart, I’m an object-oriented guy. That’s just how I think about programs. That’s how I like to think about programs. That’s how I carve up a big problem space into the main language. Objects are my jam.
Lex Fridman (05:24:10) Yeah, me too. So I program in Lisp a bunch for AI applications for basic… So, Othello, chess engines, that kind of stuff. And I did try OCaml just to force myself to program just a very basic Game of Life, a little simulation. Lisp is just parentheses everywhere. It’s actually not readable at all.
DHH (05:24:34) That’s the problem I’ve had with Lisp.
Lex Fridman (05:24:38) OCaml is very intuitive, very readable. It’s nice.
DHH (05:24:40) I really should pick up a language like that at some point. I’ve been programming long enough that it’s a little embarrassing that I haven’t actually done anything real in anger in a fully functional programming language.
Lex Fridman (05:24:50) Yeah. But I have to figure out, I’m sure there’s an answer to this, what can I do that would be useful for me that I actually want to build?
DHH (05:24:58) Yes. That’s my problem.
Lex Fridman (05:25:00) That a functional language is better suited for.
DHH (05:25:03) That’s right.
Lex Fridman (05:25:03) Because I really want to experience the language properly.
DHH (05:25:06) That’s right.
Lex Fridman (05:25:06) Yeah. Because at this point, I’m very object-oriented-brained.
DHH (05:25:11) Yes.
Lex Fridman (05:25:11) Yeah.
DHH (05:25:12) And that’s my problem too. I don’t care as much about these low-level problems in computer science. I care about the high-level. I care about writing software. I care about the abstraction layer that really floats well with web applications and business logic.
(05:25:29) And I’ve come to accept that about myself, even though, as we talked about, when I was a kid, I really wanted to become a games programmer. And then I saw what it took to write a collision-detection engine, and I go like, “Yeah, that’s not me at all.” I’m never going to be into vector matrix manipulation or any of that stuff. It’s way too much math. And I’m more of a writing person than of a math person.
Lex Fridman (05:25:54) I mean, just in the way you were speaking today, you have a poetic, literary approach to programming.
DHH (05:26:03) Yes.
Lex Fridman (05:26:04) Yeah. It’s interesting.
DHH (05:26:04) That’s actually exactly right. So I did actually a keynote at RailsConf 10 years ago, where I called myself a software writer. I mean, I’m not the first person to say that. “Software writer” has been in the vernacular for a long time.
(05:26:16) But the modern identity that most programmers adopt when they’re trying to be serious is software engineer, and I reject that label. I’m not an engineer. Occasionally, I dabble in some engineering, but the vast majority of the time, I’m a software writer. I write software for human consumption and for my own delight.
(05:26:40) I can get away with that because I’m working in a high-level language like Ruby, working on collaboration software and to-do lists and all the other stuff. Again, if I was trying to apply my talent to writing 3D game engines, no, that’s not the right mindset. That’s not the right identity.
(05:26:58) But I find that the software engineering identity flattens things a little bit. I’d like to think that we have software writers and software mathematicians, for example, and then those are actually richer ways of describing the abstraction level that you’re working at than “engineer.”
Lex Fridman (05:27:16) Yeah. And I think if AI becomes more and more successful, I think we’ll need the software writer skill more and more because it feels like that’s the realm of which… Because it’s not writer. You’re going to have to do the software, you’re going to have to be a computer person, but there’s a more… I don’t know. I just don’t want to romanticize it, but it’s more poetic, it’s more literary. It more feels like writing a good blog post than-
DHH (05:27:48) I actually wish that AI had a bit higher standards for writing. I find the fact that it accepts my slobby, incomplete sentences a little offensive. I wish there was a strict mode for AI where it would snap my fingers if I was just feeding it keywords and like, “Speak proper. Do pronunciation, do punctuation.” Because I love that. I love crafting a just-right sentence that hasn’t been boiled down, that has no meat on it, has no character in it. It’s succinct, it’s not overly flowery. It’s just right.
(05:28:26) That writing phase to me is just addictive. And I find that when programming is the best, it’s almost equivalent exactly to that. You also have to solve a problem. You’re not just communicating a solution. You have to actually figure out what are you trying to say. But even writing has that.
(05:28:45) Half the time when I start writing a blog post, I don’t know exactly which arguments I’m going to use; they develop as part of the writing process. And that’s how writing software happens too. You know roughly the kind of problem you’re trying to solve. You don’t know exactly how you’re going to solve it. And as you start typing, the solution emerges.
Lex Fridman (05:29:05) And actually, as far as I understand, you and Jason are working on a new book. It’s in the early days of that kind of topic. I think he said… he tweeted that it’s going to be titled something like, “We don’t know what we’re doing upfront” or something like that. That kind of topic. And you figure it out along the way.
DHH (05:29:22) That’s a big part of it; trying to give more people the permission to trust their own instincts and their own gut and realizing that developing that supercomputer in your stomach is actually the work of a career and that you should not discard those feelings in preference to over… or not even complicated; to analytics, to intellectualism.
(05:29:50) Very often when we look at the big decisions we’ve had to make, they’ve come from the gut, where you cannot fully articulate why do I think this is the right thing. Well, because I’ve been in this business for 20 years and I’ve seen a bunch of things and I’ve talked to a bunch of people, and that is percolating into this being the right answer.
(05:30:08) A lot of people are very skeptical about that in business or unable to trust it because it feels like they can’t rationalize. Why are we doing something? Well, because I feel like it, damn it. That’s a great privilege of being a bootstrapped, independent founder who don’t owe their business to someone else and doesn’t have to produce a return because I feel like a lot of the bullshit really creeps in when you’re trying to rationalize to other people why you do the things you do and why you take the decisions that you do.
(05:30:34) If you don’t have anyone to answer to, you are free to follow your gut, and that’s hell of an enjoyable way to work, and it’s also and very often the correct way to work. Your gut knows a lot. You can’t articulate it, but it’s spot-on more times than not.
Lex Fridman (05:30:54) Yeah. Having to make a plan can be a paralyzing thing. I suppose there’s different kinds of brains. And first of all, I can’t wait to read that book if it materializes.
(05:31:06) I often feel like in the more interesting things I do in my life, I really don’t know what I’m doing upfront. And I think there’s a lot of people around me that care for me that really want me to know what I’m doing. They’re like, “What’s the plan? Why are you doing this crazy thing?”
(05:31:24) And if I had to wait until I have a plan, I’m not going to do it. They have different brains on this kind of stuff. Some people really are planners and it maybe energizes them, but I think most creative pursuits, most really interesting, most novel pursuits are like, you kind of have to just take the leap and then just figure out as you go.
DHH (05:31:45) My favorite essay in Rework is the last one, and it’s entitled, “Inspiration is perishable.” And I think that captures a lot of it, that if you take the time to do a detailed plan, you may very well have lost the inspiration by the time you’re done.
(05:32:02) If you follow the inspiration in that moment and trust your gut, trust your own competence that you will figure it out, you’re going to get so much more back. You’re going to go on the adventure you otherwise wouldn’t have, whether that’s just the business decisions or life decision. You have to seize that inspiration.
(05:32:21) There’s a great set of children’s books written by this Japanese author about chasing an idea and trying to get a hold of it, and it’s beautifully illustrated as an idea is something that’s floating around, as something you have to catch and latch onto, that I really feel captures this notion that inspiration is perishable; it’ll disappear. If you just put it back on the shelf and say, “Well, I got to be diligent about this, I got to line up a plan,” you may run out, and then there’s no steam to keep going.

Open source

Lex Fridman (05:32:54) 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?
DHH (05:33:26) Which is going to be a bit of a biased piece of evidence here, but-
Lex Fridman (05:33:31) Why monarchy is best.
DHH (05:33:33) It’s great. We should definitely have dictators and they should control everything, especially when the dictator is me. Now, well, I think I learned very early on that a quick way to burn out in open source is to treat it as a business, as though your users are customers, as though they have claims of legitimacy on your time and your attention and your direction.
(05:33:56) Because I faced this almost immediately with Ruby on Rails. As soon as it was released, there were a million people who had all sorts of opinions about where I ought to take it. And not just opinions, but actually demands. “Unless you implement an Oracle database adapter, this is always going to be a toy.” It was actually more or less that exact demand that prompted me to have a slide at one of the early Rails conferences that just said, “Fuck you.”
Lex Fridman (05:34:25) Yeah, I saw that.
DHH (05:34:27) I’m not going to do what you tell me to. I’m here as a bringer of gift. I am sharing code that I wrote on my own time, on my own volition. And you don’t have to say thank you. I mean, it’d be nice if you did. You can take the code and do whatever you want with it, you can contribute back if you want, but you can’t tell me what to do or where to go or how to act.
(05:34:51) I’m not a vendor. This is a fundamental misconception that users of open source occasionally step into because they’re used to buying software from companies who really care about their business. I care about people using my software, I think it’s great, but we don’t have a transactional relationship. I don’t get something back when you tell me what to do, except grief, and I don’t want it, so you can keep it.
(05:35:18) So my open source philosophy from the start has been I got to do this primarily for me. I love when other people find use in my open source. It’s not my primary motivation. I’m not primarily doing it for other people. I’m primarily doing it for me and my own objectives.
(05:35:35) Because as Adam Smith said, it’s not for the benevolence of the butcher that we expect our daily meat. It’s for his self-interest. And I actually find that to be a beautiful thought that our commons increase in value when we all pursue our self-interest, certainly in the realm of open source.
(05:35:57) This is also why I reject this notion that open source is in some sort of crisis, that there’s a funding crisis, that we have to spend more. No, we don’t. Open source has never been doing better. Open source has never controlled more domains in software than it has right now. There is no crisis.
(05:36:14) There’s a misconception from some people making open source and from a lot of people using open source that open source is primarily like commercial software; something you buy and something where you can then make demands as a customer and that the customer is always right. The customer is not always right, not even in business, but certainly not in open source.
(05:36:35) In open source, the customer as it is, is a receiver of gifts. We are having a gift exchange. I show up and give you my code. If you like it, you can use it. And if you have some code that fits in with where I’m going with this, I would love to get those gifts back. And we can keep trading like that.
(05:36:54) I give you more gifts. You give me some of your gifts. Together, we pool all the gifts such that someone showing up brand new just get a mountain of gifts. This is the magic thing of open source is it increases the total sum value of what’s in the commons when we all pursue our own self-interest.
(05:37:10) So I’m building things for Rails that I need. And you know what? You want me to do that. You do not want me to build things that I don’t need on behalf of other people because I’ll do a crap job. I build much better software when I can evaluate the quality of that software by my own use.
(05:37:28) I need this feature. I’m going to build a good version of that feature, and I’m going to build just enough just for me. So I’m not going to bloat it. I’m not trying to attract the customer here. I’m not trying to see some angle. I’m just building what I need. And if you go into open source with that mentality that you’re building for you and everything else is a bonus, I think you have all the ingredients to go the distance.
(05:37:53) I think the people who burn out in open source is when they go in thinking, “I’m making all these gifts. I don’t really need them myself, but I’m hoping someone else does and maybe they’ll also give me some money.” That’s a losing proposition. It never basically works.
(05:38:08) If you want money for your software, you should just sell it. We have a perfectly fine model of commercial software that people can make that kind and then they can sell it. But I find a lot of confusion, let’s just call it that politely, in open source contributors who want to have their cake and eat it too.
(05:38:26) They like the mode of working with open source, they maybe even like the status that comes from open source, but they also would like to earn a living for making that open source. And therefore, they occasionally end up with the kind of grievances that someone who feels underappreciated at work will develop when others aren’t doing enough to recognize their great gifts.
Lex Fridman (05:38:47) And then they might walk away. I wish I had more insight into their mind state of the individual people that are running these projects, if they’re feeling sad or they need more money. It’s just such a dark box.
DHH (05:39:04) It can be.
Lex Fridman (05:39:05) I mean, of course, there’s some communication, but I just sadly see too often they just walk away.
DHH (05:39:11) Right. And I think that’s actually part of the beauty of open source.
Lex Fridman (05:39:16) Is walking away.
DHH (05:39:16) You are not obligated to do this code forever. You’re obligated to do this for as long as you want to do it. That’s basically your own obligation.
Lex Fridman (05:39:26) Okay, so you might criticize this and push back. You did write a blog post on forever, ” Until the end of the internet” with [inaudible 05:39:32]. There is a beautiful aspect, and you found a good balance there. But I don’t know, you’re bringing so much joy to people with this thing you created. It’s not an obligation, but there’s a real beauty to taking care of this thing you’ve created.
DHH (05:39:27) There is.
Lex Fridman (05:39:49) And not forgetting… I think what the open source creator is not seeing enough, how many lives you’re making better. There’s certain pieces of software that I just-
Lex Fridman (05:40:00) … lives you’re making better. There’s certain pieces of software that I just quietly use a lot and they bring my life joy and I wish I could communicate that well. There’s ways to donate, but it’s inefficient. It’s usually hard to donate.
DHH (05:40:16) It is. There’s some ways for some people that made it easier. GitHub donations is one way of doing it. I donate to a few people even though I don’t love the paradigm. I also accept that we can have multiple paradigms. I accept that I can do open source for one set of motivations and other people can do open source for other motivations. We don’t all have to do it the same way, but I do want to counter the misconception that open source is somehow in a crisis unless we all start paying for open source. That model already exists. It’s commercial software. It works very well and plenty of great companies have been built off the back of it and the expectations are very clear. I pay you this amount and I get this software.
(05:40:55) Open source, once you start mixing money into, it gets real muddy real fast, and a lot of it’s just from those misaligned expectations that if you feel like you’re starving artists as an open source developer and you are owed X amount of money because your software is popular, you’re delusional and you need to knock that off. Just get back on track where you realize that you’re putting gifts into the world and if you get something back in terms of monetary compensation, okay, that’s a bonus. But if you need that money back in terms of monetary compensation, just charge for software or go work for a software company that will employ you to do open source. There’s tons of that. That is probably actually the primary mode that open source software is being developed in the world today. Commercial companies making open source that they need themselves and then contributing it back.

WordPress drama

Lex Fridman (05: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.
(05:43:03) 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.
DHH (05:43:52) First, I echo what you said about what a wonderful thing it is that WordPress success, there are not many projects in the open source world or in the world at large that has had as big of an impact on the internet as WordPress has. He deserves a ton of accolades for that work. So that was my engagement, essentially my premise. Do you know what? I had tremendous respect for what Matt has built with WordPress, what that entire ecosystem has built around itself. It’s a true marvel, but there’s some principles that are larger than my personal sympathies to the characters involved. I agree. The Silver Lake private equity company that’s involved with WP Engine is not my natural ally. I’m not the natural ally of private equity doing some game with VP Engine. That’s not my interest in the case. My interest is essentially a set of principles and the principles are if you release something as an open source, people are free to use it as they see fit and they’re free to donate code, or resources, or money back to the community as they see fit.
(05:45:10) You may disagree about whether they’ve done enough, whether they should do more, but you can’t show up after you’ve given the gift of free software to the world and then say, “Now that you’ve used that gift, you actually owe me a huge slide of your business because you got too successful using the thing I gave you for free.” You don’t get to take a gift back. That’s why we have open source licenses. They stipulate exactly what the obligations are on both sides of the equation. The users of open source don’t get to demand what the makers of open source do and how they act and the makers of open source don’t get to suddenly show up with a ransom note to the users and say, “Actually you owe me for all sorts of use.” I’m 100% allergic to that kind of interaction. And I think Matt unfortunately for whatever reason, got so wrapped up in what he was owed that he failed to realize what he was destroying. WordPress and Automatic already makes a ton of money.
(05:46:19) This is part of the wonder of WordPress. This is a project that generates 100s of millions of dollars and Matt didn’t feel like he was getting enough of that. That’s not a good argument, bro. You can’t just violate the spirit and the letter of these open source licenses and just start showing up with demand letters even to characters that are not particularly sympathetic. This goes to the root of my interpretation of open source in general. The GPL is a particular license that actually demands code from people who use it under certain circumstances. I’ve never liked the GPL. I don’t want your shitty code. If you don’t want to give it to me, what am I going to do with that? Some code dump that you’ve… I’m not on board with that part of Stallman’s vision at all. I love the MIT license. To me that is the perfect license because it is mercilessly short.
(05:47:17) I think it’s two paragraphs, three paragraphs, really short and it basically says, “Here’s some software. It comes with no warranty. You can’t sue me. You can’t demand anything, but you can do whatever the hell you want with it. Have a nice life.” That’s a perfect open source interaction in my opinion, and that license needs to be upheld. These licenses in general, even the GPL, even if I don’t like it, we have to abide by them because if we just set aside those licenses, when we in a moment’s notice feel like something’s slightly unfair, we’ve lost everything. We’ve lost the entire framework that allowed open source to prosper and allowed open source to become such an integral part of commerce too. I mean, back when open source was initially finding its feet, it was at war with commercial software. Stallman is at war with commercial software and always has been.
(05:48:11) Bill Gates was in return at war with open source for the longest time. The open source licenses and the clarity that they provide allowed us to end that war. Today, commercial software and open source software can peacefully coexist. I make commercial software, I sell Basecamp, I sell HEY, and then I also make a bunch of open source software that I give away for free gifts. That can’t happen if we start violating these contracts. No commercial company is going to go, “Let me base my next project off this piece of open source if I’m also running the liability that some Matt maker is going to show up seven years in and demand I give them $50 million.” That’s not an environment conducive to commerce collaboration or anything else and it’s just basically wrong. I think there’s one analysis that’s all about the practical outcomes of this, which I think are bad.
(05:49:05) There’s also an argument that’s simply about ethics. This is not right. You can’t just show up afterwards and demand something. This is not too dissimilar in my opinion, to the whole Apple thing we talked about earlier, Apple just showing up and feeling like they’re entitled to 30% of everyone’s business. No, that’s not right. That’s not fair. So I think Matt unfortunately steered himself blind on the indignity he thought was being perpetrated against him because there was all this money being made by BP Engine making a good product and not giving quite enough back in Matt’s opinion, tough cookie.
Lex Fridman (05:49:49) I think there, maybe I’m reading too much into it, but there might be some personal stuff too which weren’t not only not giving enough but probably implicitly promising that they will give and then taking advantage of him in that way in his mind. Just like interpersonal interaction and then you get interpersonally frustrated.
DHH (05:50:10) I get that.
Lex Fridman (05:50:11) You forget the bigger picture ethics of it. It’s like when a guy keeps promising he’ll do something and then you realize you wake up one day a year or two later, “Wait a minute, I was being lied to this whole time,” and that I don’t even know if it’s about money.
DHH (05:50:29) I’d get mad too. It’s totally fine to get mad when people disappoint you. That’s not justification for upending decades of open source licensees and the essential de facto case law we’ve established around it. This is why I chose to even weigh in on this because I like WordPress. I don’t use WordPress. I’m not a part of that community. I don’t actually have a dog in this fight. I’m biased if anything towards Matt just as a fellow BDFL. I would like to see him do well with this, but I also think there’s some principles that stake here that ring much louder. I don’t want Rails to suddenly be tainted by the fact that it’s open source and whether companies can rely on it and build businesses on it because wait, maybe one day I’m going to turn Matt and I’m going to turn Matt King and I’m going to show up with a demand ransom letter. Now screw that. We have way more to protect here. There’s way more at stake than your personal beef with someone or your perceived grievance over what you’re owed.
Lex Fridman (05:51:31) What would you recommend? What do you think he should do, can do to walk it back to heal?
DHH (05:51:40) Decide. This is the curious thing. He could decide to give this up. That’s very, very difficult for driven ambitious people to do, to accept that they’re wrong and to give up and lay down their sword. So I had a hope earlier on in this that was possible. I haven’t seen any evidence that Matt is interested in that and I find that deeply regretful, but that’s his prerogative. I continue to speak out when he’s violating the spirit and ethics of open source, but I wish he would just accept that this was a really bad idea. He made a bad bet and I think he thought he’d just get away with it, that they’d just pay up and that he could put pressure.
(05:52:24) I mean, I know that temptation. When you sit as the head of a very important project, you know that comes with a great degree of power and you really need a great degree of discipline to rein that in and not exercise that power at every step where you feel aggrieved. I’ve felt aggrieved a million times over in the 20 plus years of Ruby on Rails. I’ve really tried very hard not to let those, sometimes petty, sometimes substantial grievances over time seep in to the foundation of the ecosystem and risk ruining everything.

Money and happiness

Lex Fridman (05:53:03) As the king of the Rails kingdom. Has the power gotten to your head over the years?
DHH (05:53:07) I’m sure it has. I mean, who wouldn’t?
Lex Fridman (05:53:10) Do you pace around in your chamber? [inaudible 05:53:12]-
DHH (05:53:11) I do, occasionally, and I do marvel at both what’s been built, what’s been possible. Over a million applications have been made with Ruby on Rails by one estimate that I’ve seen. Businesses like Shopify and GitHub and a million others have been built on top of something that I started. That’s very gratifying. But you really have to be careful not to smell your own exhaust too much and you have to be just as careful not to listen too much to the haters and not to listen too much to the super fans either that you assess the value and the principles of what you’re working towards on its own merits, on your own scoreboard. I try to block that out and then just go, “Well, I’m working on Rails because I love to write Ruby. I love to use Ruby to make web applications. That’s my North Star and I’ll continue to do that and I’ll continue to share all of the open source gifts that I uncover along the ways,” and that’s it. That’s enough too.
(05:54:23) I don’t have to get all of it out of it. This is sometimes just as with the guy who thought I’d given up on being Jira or something, instead of doing Basecamp, there are people over the years who’ve asked like, “Why didn’t you charge for Rails? Don’t you know how much money had been made off Rails?” If we just look at something like Shopify, it’s worth billions of dollars. I’m not a billionaire and so freaking what? I got more than enough. I got plenty of my share.
(05:54:51) I will say though, I’m also introspective enough to realize that if it hadn’t panned out as well as it did for me on my own business, maybe I would’ve been more tempted. Maybe if you see other people build huge successful companies off the back of your work and you really don’t have a pot to piss in, you might be tempted to get a little upset about that. I’ve seen that in the Rails world as well, where there are people who contributed substantial bodies of work and then got really miffed when they didn’t feel like they got enough back. I was fortunate enough that the business that Jason and I built with Ruby on Rails was as successful as it was and I made the money I needed to make that I didn’t need to chase the rest of it.
Lex Fridman (05:55:36) But we should also just make explicit that many people in your position chase the money. It’s not that difficult to chase. Basically you turned away money, you made a lot of decisions that just turned away money.
DHH (05:55:53) Maybe. I also think of this example with Matt. He probably thought there was easy money for the taking and it wasn’t so easy, was it? It looked like low-hanging dollar bills and they turned out to be some really sour grapes. It turned out he probably destroyed vast sums of money by undermining the whole WordPress trust and the ecosystem and putting question marks in the heads of folks who would choose to use WordPress or something else going forward. So I often think when people think like, “Oh, you left money on the table.” First of all, so what? I don’t have to have all the money, but second of all, maybe the money wasn’t on the table at all.
Lex Fridman (05:56:33) And maybe the cost, even if you got the money, maybe the cost in other ways like we’ve talked about, would outweigh all the money that you could have possibly gotten. I think you said that the thing that makes you happy is flow and tranquility. Those two things. Really beautifully put. And gaining money might assign to your responsibility of running a larger thing that takes away the flow that you gain from being… Fundamentally for you what flow means is programming and then tranquility is like… I think you also have a beautiful post of like, “Nirvana is an empty schedule.”
DHH (05:57:17) When I look at a upcoming week and I see that I have no scheduled meetings at all, which is quite common, or maybe I just have one thing for one hour on one day, I think to myself, “Do you know what? This could very easily have been very different. We could have been running a company of 100s of people or 1000s of people and my entire calendar would’ve been packed solid with little Tetris blocks of other people’s demands on my attention and time and I would’ve been miserable as fuck. And I look at that and go, “What more can I ask for?” Which is a really nice state of being, I’d actually say. I didn’t have this always. I did have, early on in my career, some sense of I need a little more, a little more security. And I remember this really interesting study where a bunch of researchers asked people who had made certain amounts of money, “How much money would it take for you to feel secure?”
(05:58:14) They’d ask people who had a million dollars net worth, “How much money do you need?” “Probably need $2 million. $2 million, then I’d be good.” Then they asked people with a net worth of $5 million, how much do you need?” “10. I need 10.” Ask people with $10 million, “What do you need?” “20.” Every single time people would need double of what they did. I did that for a couple of doublings until I realized, “You know what? This is silly. I’m already where I wished I would be and a million times over, so what less is there to pursue?” Now that doesn’t mean that if more money is coming my way, I’m going to say no to it. Of course not. But, it does mean that I’m free to set other things higher. And I also do think you realize, as Jim Carrey would say, “I wish everyone would get all the money that they wished for and they’d realize it wasn’t the answer.”
(05:59:01) That money solves a whole host of problems and anxieties and then it creates a bunch of new ones and then it also doesn’t touch a huge swath of the human experience at all. The world is full of miserable, anxious, hurt, rich people. It’s also full of miserable, anxious, poor people and I’d rather be a miserable, anxious, rich person than a poor person. But it isn’t this magic wand that make everything go away, and that’s again one of those insights, just like having children, that you cannot communicate in words. I’ve never been able to persuade a person who’s not wealthy that wealth wasn’t going to solve all their problems.
Lex Fridman (05:59:42) One quote you’ve returned to often that I enjoy a lot is the Coco Chanel quote of, “The best things in life are free and the second-best things are very, very expensive.” And I guess the task is to focus on surrounding yourself with the best things in life like family and all of this and not caring about the other stuff.
DHH (06:00:07) I would easily say you can care about the other stuff. Just know the order of priority. If you are blessed with a partner that you love, some children that you adore, you’ve already won the greatest prize that most humans are able to achieve. Most humans in this world, if they are of marital age and they have children, if you ask them what’s the most important thing they would all say that, they would all say that, no matter whether they’re rich or poor. It’s easy to lose sight of that when you’re chasing the second-best things because do you know what? They’re also very nice.
(06:00:45) I really like that Pagani Sonda. It was a very expensive car and I would’ve had no chance of acquiring it if I hadn’t become rather successful in business. So I don’t want to dismiss it either. It’s great fun to have money. It’s just not as fun for quite as long or as deep as you think it is. And these other things, having an occupation and a pursuit that you enjoy, being able to carry burdens with a stiff up a lip and with again, a sense of meaning, is incredible. To have family, to have friends, to have hobbies, to have all these things that are actually available to most people around the world, that’s winning. And it doesn’t mean you have to discount your ambitions. It doesn’t mean you can’t reach for more, but it does mean it’s pretty dumb if you don’t realize that it’s not going to complete you in some hocus-pocus woo sense to make more. It really isn’t.

Hope

Lex Fridman (06:01:56) What gives you hope about the future of this whole thing we have going on here, human civilization?
DHH (06:02:04) 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.
(06:03:03) If you convince yourself with such certainty that the world is going to turn to shit. It is, right up here in your head, today. Climate change might wipe out this entire species in 200 years. It’s not next year. It’s not 10 years from now. Life might become more unpleasant and there might be more negative effects and so on. Yes, okay, but then deal with that hardship when it arrives. Don’t take that in advance. How are you helping earth by just walking around being depressed?
Lex Fridman (06:03:36) I think our whole conversation today is also an indication, it’s just two humans talking. There’s billions of us and there is something about us that wants to solve problems and build cool stuff and so we’re going to build our way out of whatever shit we get ourselves into. This is what humans do. We create problems for ourselves and figure out how to build rocket ships to get out of those problems. And sometimes, the rocket ships create other problems like nuclear warheads and then we’ll, I hope, figure out ways how to avoid those problems. And then, there’ll be nanobots and then the aliens will come and it’ll be a massive war between the nanobots and the aliens and that will bring all of us humans together.
DHH (06:04:24) The funny thing, just to pick up one of the points you mentioned, the atom bomb, for example. When that was first invented, a lot of people thought we have essentially ended life on earth or maybe we prevented World War III from happening in the past 80 years because assured, neutral annihilation kept the superpowers from attacking each other at least head-on and kept their fighting to proxy wars. You know what? Proxy wars are not great, but they’re probably better than World War III with nuclear weapons. So it’s quite difficult in the moment to tell what’s actually benefit and what’s not, and I think we should be a bit more humble. I’ve certainly become more humble over time of thinking I know which way it’s going to turn. I think the pandemic was a huge moment for a lot of people where there was so much certainty about whether this intervention worked or that intervention didn’t work and most people were wrong.
(06:05:25) Certainly a lot of very smart people, very qualified people got that just utterly and catastrophyingly wrong. So just a little intellectual humility, I think back upon that and go like, “You know what? I’m not a PhD in virology,” and I don’t claim that I somehow saw how it always going to play out, but the people who were really experts in it, they’ve got a bunch of it wrong. Nobody knows anything. I keep reminding myself of that every day. No one knows anything. We can’t predict the economy a month out. We can’t predict world affairs a month… The world is just too complicated.
Lex Fridman (06:06:03) When I watched the Netflix documentary, Chimp Empire, and how there’s a hierarchy of chimps, all of that looks eerily similar to us humans. We’re recent descendants. So these experts, some of the chimps got a PhD, others don’t. Others are really muscular. Others are beta male kind. They’re sucking up to the alpha. There’s a lot of interesting dynamics going on that really maps cleanly to the geopolitics of the day. They don’t have nuclear weapons, but the nature of their behavior is similar to ours. So I think we barely know what’s going on, but do think there’s a basic will to cooperate as a basic compassion that underlies just the human spirit that’s there. And maybe that is just me being optimistic, but if that is indeed there, then we’re going to be okay.
DHH (06:07:03) The capacity is certainly there. Whether we choose that capacity or not, who knows and in what situation. I think accepting that we all have the capacity for both ways, for both incredible generosity and kindness and also cruelty. I think, Young, with this whole theory of the shadow was really spot-on that we all have that capacity in us and accepting that it’s our job to attempt to cultivate the better parts of our human nature is weighed against our propensity to some time be the worst of ourselves.
Lex Fridman (06:07:41) I’m excited to find out what’s going to happen. It’s so awesome to be human. I don’t want to die. I want to be alive for a while to see all the cool shit we do. And one of the cool things I want to see is all the software you create and all the things you tweet, all the trouble you get yourself into on Twitter. David, I’m a huge fan. Like I said, thank you for everything you’ve done for the world, for the millions of developers you’ve inspired and one of whom is me, and thank you for this awesome conversation, brother.
DHH (06:08:11) Thanks so much for having me.
Lex Fridman (06:08:14) Thanks for listening to this conversation with DHH. To support this podcast, please check out our sponsors in the description and consider subscribing to this channel. And now, let me leave you with some words from Rework by DHH and Jason Fried, “What you do is what matters, not what you think, or say, or plan.” Thank you for listening and hope to see you next time.