About this episode
David Heinemeier Hansson (aka DHH) is a legendary programmer, creator of Ruby on Rails, co-owner & CTO of 37signals that created Basecamp, HEY, & ONCE, and is a NYT-best-selling author (with Jason Fried) of 4 books: REWORK, REMOTE, Getting Real, and It Doesn’t Have To Be Crazy At Work. He is also a race car driver, including a class-winning performance at the 24 hour Le Mans race. Thank you for listening ❤ Check out our sponsors: https://lexfridman.com/sponsors/ep474-sc See below for timestamps, transcript, and to give feedback, submit questions, contact Lex, etc. Transcript: https://lexfridman.com/dhh-david-heinemeier-hansson-transcript CONTACT LEX: Feedback – give feedback to Lex: https://lexfridman.com/survey AMA – submit questions, videos or call-in: https://lexfridman.com/ama Hiring – join our team: https://lexfridman.com/hiring Other – other ways to get in touch: https://lexfridman.com/contact EPISODE LINKS: DHH’s X: https://x.com/dhh DHH’s Website: https://dhh.dk/ Ruby on Rails: https://rubyonrails.org/ 37signals: https://37signals.com/ DHH’s books: Rework: https://amzn.to/44rSKob Remote: https://amzn.to/44GFJ91 It Doesn’t Have to Be Crazy at Work: https://amzn.to/46bzuwx Getting Real: https://amzn.to/4kzoMDg SPONSORS: To support this podcast, check out our sponsors & get discounts: UPLIFT Desk: Standing desks and office ergonomics. Go to https://upliftdesk.com/lex Lindy: No-code AI agent builder. Go to https://go.lindy.ai/lex LMNT: Zero-sugar electrolyte drink mix. Go to https://drinkLMNT.com/lex Shopify: Sell stuff online. Go to https://shopify.com/lex NetSuite: Business management software. Go to http://netsuite.com/lex OUTLINE: (00:00) – Introduction (00:58) – Sponsors, Comments, and Reflections (08:48) – Programming – early days (26:13) – JavaScript (36:32) – Google Chrome and DOJ (44:19) – Ruby programming language (51:30) – Beautiful code (1:09:31) – Metaprogramming (1:12:52) – Dynamic typing (1:20:10) – Scaling (1:33:03) – Future of programming (1:50:34) – Future of AI (1:56:29) – Vibe coding (2:05:01) – Rails manifesto: Principles of a great programming language (2:29:27) – Why managers are useless (2:38:48) – Small teams (2:44:55) – Jeff Bezos (3:00:13) – Why meetings are toxic (3:07:58) – Case against retirement (3:15:15) – Hard work (3:20:53) – Why we left the cloud (3:24:04) – AWS (3:33:22) – Owning your own servers (3:39:35) – Elon Musk (3:49:17) – Apple (4:01:03) – Tim Sweeney (4:12:37) – Fatherhood (4:38:19) – Racing (5:05:23) – Cars (5:10:41) – Programming setup (5:25:51) – Programming language for beginners (5:39:09) – Open source (5:48:01) – WordPress drama (5:59:18) – Money and happiness (6:08:11) – Hope
Listen to the original episode
Episode summary
The following is a conversation with David Heinemeier Hansson, DHH. He is a legend in programming, the creator of Ruby on Rails, CTO of 37signals behind Basecamp, HEY, and ONCE, a best selling author, and a Le Mans class winner. I love talking to him. To kick it off: you tried learning to program a few times and failed—was the Commodore 64 involved? Tell me the saga.
Commodore 64 was the spark, but I did not get one. I got a different machine, two bundled games, and no money for more, so I tried typing game code from magazines and kept failing. Variables made no sense to me. Piracy arrived, and I stopped trying to program. Second attempt was on the Amiga with Easy AMOS—loops, conditionals—I still could not finish a simple game. I fell in love with the demo scene, ran a BBS out of my bedroom with three phone lines, and traded software. I did not really learn to program until I was almost twenty. The third attempt stuck. In ninth grade I sat at Netscape, made text blink with HTML, and felt the magic of shipping to the world without permission. I made gaming sites, hustled for review copies, and moved from static pages to ASP and then PHP. PHP clicked. Suddenly loops, variables, and conditionals made sense, and I could build real web apps.
So no DHH without PHP? Do you owe your success to it?
One hundred percent. Late nineties PHP was peak developer ergonomics: write a script, FTP it, reload, done. No builds, no setups—instant dopamine. I have been chasing that feeling ever since, and a lot of modern web dev sold our ergonomics to the merchants of complexity. Even on teams, you can keep more of that simplicity than people admit.
And with Rails 8 you are pushing no build—bring modern features without losing that nineties ease. How?
No build is a principled throwback without the rose tint. I like JavaScript the language, but the early two thousand tens to early two thousand twenties were dark ages of build pipelines and churn. Webpack broke if you looked away for five minutes; frameworks rewrote themselves quarterly. Browsers are great now. We should be writing text files the browser can run directly and reclaiming programmer happiness.
Are we out of that dark age? And what about Chrome—good for the web, or a monopoly to break up?
We are getting out of it because browsers moved fast again after the IE freeze. Some complexity was a bridge, not a destination. Today you can just write modern JavaScript and ship it. On Chrome: it is a gift to the open web. We still have Firefox and Safari, and I even support new engines like Ladybird. If you want to fight tech monopolies, target mobile app store toll booths. Breaking Chrome risks making the web worse, like GDPR cookie banners did—monuments to good intentions paved straight to hell.
Take me to Ruby. What is it, and why did you fall in love?
PHP made me productive; Ruby made me a programmer. In 2001 Jason Fried hired me; we later built Basecamp. For Basecamp I had freedom of choice and kept seeing Dave Thomas and Martin Fowler use Ruby that read like pseudocode. I tried it for a weekend and it felt made for my brain—no semicolons, human first design, joy in the code itself.
Give me the feel—why does Ruby read so nicely compared to line noise in other languages?
Ruby compresses concepts to their essence. Five dot times do ... end is a perfect loop. Conditionals read like English: if user.admin? ... or do_something unless user.admin?. The question mark is for humans. No mandatory parentheses, no semicolons, no boilerplate. Aesthetics matter. Python’s double underscore init offends my sensibilities; Ruby’s initialize is beautiful. That is Matz’s philosophy: programmer happiness. He trusts programmers—open classes, five dot days to mean five days in seconds—and lets strangers like me extend the language so domain code reads like a DSL: user has_many :comments, belongs_to :account. It looks like keywords, but it is metaprogramming with zero line noise.
You defend dynamic typing to the death. Why is that essential to Ruby and Rails?
Dynamic typing is the bedrock. Static types hurt aesthetics, hamper metaprogramming, and invite repetition. I prefer tests over types and a text editor over an IDE autocompleting boilerplate. Duck typing plus great tests yields fast feedback and beautiful code. Context matters: do not force the constraints of a hundred thousand person, ten million line codebase onto a solo founder. Rails scales—Shopify proves it—so the absolutism that only static typing yields correctness is nonsense. Different brains, different tradeoffs.
How did Shopify push Ruby forward—like with YJIT—and what really matters for scaling?
YJIT is a big gift—faster Ruby helps at Shopify’s scale. But you scale two things differently: latency per request versus total throughput. Languages scale horizontally by adding boxes; the real hard part is the database. Ruby is a luxury language—the Coco Chanel of programming. Some ultra low value requests belong in C or Go. But for ninety nine percent of web apps, human time dwarfs CPU costs. If Ruby makes developers even ten percent more productive, it beats saving a few servers. That is the same promise people get excited about with AI.
I love collaborating with AI. It is more fun, and it works best when the code is human readable. Vibe coding is a real skill.
I use AI as a patient pair programmer in a separate window. Ruby’s high bandwidth syntax helps both humans and AI compress ideas. But I insist on typing to keep competence. When I let AI write my Bash for Omakub, I used code but did not learn it. Agents feel slow and can drain skill. Maybe most code will be machine written and manual programming becomes like riding horses—still joyful. Leaders like Tobi at Shopify already ask, could AI do this hire? I am not handing whole projects to agents yet, but AI makes me a little smarter every day.
You are a cowboy who loves the craft. But what is the future of the horse? With AI accelerating, is programming still a good career for a young person? How do you learn without letting your skills atrophy when tools can generate code in minutes?
Nobody knows anything about the future, and we are probably at peak AI hype. I have been blessed to program for nearly three decades; if it ended tomorrow, I would feel gratitude, not regret. History is full of curves that rocket up, then flatten. VR never became our daily life. Airplanes jumped fast, then mostly stabilized. COBOL still runs core systems because competence lingers. My advice: if you love programming, learn to program. Position yourself so you are content with any outcome and ready to reskill. That is how I frame new products too—any result can be a win.
How far can you get with vibe coding—generate, then iteratively fix with prompts and edits—versus writing code from scratch? What is the right balance to actually learn?
You do not get fit watching gym videos. You have to do the reps. Vibe coding can help non-programmers explore ideas, like how Excel let accountants build models without engineers. But if you want to be a competent programmer, you must program. Otherwise you are consuming empty learning calories and practicing approval clicking.
What if editing AI code and steering it—serious prompt-and-correct—becomes a real skill that outperforms writing from scratch? Maybe editing is fundamentally different and could win.
Great editors are great writers. Editing is the reward for doing. The fantasy of a prompt wizard who never builds is a pipe dream. The more appealing future is AI that needs no wizard at all—plain language in, good systems out. Until then, someone still has to know if it works.
If I vibe coded Basecamp or HEY, where would I hit the wall?
You fail early. Today, AI builds a convincing veneer that unravels under change. You fix one thing and break five—classic whack-a-mole. It is very human, like a junior dev at the edge of their competence. That is why I am optimistic it will improve.
Zooming out: the Rails doctrine. Beyond Ruby’s happiness, what makes a framework great for the web?
We wrote down Rails’ values so the fence stays up for a reason. First: optimize for programmer happiness—even if you trade a bit of performance for beauty and flow. Embrace human ambiguity—exit or quit both work. Convention over configuration: give great defaults so you ship what matters. Omakase: a chef’s integrated menu, not a buffet of parts. Favor the cohesive monolith over premature microservices; it is far easier to reason about. We write very little JavaScript and keep front and back together—splitting them was a crime against the web.
Active Record—your favorite? And does Rails make people lazy about SQL?
Active Record is the crown jewel: tables become classes, rows become objects. It removes tedium without pretending SQL does not exist. SQL endured every fad for a reason. Rails lowers the barrier so you can have fun fast, but the path is competence. Soft ramp, ramp to infinity. We hand you sharp knives and trust you to grow. Also, I changed my own doctrine: progress over stability is not the banner anymore—Rails has been calm to upgrade because the web changes slower than we pretend.
Have you changed your mind elsewhere—like on managers and process?
Yes, and sometimes I boomerang back. We tried classic engineering management and weekly one-on-ones. It created more problems than it solved. Programmers grow fastest under people better at the craft, not middle-management rituals. Tiny teams build the breakthroughs. Our default is a team of two—one programmer, one designer—long stretches of uninterrupted work, few meetings, ship and see. One person can do a ton; I built the first Basecamp in approximately four hundred hours. Stay small by not taking venture capital—other people’s money drags you into enterprise playbooks. Bezos bought secondaries from us, not growth capital—gave us confidence without changing our path. He is exceptional at betting early and long. Amazon created enormous value and, as Cathy Sierra taught me, that naturally creates an equal and opposite mass of haters. That is the universe balancing.
Your partnership with Jason Fried has lasted decades. How do you not kill each other? And how do you think about meetings, remote work, and the loneliness that can come with it?
We fought like hell on ideas, not people. Clear domains and deep trust: he owns design and product, I own tech; we overlap, then disagree and commit—a Bezos gem that saved us. We talk less than you would think and work more; meetings are toxic. For loneliness, build a life—family, friends, hobbies. Remote focus let us trade sprints for a decades-long marathon and define “enough” without chasing Jira-scale for its own sake.
You argue against the Mojito Island dream. What does a fulfilled builder’s life actually look like?
There is no retirement for ambitious builders. Happiness is flow—stretching your skills just beyond your edge, losing track of time. Big exits rarely deliver lasting joy; second acts are harder; and ignorance is a gift that makes the first journey possible. Take responsibility. Go hard, but enjoy the ride. I would rather be top five percent at several complementary crafts than chase top zero point one percent at one. My path is proudly nonlinear.
Last one for now: the DHH-leaves-the-cloud saga. Why do it when critics say you should ignore costs and chase the moon?
We left AWS to run leaner and own our destiny. The critique is that optimizing costs is small-minded if you could have been one hundred times bigger. I think that is a false trade, and we will get into the details.
Can you lay out why you pulled 37signals off AWS and what that says about the cloud?
Opportunity cost is real, but saving roughly two million dollars a year matters. The cloud pitch—easier, cheaper, faster—turned out mostly false for us: AWS is insanely complex, not cheaper, and only faster if you need thousands of machines instantly. We moved seven major apps off in about six months, bought gorgeous Dell servers, and cut infra spend by roughly half to two-thirds. It also aligns with the original, distributed spirit of the internet instead of three hyperscalers acting like hubs. Thanks to modern tooling, on‑prem now feels cloud‑like at a fraction of the cost, and hardware progress—TSMC, Apple—made owning machines exciting again.
What are the pain points, and how far can you go with homelabs and hands‑on GPU clusters?
Computers are painful, period—but owning them makes the pain feel worth it. The skills aren’t rocket science; the entire internet was built by people plugging in Linux boxes. We use a white‑glove datacenter partner for swaps, so it looks a lot like cloud from our chairs—just cheaper if you need it for years. Home labbing is back: five‑gigabit fiber and efficient personal servers mean bedroom startups are real again—like when SSDs collapsed old storage assumptions. And at the frontier, XAI shows why ownership wins: do not rent critical GPUs at markup from competitors; build your own massive cluster and move fast.
What makes Elon great at attracting and empowering talent, and how do you think about simplification?
He attracts people by broadcasting audacious, clear missions—Mars, electrification, global internet—and he actually knows the work, so he can judge output, spot BS, and bet on builders. I try to do the same at our scale: hire off a great, tailored cover letter and a real coding test I want to read in five years, not pedigree. The greats insist on radical simplification anchored in reality—like Jobs showing up and demanding better. Apple lost that edge; logistics excellence is not the same as product taste and uncompromising standards.
Do you still hate Apple? Tell the thirty percent saga with HEY and what Epic changed.
I loved Apple for decades, then the App Store toll booth rotted the relationship. We launched HEY, refused in‑app payments to keep direct billing, and Apple blocked our update. We said no, went public, and forced a truce—a silly dummy account so the app “did something,” but no thirty percent cut. Epic then spent over one hundred million dollars and won the crucial right to link out to the open web for billing. Apple’s contempt backfired; we will use links so we keep our customer relationship. Apple still makes beautiful hardware and the M chips are amazing, but they are behind on AI and feel led by an aging, logistics‑first culture that diluted taste.
How did becoming a father change you—and how do you see marriage, matchmaking, and even religion in the modern West?
I was unsure until I met my wife; kids expanded life from one to ten into one to one hundred. We should talk up marriage and children despite modern cynicism. You will marry the wrong person on some dimension; the burden is the point—it gives meaning. Tech broke matchmaking, the sexual revolution had second‑order costs, and stripping religion without a better societal operating system left a vacuum. I am not religious, but I now appreciate how those institutions held things together. They made me stricter and more effective within a forty‑hour week. A partner at home in the early years helped, and I time‑box hard: work by day, dinner and reading at night, no late‑night make‑ups. Deep work blocks move the ball; most overwork is fluff. Also, the joy matters—Fortnite sessions and go‑karting with my boys beat a few extra emails. Lineage matters.
How did you get into racing, and what hooks you about it?
I got my license at twenty‑five, loved sim racers, then did laps in a single‑seater and felt instant flow. Race cars demand total presence and carry real stakes; you cannot just hit reset. Le Mans is flow at scale—two to four‑hour stints at two hundred miles per hour, passing and being passed constantly. The highs are euphoric, the lows—like binning it in the rain—are brutal. That edge keeps me coming back.
What separates the best—skills, strategy, what you monitor in the car?
I am a fast gentleman driver: thousands of hours, telemetry‑driven learning from pro co‑drivers, and a few expensive lessons. Mastery is obsession, a fine‑tuned feel for the car at the limit, robot‑like consistency, and reaction times near two hundred milliseconds. I run a program per corner—brake points, trail, throttle—adjusting for tire falloff and traffic, while holding a mental 3D model of the car’s edges to run within inches. Strategy and nerve matter too; sometimes winning is simply who blinks first.
What is your greatest car joy and how does it actually feel to push it? Track or road?
The Pagani Zonda is my all-time favorite—mine is the Zonda HH. It is a masterpiece for the road, not the track: supple, gorgeous, and sonorous. I keep it in Spain where enforcement is saner than Denmark, where they literally confiscate your car for going twice the limit. On the Autobahn my wife and I did two hundred miles an hour in a Lamborghini and it is both terrifying and exhilarating. Speed has this exponential feel—one ninety to two hundred feels wildly faster than one fifty to one sixty. It makes most people grin.
Paint your ideal programming setup—OS, screens, keyboard, editor—the whole vibe.
For twenty years I was a single-big-screen Mac person and I still love Apple’s thirty two inch six K XDR display. But I switched to Linux about a year ago and it is simply better for web development. I built a reproducible setup with Omakub that gets a new machine perfect in under thirty minutes. The immediacy—instant virtual desktop switching with no silly animations—keeps me in flow. I fell in love with the Lofree Flow 84 low-profile mechanical keyboard and use a Logitech MX Master 3 mouse. Editor-wise, I helped midwife TextMate back in the day and adored its simplicity for years, but I moved to Neovim. Vi’s combo moves are not that hard to learn, and the payoff is huge without drifting into IDE hand-holding.
You love JavaScript but hate TypeScript—why? And what three languages should beginners learn and when should they jump into Rails? Anything Ruby is not great for?
TypeScript complicates the dynamic, metaprogramming joy I like in JavaScript. I do not care about autocompletion or type gymnastics, and I refuse to bolt pretend static types onto a dynamic language. For beginners: start with Ruby—magic for learning loops, conditionals, and clarity. If you want to build for the web, learn Rails alongside Ruby so you can ship real things. Then learn JavaScript because it is the web’s language. For infrastructure pieces like HTTP proxies, Go is excellent; I would not write business logic in Go. Ruby is not for a three D game engine—use C or C plus plus. Functional languages are fine for those who love them, but I am an object-oriented person at heart.
You call yourself a software writer, not an engineer. How does that shape how you code, your take on AI, and the new book with Jason about not knowing up front and trusting the gut?
I write software for human consumption and my own delight. Coding at its best feels like crafting tight, clear prose—discovering the argument as you write. I wish AI had a strict mode that forced proper sentences instead of rewarding keyword soup. The new book is about granting yourself permission to follow instincts: your gut is a supercomputer trained over decades. Inspiration is perishable—act while it is hot. Being bootstrapped lets us follow that compass without having to rationalize every move to outsiders.
Open source: what makes a project thrive, and what is your take on the WordPress versus WP Engine drama? If you were Matt, how would you walk it back?
Treat open source like a gift exchange, not a vendor relationship. I build primarily for my own needs and share the results; contributions back are gifts too. There is no funding crisis—if you need guaranteed money, sell software or get paid by a company to work on open source. Licenses exist to prevent retroactive ransom notes. With WordPress, you cannot give the world free software and later demand a slice because someone got too successful using your gift. I prefer the MIT license’s simplicity over the GPL’s forced sharing. Commerce trusts open source because we honor these licenses. Matt should simply drop it, admit it was a bad idea, and exercise restraint. I have felt aggrieved plenty as Rails’ BDFL, but you cannot undermine the foundation out of frustration.
You often say flow and tranquility matter more than chasing every dollar. How do you keep that balance—and how do you think about the best things in life?
Nirvana is an empty schedule. I could be running a giant org and live in calendar Tetris; instead I protect flow so I can program. Money solves many problems and creates new ones. I have enough, which lets me prioritize better things: family, meaningful work, hobbies. The best things in life are free; the second best are very, very expensive. I love my Pagani—and I keep it in its place.
What gives you hope about where humanity is headed?
I choose optimism because we do not know, and pessimism makes you suffer in advance. Climate change may be serious, but certainty is misplaced—deal with hardships when they arrive. Nuclear weapons looked like world-enders; they may have deterred world war. The pandemic humbled many experts. No one knows anything with precision—the world is too complex. Humans have the capacity for both kindness and cruelty; our job is to cultivate the better parts.
I loved this. I am a huge fan of your work and your voice—thanks for inspiring millions of developers, me included, and for this awesome conversation. Thanks for listening to this conversation with DHH. I will leave you with words from Rework by DHH and Jason Fried: What you do is what matters, not what you think or say.