Ruby And Rails Practice: Mike Hall Interviews Russ Olsen | GOTO Conference 2014

β€’ UGtastic Archive
Full Transcript Available
πŸš€ Discover the fascinating world of programming languages with Russ Olsen at GOTO Conference 2014! Learn about the challenges of choosing the right language, the importance of considering factors like open-source status, and the evolving nature of programming paradigms. Don't miss this insightful talk! πŸŒπŸ’» #programming #ruby #rails #functionalprogramming #open_source #CTA https://just3ws.github.io/interviews/russ-olsen-goto-conference-2014
The Interviewer

Mike Hall

Interviewer, UGtastic

The Guest

Russ Olsen

ruby and rails practice

The Conversation


Mike Hall Interviewer, UGtastic
Hi, it's Mike with Ute TASC. I'm here at GOTO Conference 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 Conference 2014. Thank you very much for taking the time to speak. So programming in interesting times, what's so interesting about our times?
Russ Olsen ruby and rails practice
So I think that the times are interesting because I think we go through these periods where programming languages are very stable. You know, 10 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 life cycle and what happens is that you get this period of kind of flux. Where it's not clear which programming language 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 lots of programming languages.
Mike Hall Interviewer, UGtastic
Do I do Clojure? Do I do Elixir? Do I do Rust?
Russ Olsen ruby and rails practice
And they're trying to satisfy a similar niche. Right, and so how do you decide and, you know, it's critically important for programmers because programming language is a big part of your life. It's a big part of your life. It's a big part of programming language. Those are, of course, our key tool and they're also incredibly expensive tools. It takes six months, a year to become really proficient in even like a straightforward programming language like Ruby, let alone something maybe more complicated like C++, you know, back in the day or maybe Scala, people say is fairly complicated.
Mike Hall Interviewer, UGtastic
So if you think of, you know, six months worth of work is maybe a thousand hours, right?
Russ Olsen ruby and rails practice
That is an unbelievably high cost. And that's just to become proficient. Yeah, yeah. Much less mastery.
Mike Hall Interviewer, UGtastic
Right.
Russ Olsen ruby and rails practice
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, how can you select a new programming language and say that is one I'm going to keep my eye on, you know, that kind of thing. Well, it's very interesting because I also went through that myself when I went from C#. You know, when I went from Visual Basic to C#, it was a no brainer.
Mike Hall Interviewer, UGtastic
Yeah.
Russ Olsen ruby and rails practice
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, I went through that period where, okay, I'm ready to move on to do something else. It was getting a little, for me. The reason I call it interesting times is it's one of those best of times, worst of times things. 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. I'm 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 pre-established, so 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, there you go, 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. Yeah, so I think, as I say, the really major programming languages 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, it seems to be. The new, well, if you ask me, is the new way of looking at the world, and that involves a lot more than just learning a new programming language. It's kind of retooling the way you think about things. The whole paradigm is different.
Mike Hall Interviewer, UGtastic
It isn't simply, well, how do you do an object in this language? How do you getters and setters and create instance methods?
Russ Olsen ruby and rails practice
And, no, it's like, no, forget all of that. Yes, yes.
Mike Hall Interviewer, UGtastic
How do you handle state? What?
Russ Olsen ruby and rails practice
Yeah, or, you know, just a few years ago. A few years ago, sort of multi-threaded programming was something exotic that not so many people did. And now, making concurrency 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. You know, when light bulbs have an IP address, concurrent programming is really important.
Mike Hall Interviewer, UGtastic
Right.
Russ Olsen ruby and rails practice
And just one more variable into that decision is, again, when I was going from C-sharp to Ruby, I was going from C-sharp to Ruby. It was also because of some dissatisfaction with a corporately 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.
Mike Hall Interviewer, UGtastic
Yeah. So, when you're looking at these languages, are you factoring those kinds of decisions in?
Russ Olsen ruby and rails practice
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 concurrency 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.
Mike Hall Interviewer, UGtastic
Okay?
Russ Olsen ruby and rails practice
I say that, and you just say, you know, in this era, you think, okay, well, that would be Ruby. It would be, you know, one of a small number.
Mike Hall Interviewer, UGtastic
But I found Ruby by saying, what did I want in a programming language?
Russ Olsen ruby and rails practice
And working from there, instead of, like, looking at the menu of programming languages and saying, oh, that's a cool one.
Mike Hall Interviewer, UGtastic
Right. You know?
Russ Olsen ruby and rails practice
And actually, I'm going to just ask you to stop right there for a moment. So, when you... We're 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 to get to not just proficient, but eloquent? So, the way eloquent Ruby came about was I was teaching, so mostly Java. Java was the program in Ruby. And they were all making exactly the same mistakes over and over. It's sort of the, you know, the obvious things that you 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... This is how the natives really do it, so let's just kind of accelerate that process along and get you up to that point. So, I think for any programming language, there is the sort of just basic proficiency level of, you know, 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. So, look, if you want to write, I don't know, some simple application, I don't know, you know, what's 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 DHH was talking about with reading, reading and writing codes, so that way you can learn to write by reading.
Mike Hall Interviewer, UGtastic
Yeah.
Russ Olsen ruby and rails practice
And then you read these, these, these works, and then you're, build a better vocabulary, a better understanding of sentence structure.
Mike Hall Interviewer, UGtastic
Right.
Russ Olsen ruby and rails practice
I mean, if you learn French, you do not learn French by learning 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.
Mike Hall Interviewer, UGtastic
Right.
Russ Olsen ruby and rails practice
That's how you learn French. And I think the, the analogy is really pretty strong. Because you can actually, I think, learn to program in a, 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're, you know, you kind of fork the community at that point. But when you first start, though, I, I've run into people who have that. It's that question that is coming from one platform and one, you know, I use CamelCase or I use PascalCase and then they come in on like these, the under, the snake case is weird. So they, you know, they write what to me now, after several years of writing Ruby, it's kind of ugly, but it's part of the learning process. It, it really, you know, it's funny for exactly that reason, I recently came across one of the very first programs I'd written in Ruby.
Mike Hall Interviewer, UGtastic
Right.
Russ Olsen ruby and rails practice
It was buried in a, you know, the, the C drive directory that had been in a larger, you know, the D drive, drive directory, you know, kind of an archaeological. Archive, archive, archives. Yeah, and it was buried and I found it, I actually put it out on GitHub. It was 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 have, I had been a Java programmer, so it looks like Java and Ruby. And I think it's, I, I would encourage everyone, if you can find your early.
Mike Hall Interviewer, UGtastic
Yeah.
Russ Olsen ruby and rails practice
Ruby, to put it out there, to say. To show people mostly, you know, this is how I did it too, 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 programming language, like you start out and 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.
Mike Hall Interviewer, UGtastic
Right.
Russ Olsen ruby and rails practice
Right, there is this emotional visceral reaction that's sort of like, that is evil.
Mike Hall Interviewer, UGtastic
Right.
Russ Olsen ruby and rails practice
Intellectually, you know, it doesn't matter, it's just a different notation. But, but in your gut, you know it's bad. Every time I try to look at Clojure, I. Yes. Especially by somebody who is very good at writing Clojure.
Mike Hall Interviewer, UGtastic
Yeah.
Russ Olsen ruby and rails practice
They write terse type functional code and it's.
Mike Hall Interviewer, UGtastic
Right.
Russ Olsen ruby and rails practice
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, I almost think of like C# and BB and Ruby and Java as being kind of plain spoken languages. 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, you know, 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.
Mike Hall Interviewer, UGtastic
Yeah.
Russ Olsen ruby and rails practice
And I know what you're talking about with Clojure because I went through that. I picked up Clojure and put it down like three times.
Mike Hall Interviewer, UGtastic
Right.
Russ Olsen ruby and rails practice
So I sort of went through. I 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 when I, 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.
Mike Hall Interviewer, UGtastic
Yeah.
Russ Olsen ruby and rails practice
So, so I'm reflecting in a real. Moment for you, that's yeah. And you're right. It is a process. It's a real process of, uh, you know, initially you have to go through 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, there are no stupid. People programming.
Mike Hall Interviewer, UGtastic
Yeah.
Russ Olsen ruby and rails practice
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, well, like there are no stupid programming languages that you've heard of that way, you know, you really have to respect them and, you know, learning the program the way they're meant to be programmed, get them to be eloquent phase.
Mike Hall Interviewer, UGtastic
Right.
Russ Olsen ruby and rails practice
And, you know, just to, to pivot and look, you know, you, you haven't written a book art.
Mike Hall Interviewer, UGtastic
Are you still actively in the authoring world?
Russ Olsen ruby and rails practice
I, um, so I've actually written two books. Oh, okay. Because I haven't seen Ruby before. Um, I am always writing. I, 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. I'm like, wonderful.
Mike Hall Interviewer, UGtastic
Right. Okay.
Russ Olsen ruby and rails practice
And I'd be happy to do that by the way, for this. Um, and so, yes, I'm always, I 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, uh, uh, we, as programmers, as technical people, we have so much to explain to each other.
Mike Hall Interviewer, UGtastic
Right.
Russ Olsen ruby and rails practice
Our, the, the things we work with are really complicated. 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.
Mike Hall Interviewer, UGtastic
Right.
Russ Olsen ruby and rails practice
And by and large, we are not. So, so by writing, you help with learning how to explain or thinking about explaining. So, so I have this book project, which is about how to explain things.
Mike Hall Interviewer, UGtastic
Okay. Okay.
Russ Olsen ruby and rails practice
Because I think, I think we may. I, again, it's like the, the, the new programmer coming to a different language. There's a series of mistakes that people make when they try and explain things.
Mike Hall Interviewer, UGtastic
Right.
Russ Olsen ruby and rails practice
And, um, 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.
Mike Hall Interviewer, UGtastic
Right.
Russ Olsen ruby and rails practice
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 with that.
Mike Hall Interviewer, UGtastic
Yeah.
Russ Olsen ruby and rails practice
And yeah, I've, I've experienced exactly what you're describing. Uh, trying to do something that might be simple to somebody in Rails. I wanted to do this kind of, uh, obscure, uh, descending, uh, parameters through a has been a relationship 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 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 got these four objects and I got to know how, okay, that the user was okay. And then the user went into the operation and then the operation had, you know, inventory and the inventory had money. It's like, okay, like, so like even the cognitive overhead from just the domain that they chose to, to describe the problem is already complex enough, much less the thing that they were trying to describe. 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, there is basically one class. There's 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 Elephant Ruby, but at least you didn't have to re-learn, you know, the example. And then if you are trying to refer back to understand, okay, they changed something in this second chapter. Well, it's now a totally different thing.
Mike Hall Interviewer, UGtastic
Right. And how does it relate?
Russ Olsen ruby and rails practice
Yeah, yeah, yeah. And then you can weigh them against each other and say, oh, okay, the obvious differences shine.
Mike Hall Interviewer, UGtastic
Yeah.
Russ Olsen ruby and rails practice
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 said, hey, you're a technical person. It's not, you know, the world of accounting or the whole world or anything, something for us. Here's how you explain, or here's some, 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.
Mike Hall Interviewer, UGtastic
Now, are you publishing this through a publishing house or are you?
Russ Olsen ruby and rails practice
I haven't really, I haven't really decided. 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 self-publishing that might be? I think they're still catching up. I really think they're still catching up. I think they are kind of old school businesses and they're still trying to catch up.
Mike Hall Interviewer, UGtastic
Okay.
Russ Olsen ruby and rails practice
So like all of us trying to figure out.
Mike Hall Interviewer, UGtastic
Right. Right. How do I make this work?
Russ Olsen ruby and rails practice
They're in interesting times as well. Yes. Yes, they're in. I think there are more interesting times than we are. Well, thank you very much. Hey, thank you. Thank you.
Mike Hall Interviewer, UGtastic
Sure.
Russ Olsen ruby and rails practice
[Music]