DHH · 2025-07-12 · transcript-lex-474-2025 · source ↗
Programming language for beginners
`5: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] How quickly would you go to Rails? — It depends on what you wanna do. If you wanna 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, some people learn languages just for the fun of them. Most people do not. Most people learn it because they have a mission. They wanna build a program. They wanna become a programmer. So you gotta 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. You can't just learn the whole thing up front. You can't just sit down and read the language specification, 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
`5:21:26`
on a real program. — Yeah, yeah, for sure. — So I would start there. But then number two, I probably would be JavaScript. Because JavaScript just is the language you need to know if you wanna work with the web. And the web is the greatest application platform of all time if you're making business software, collaboration software, all this kind of stuff. 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 gotta learn JavaScript. Regardless of what else you learn, you gotta learn JavaScript. — So if you're learning Ruby, what does Ruby not have in terms of programming concepts that you would need other languages for? — I dunno if there's any concepts missing, but it doesn't have the speed or the low level access of memory manipulation that you would need to build a 3D gaming engine, for example. No one's gonna build that in Ruby. You could build quite low level stuff when it comes to web technologies in Ruby.
`5:22:28`
But at some point, you're gonna hit the limit and you should use something else. I'm not someone who prescribed 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, HTTP proxy, go, it's 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. And Kevin, one of the programs 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 ride your business logic in Go. I know people do, but I don't see the point in that. — So what would you say the three, so Go, Ruby plus Rails, JavaScript? — Yeah, if you're interested in working with the web, I'd pick those three. Go, Ruby and JavaScript. — Go, Ruby and JavaScript, okay. Functional languages? — Someone's talking about Ocaml.
`5:23:29`
— 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. — I love that there are people who love functional languages to that degree. Those people are not me. I don't care at all. Like 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 a domain language. Objects are my jam. — Yeah, me too. So I program a Lisp a bunch for like 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. It's much, you know, Lisp is just parentheses everywhere.
`5:24:32`
It's actually not readable at all. — That's the problem I've had with Lisp. — OCaml is very intuitive, very readable. It's nice. — 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 functionally programming language. — Yeah, but like I have to figure out, I'm sure there's an answer to this. What can I do that would be useful for me like that I actually wanna build? — Yes, yes, that's my problem — That a functional language is better suited for. — That's right. — Because I really wanna experience the language properly. — [DHH] That's right. — Yeah, 'cause I'm still, yeah. At this point, I'm very object-oriented brained. — Yes, 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. And I've come to accept that about myself. Even though, as we talked about when I was a kid,
`5:25:34`
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 gonna 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 I'm of a math person. — I mean, just in the way you were speaking today, you have like a poetic literary approach to programming. — Yes. — Yeah. — It's interesting, that's actually exactly right. So I did actually a keynote at RailsConf 10 years ago where I call 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. 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
`5:26:37`
and for my own delight. 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 talents to writing 3D game engines, no, that's not the right mindset. That's not the right identity. But I find that the software engineering identity flattens thing 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. — Yeah, and I think if AI becomes more and more successful, I think we'll need software writer skill more and more. Because it feels like that's the realm of which, 'cause it's not writer. You're gonna have to do the software. You're gonna have to be a computer person.
`5:27:37`
But there's a more... I don't know, I just don't wanna romanticize it, but it's more poetic, it's more literary. It's more feels like writing a good blog post than... — I actually wish that AI had a bit higher standards for writing. I find the fact that it accepts my sloppy, incomplete sentences a little offensive. I wish there was like a strict mode for AI where it would snap my fingers. It was just feeding it key words 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 it has no meat on, it has no character in it. It's succinct. It's not overly flowery. It is just right that writing phase, to me, is just addictive. And I find that when programming is the best, it's almost equivalent exactly to that.
`5:28:37`
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. Half the time when I start writing a blog post, I don't know exactly what arguments I'm gonna 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 gonna solve it. And as you start typing, the solution emerges. — 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 gonna be titled something like, we don't know what we're doing upfront, something like that. That kind of topic. And you figure out along the way. — That's a big part of it. Trying to give more people the permission to trust your own instincts and their own gut and realizing that developing that supercomputer in your stomach is actually the work of a career.
`5:29:38`
And that you should not discard those feelings in preference to over comp... or not even complicated, to analytics, to intellectualism. 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 like, 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. 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 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. If you don't have anyone to answer to, you are free to follow your gut.
`5:30:39`
And that's hell of enjoyable way to work. And it's also in very often the correct way to work. Your gut knows a lot, like you can't articulate it, but it's spot on more times than not. — Yeah, having to make a plan can be a paralyzing thing. I've often, I mean, I suppose there's different kinds of brains. And first of all, I can't wait to read that book if it materializes. I often feel like in the more interesting things I do in my life, I really don't know what I'm doing up 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? And if I had to wait until I have a plan, I'm not gonna do it. They have different brains on this kind of stuff. Some people really are planners and it maybe energizes them. I think most creative pursuits, most really interesting, most novel pursuits are like,
`5:31:41`
you kind of have to just take the leap and then just figure out as you go. — 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. If you follow the inspiration in that moment and trust your gut, trust your own competence, that you will figure it out, you're gonna get so much more back. You're gonna go on the adventure you otherwise wouldn't have. Whether that's just a business decisions or life decision, you have to seize that inspiration. 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 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.
`5:32:42`
If you just put it back on the shelf and say like, well, I gotta be diligent about this. I gotta line up a plan. You may run out and then there's no steam to keep going. — I have to ask 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's often is a kind of also a benevolent dictator at the top often. So can you just speak to that? Having run successful open source projects yourself and being a benevolent dictator yourself. — Which is gonna be a bit of a biased piece of evidence here, but I... — But why monarchy is best. — 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