Interview with Russ Olsen author Eloquent Ruby at GOTO Chicago 2014

Interviewee: Russ Olsen (conference bio)
Topic: ruby and rails practice
Conference: GOTO Conference 2014
★ Transcript Available Jump to transcript
Description: Interview with Russ Olsen at GOTO Conference 2014 on Ruby and Rails practice. This recording captures practical lessons and perspective for software teams and technical communities.
Published: May 14, 2022

Transcript

Hi, it’s Mike with UGtastic. I’m here at GOTO Conf 2014. I’m sitting here with Russ Olson. He’s the author of Eloquent Ruby and he’s also presenting on Programming in Interesting Times here at GOTO Conf 2014. Thank you very much for taking the time to speak. So programming in interesting times, what’s so interesting about our times? So I think that the times are interesting because I think we go through these periods where programming languages are very stable. You know, ten years ago there was Java and maybe C# and most people were picking one of those or one of a very small menu of programming languages and I think that every now and then those, you know, the major programming languages start to decline. They get towards the end of their lifecycle and what happens is that you get this period of kind of flux. Right. Where it’s not clear which programming language you should, you should use or which programming language you should, you know, be keeping an eye on. There’s not an obvious default and I think we are definitely in one of those periods of interesting times where there’s, there’s lots of programming languages. Do I do Posure? Do I do Elixir? Do I do Rust? And they’re trying to satisfy a similar niche. Right, and so how do you decide and, and, you know, it’s critically important for programmers because programming languages are, of course, are, are a key tool and they’re also incredibly expensive tools. It takes six months, a year, to become really proficient and even like a straightforward programming language like Ruby, let alone something maybe more complicated like C++, right, you know, back in the day or maybe Scala people say is fairly complicated. So if you think of, you know, six months worth of work is maybe a thousand hours, right, that is an unbelievably high cost. And that’s just to become proficient. Yeah, yeah. Much less mastery. Right, and so the talk is all about, you know, which programming languages should you keep an eye on and not which in terms of like specific languages, but it’s kind of a meta talk about, you know, what, how, how can you select a new programming language and say that is what I’m going to keep my eye on, you know, that kind of thing. Well, it’s , it’s a very interesting because I also went through that myself when I went from C# , I, you know, when I went from Visual Basic to C#, it was a no-brainer. Yeah. It was, I’m getting off of this. You know, the choices were VB.NET or C#, and it was C#. But then after a few years, it, I, I went through that period where, okay, I’m ready to move on to do something else. It was getting a little, yeah, for me. It’s, the reason I call it interesting times is it’s, you know, it’s, it’s one of those best of times, worst of times things. You, you get to the point where you’re like, okay, well, there’s other options and I need to stop doing what I’m doing and that’s great. Like, you’re ready to move on. But then there’s the frightening thing of, I need to move on and I need to get this right, you know. But, yeah, and with, fortunately with Ruby, it already had Ruby on Rails and that was pretty established. It was a safe-ish jump. Well, it was, if you were talking about 2004, I sort of started with Ruby years before that. That was a few years after 2004. Yeah, yeah. So, yeah, it was pretty safe. But, you know, now it’s not so safe. It’s probably more like when you were pre-2004. Right, right. So, yeah, so I think, I think, as I say, the, the, the really major programming languages are, are going through some kind of flux and we’re seeing all these new ones. I mean, Clojure is the one that I’ve picked up most recently and the one, you know, kind of my new programming language. But, you know, for different people in different circumstances, it could be different. And the other thing that’s happening is we, I think, are going through the same kind of thing that people went through in the 1980s when object-oriented programming came along. Well, now it’s functional programming seems to be the, the new, well, if you ask me, is the new, new way of looking at the world. And that’s, that involves a lot more than just learning a new programming language. Yeah. It’s kind of retooling the way you think about things. The whole paradigm is different. Yeah, yeah. It isn’t simply, well, how do you do an object in this language? Yeah. How do you get-ers and set-ers and create instance methods? And, you know, it’s like, no, forget all of that. Right. Yes, yes. How do you handle state? What? Yeah. Yeah. Or, you know, just a few years ago, sort of multi-th readed programming was something exotic that not so many people did. And now, making concur rency work, which is not quite the same thing, but making concurrency work seems to be the thing that we need to master in the really short term to get, you know, the modern world back working again. Right. You know, when light bulbs have an IP address. Yeah. Concurrent programming is really important. Right. And just one more variable into that decision is, again, when I was going from C# to Ruby, it was also because of some dissatisfaction with a corpor ately owned, driven language and platform versus open source. And I looked at open source as being, okay, that’s not necessarily tied to a marketing cycle. Yeah. So, when you’re looking at these languages, are you fact oring those kinds of dissatisfaction? Yeah. Are you factoring those kinds of decisions in? So, what I think is, what I say in the talk is basically this, that I can’t tell you what your next programming language can be, but I can tell you, and I think that what people tend to do is, they tend to fasten onto a language. They hear a talk about Scala or Elixir, you know, name the programming language Clojure, and they fasten onto that language. And what you should really be doing is backing up and saying, well, you know, open source versus closed source is important to me. Functional is important to me. You know, I want a programming language that does concur rency with communicating sequential processes. I don’t know. And then go find a programming language that does that. I think you win doing that. That’s how I found Ruby. I wanted a simple, dynamically typed, object-oriented programming language. Okay? I say that, and you just, today, you know, in this era, you think, okay, well, that would be Ruby. It would be, you know, one of a small number. But I found Ruby by saying, what did I want in a programming language? And working from there, instead of, like, looking at the menu of programming languages and saying, oh, that’s a cool one, you know? And actually, I’m going to just ask you to stop right there for a moment. So when you were talking about Ruby, and obviously with Ruby, you’ve approached a level of mastery. You’ve put a lot of effort into it. A lot more than six months. Looking at these languages, have you been able to develop a strategy when you start to look at these languages or pick a language to maybe expedite that effort? Or is that something that you’re looking for? I think that’s a good question. I think that’s a good question. I think that’s a good question. I think that’s a good question. I think that’s a good question. I think that’s a good question. I think that’s a good question. I think that’s a good question. I think that’s a good question. I think that’s a good question. I think that’s a good question. I think that’s a good question. I think that’s a good question. So the way Eloquent Ruby came about was I was teaching lots of, mostly Java programs, the program in Ruby. And they were all making exactly the same mistakes over and over. And sort of the, you know, the obvious things that you might make mistakes about in Ruby is that they were all making exactly the same mistakes over and over. And so they were all making exactly the same mistakes over and over. And so they were all making exactly the same mistakes over and over. And so they were all making exactly the same mistakes over and over. And so they were all making exactly the same mistakes over and over. And so they were all making exactly the same mistakes over and over. might do if you came from some particular programming language to a different programming language. And I started making a running list of, you know what, don’t do this. You ‘re going to want to do this, but do this instead. And I realized no one else was writing that stuff down. There was no one place you could go to and say, oh, this is how the natives really do it. So let’s just kind of accelerate that process along and get you off that point. So I think for any programming language, there is a sort of just basic proficiency level of, you know, I can, I know how to do decisions and iterations or whatever in the programming language. You get to that point, and then your very next step before you really write anything significant is go start looking at how the natives are speaking this language. Go look, if you want to write, I don’t know, some simple application, I don’t know, you know, like a classic blog, web app, don’t just sort of sit down and write your version of it. Because you’re almost certainly going to go off in the wrong direction. What you should do is you should peek at someone else’s version and say, oh, okay, that’s the general outline. Go back and then try it. And then when you have something, go back and peek again. So that you’re, you know, you’re playing off of how do the natives speak it with practicing yourself. And actually, that is, I mean, kind of in line with what D HH was talking about with reading, reading and writing code. So that way you can learn to write by reading. Yeah. And then you read these. These works, and then you build a better vocabulary, a better understanding of sentence structure. Right. I mean, if you learn French, you do not learn French , but you learn French grammar and then start making up sentences. You learn French partially by that, but also partially by reading either simple or more complicated bits of French literature and talking to actual French people. Right. That’s how you learn French. And I think that the analogy is really pretty strong. Because you can actually. I think learn to program in a new programming language and actually be quite capable of it and be speaking a dialect that no one else knows, which is almost as bad because then you’re, you know, you kind of fork the community at that point. But when you first start, though, I’ve run into people have that exact question that is coming from one platform and one, you know, I use CamelCase or I use PascalCase, and then they come in like the under the snake case is weird. So they, you know, they write what to me now, after several years of writing a movie, it’s kind of ugly, but it’s part of the learning process. It really, you know, it’s funny for exactly that reason. I recently came across one of the very first programs I’ve written in Ruby, and it was buried in, you know, the C drive directory that had been in a larger, you know, the D drive directory, you know, kind of the archive archives. Yeah, it was buried. And I found it. I actually. I put it down on GitHub, but it’s actually a GitHub project of it’s not really my first Ruby program, but it’s pretty close and it has all of that stuff in it because I had been a Java programmer, so it looks like Java and Ruby. And I think it’s I would encourage everyone if you can find your early Ruby to put it out there to say to show people mostly, you know, this is how I did it to everyone goes through that process. But I think so. One of the things I talk about in the talk today is how if you’re learning a new program. A new programming language like you start out, you’re all excited. I’m going to learn this new programming language. The iceberg in your way is the syntax of that new programming language, because we once you’re a programmer, I think it’s absolutely unavoidable. You look at the syntax of a new programming language and it ‘s like a punch in the stomach, right? There is this emotional, visceral reaction that’s sort of like that is evil, right? Intellectually, you know, it doesn’t matter. It’s just. Different notation, but but in your gut, no, it’s bad. Every time I try to look at Clojure, yes, especially by somebody who is very good at writing culture, a terse type functional code, and it uses all the constructs that are, you know, that you have to have a deep mastery of it. And that is that’s the one thing that, you know, looking at these functional languages, if you come from a very think of like C Sharp and BB and Ruby and Java. As being kind of plain spoken, they’re they’re a working dialect where you come into so you go from a very simple dialect that’s that’s very, very obvious to something that has a lot of nuance and shortcuts. And Ruby has all kinds of nuances. I mean, I think all of the programming languages have all kinds of nuances, and I think it’s the kind of thing, you know, people who learn like new. Human French or whatever programming languages, they talk about the moment where they start dreaming in that in that language, and that’s the moment. And so I’m going to seek into. Yeah, and I know what you’re talking about with closure because I went through that. I picked up closure and put it down like three times, so I sort of went through what you’re talking about approximately three times. But around the fourth time, and it was me like running out of time and not being able to put the time to it around, you know, around the fourth time. And again, it was just me, you know, putting in some time and actually getting to that point. All of that stuff made sense. And so what I want when you say that it’s it’s not really plain spoken, I can feel what you’re saying, but I don’t feel that way anymore. Yeah, so it’s so I’m reflecting in a real moment for you where that’s yeah, that’s and you’re right. It is a process. It’s a real process of, you know, initially you have to go through the. The sort of nausea over the syntax for any programming language, right? The new syntax just makes you a little crazy and then you have to go through the, you know, maybe the conventions and things like that. And that makes you a different kind of crazy. And then finally, you really get what these people are talking about. You know, there are no stupid people programming, right? So every single language has, despite what we may say. Yes, we say that, you know, tongue in cheek, but if you think about, you know, all the thought. That goes into even not very well known programming language. Those are really towering intellectual achievements. There are no stupid. There are no stupid programming languages that you’ve heard of that way, you know, right? You really have to respect them and, you know, learn the program the way they’re meant to be programmed. Get to the eloquent phase. Right. And, you know, just to to pivot and look, you know, you haven’t written a book, are you still actively? In the authoring world? I, um, so I’ve actually written two books. Oh, okay. Because I’ve had them since Ruby before. Oh, okay. I really like my Ruby. I am always writing. I, you know, for me, writing the books was like somebody coming along and saying, “Hey, we’ll pay you for this thing you’re doing. Wonderful.” Right. Okay. I’d be happy to do that. Yeah. By the way. Pay me for this. And so, yes, I’m always, I’ve had this sort of, you know, I ‘ve had this sort of, you know, I’ve had a lot of success. I’ve had a lot of success. I’ve had a lot of success. I’ve had a lot of success. I’ve had a lot of success. I’ve had a lot of success. I’ve had a lot of success. I’ve had a lot of success. I’ve had a lot of success. And so, yes, I’m always, I’ve had this sort of book project simmering in the back of my mind that I work on, and then I leave, and I come back to, and it’s, you know, a matter of how many hours are in the day, but it’s all about explaining technical things. I think it, I think we as programmers, as technical people, we have so much to explain to each other, right? The things we work with are really complicated, and we have all these programming languages and all that other stuff that we’re dealing with, and we really need to be, like, expert explainers. Right. And by and large, we are not. So, by writing, you help with learning how to explain, or thinking about explaining. Yes. So, I have this book project, which is about how to explain things. Okay. Okay. Because I think, I think we may, again, it’s like the new programming language. We’re coming to a different language. There’s a series of mistakes that people make when they try and explain things. Right. And, you know, take a silly example. People tend to use really complicated examples when they try and explain things, and the example truck tends to overwhelm the thing that they’re trying to explain. Right. So, I really believe, if you look at my books, the examples tend to be painfully simple, because I don’t want the example, you know, the subject matter of the example to detract from what I’m trying to say. I just want just enough of an example to motivate the thing . Yeah. And, yeah, I’ve experienced exactly what you’re describing. Trying to do something that might be simple to somebody in Rails. I wanted to do this kind of obscure descending parameters through a has-been relationship. Yeah. Using the new syntax in Rails 4, which, you know, changes how things work a little bit. And I find lots of people have written about how they have basically approached the problem, but they had their own kind of domain things mixed in there . And then you’re trying to understand, like, okay, I’ve got these four objects, and now I’ve got to know how, okay, that the user was the, okay, and then the user went into the operation, and then the operation had, you know, inventory, and the inventory had many, it’s like, okay, like, so, like, even the cognitive overhead from just the domain that they chose to describe. The problem is already complex enough, much less the thing that they were trying to describe. Yes. So, for example, in Design Patterns of Ruby, I think, I don ‘t know, there’s 18 chapters in that book or something, and there’s 18 different examples. And it’s, when I went to write Elephant Ruby, I thought that, you know, I tried to make those 18 examples as simple as I possibly could, and when I went to write Elephant Ruby, it came to me, and it’s one long example. There is basically one class. One class in that book, and variations of that class, all the way through from beginning to end. And, yes, you’re sick of those documents at the end of Ele phant Ruby, but at least you didn’t have to re-learn, you know, the example. And then if you, like, try to refer back, to understand, okay, they changed something in this second chapter, well, it’s now a totally different theme. Right, and how does it relate? Yeah, yeah. And then you can weigh them against each other and say, oh, okay, the obvious difference is shy, because there is a nice beige background. Yes. To allow the important things to emerge. So that’s a good example of how, you know, you could either stay on the tracks, if you will, if you’re real, trying to explain things. And I think there’s a lot of things like that, and I think it’s, it would be worth writing a book that just sort of says, hey, you’re a technical person. It’s not, you know, the world of accounting, or the whole world, or anything. Something for us. Right. Here’s how you explain, or here’s some, you know, not very technical, but, you know, not really tricks, but techniques for explaining technical things that are kind of known to work, because I’ve, you know, spent 700 pages explaining technical things. Now, are you publishing this through a publishing house, or are you… I haven’t really, I haven’t really decided. I, historically, the two earlier books were, you know, sort of standard publishing, and I haven’t really decided which way I can go. You know, sort of old school publishing. Maybe that’s the word. Has its advantages. They sort of take over everything, and you don’t have to worry about it. That’s the advantage. That’s also the disadvantage. They take over everything, and you kind of don’t have any control. Unless you do a lot of negotiations, and things like that. I haven’t decided. I really haven’t. But have you seen a change in the relationship that publishing houses have because of e-books, and things in sub-publishing that might be a little bit different? No, I haven’t. I don’t think so. No, I haven’t. I don’t think so. I don’t think so. I don’t think so. I don’t think so. I don’t think so. I don’t think so. I don’t think so. Yeah. Have you seen a change in the relationship that publishing houses have because of ebooks and things in self-publishing ? I think they’re still catching up. I really think they’re still catching up. I think they’re kind of old school businesses and they’re still trying to catch up. So like all of us, trying to figure out… Right, right. How do I make this work? They’re in interesting times as well. Yes, yes. I think they’re in more interesting times than we are. Well, thank you very much. Thank you. User groups with lots to say, interviews and more, no way, sharing great ideas in the tech community. Fascinating conversations, a plethora of information. Find out for yourself today at ugtastic.com. Thank you.