 A couple of weeks have been insane for me. Um, anyone who's heard of Basecamp? No. So this last week ago, I was in Chicago. We were launching the new version of the new Basecamp. And we were all heads down. We were going crazy. The entire company. There are over 30 people now. 37 segments. We were over 30 people. All in Chicago. Heads down. Working together was fantastic. I love it. Um, but you can bet that we weren't building any new features. We were working on the little things. And these little things are the things that matter. And that's what I want to talk about today. So first of all, you've probably all been in this situation where a friend or a co-worker or a random person on the street approaches you and says, So what's the big deal about Ruby? Why is Ruby so big? What's the height? What's going on? And so you come back with the pat answers, right? You might mention, well, Ruby's got blocks. You've mumbled something about iteration and enumeration and closures and anomalous functions. And you'll maybe spell something about everything's an object in Ruby, right? Pure object oriented. Even the numbers are objects. And it's just so fantastic. You talk about mix-ins, right? It's like multiple inheritance is looking more powerful because it's actually our probably multi-inheritances. And you can do so many cool things. And then you mentioned garbage collection. And you mentioned exception handling. And you mentioned that it's dynamic. And you aren't quite sure what to say about that. So you say, well, it's interpreted. And your friend is at this point just saying, Yeah, show me a language that doesn't have in these days, right? Everyone's doing it. Exception handling is really common. Dynamic is a buzzword that's everywhere. Interpreted, blah, blah, blah. And he'll say, well, you know, you want objects. A little small talk has objects. Small talk has blocks. Scala has traits, which are like the mix-ins. You're not telling me anything new. Tell me, really, what is the deal with Ruby? Like, why are you so passionate about it? And I hope we're all passionate about it, right? What is it that makes us stay at potentially inconvenient hotels and to travel potentially inconvenient distances and to sit in potentially, potentially uncomfortable chairs for a long time? I mean, at least these chairs are padded. They have that. But seriously, are we nuts? Yeah? Yeah? Who said that? Yeah. Yeah. Nuts. We're nuts. I mean, that's what it is. But what is it that makes us so passionate? What's the key here? What's the point? Now, the problem is when we were talking to our friend or the random stranger or whoever it was, we were talking about the banner features, right? This is Ruby. The problem with the banner features is that they aren't what make us passionate about language. They aren't what make us passionate about anything. These are the features that are designed for headlines, right? They capture someone's interest. They pique someone's curiosity. They're enough to get someone in. But they aren't what actually does the work. I mean, what is it that makes Ruby unique? What is it that makes Ruby stand out? If every other language is doing the same sorts of things feature for feature, why is Ruby so incredible? Why do we care enough to come here? It's the little things, right? Blocks aren't what make us stay with Ruby. Garbage collection isn't the big deal. Once we're in, it's the things that we can do with blocks, right? It's the way blocks streamline our workflow. It's the way garbage collection removes all the little mini-preview of memory management. It's the little things that really matter. The pixie dust, right? Of language design. How many of you have seen Peter Pan in One Incarnation or another? I imagine most people have, right? If you have kids, you price them at multiple times. But pixie dust is some amazing stuff. You sprinkle it on, you have a happy thought, and that's all it takes, suddenly you're flying. That's what these little things are in Ruby or whatever else we're doing. It's a little thing that you sprinkle in and the customer, your user, you bring a happy thought to the table and suddenly they're flying. And once you're flying, you're hooked. Flight is awesome. And if you can do it without an airplane, that is even more awesome. You want that pixie dust. You want that experience of flight because that's what hooks on them. That's what hooks people. It gets them to stay. Now, I am not an expert on the psychology of the Ruby community at large. I don't know feature for feature what people prefer and how they use things, but I'm an expert on me. I know how I use Ruby. I know what hooks me and what keeps me engaged in Ruby. So I'd like to talk to you about a few of the things in Ruby that have hooked and engaged me that have kept me fascinated by Ruby for 10 years now. And while I'm doing this, I would like you to be thinking in your own minds about the little things of Ruby that have captured your imagination, that you use the heck out of every day and probably take for granted. Don't even realize. Think about those things. One of the things I want to mention is this. I love the heck out of this thing. I may not use it every day, but when I use it, I would love it. How many of you have ever used this data end construct? A few. Awesome. I mean, you can throw a configuration at the bottom of a simple script. You can throw a test fixture at the bottom of a simple application. You can do all kinds of really awesome stuff with that. I love that. That's such a little thing, but it captures my imagination. Another one. Who's ever done this? Yeah. This is used all over in Rails, for instance. This is all the time. This is actually a few different patterns all wrapped up into one slide. You've got the lazy initialization with the or equals, and you've got the begin and treating it as a single expression. I love that. Ruby is so amazing. Everything's an expression, including begin and end. So you can use this to basically initialize or memorize a function. I meant that. Awesome. Love it. Post fix modifiers. Obviously, I didn't list. I used the heck out of rescue. I didn't even mention that one here. But if until, those are awesome. I love how they think. Something that would otherwise be complex and multi-aligned and require more mental processes to scan. It takes it. It condenses it into one line. Obviously, you can use this. But don't, right? Just use it wisely. Another thing. The implicit begin. I have to begin with that. Can you imagine how frustrating it would be if you wanted to use exception handling in Ruby? If you had to explicitly declare begin and end inside of a deaf end, you'd have done what that would be. But it's not that way. You know, mods. Mods, I'm sure, was the one who, as a replacement, was one of those cohorts. Do it. Right? So simple. So little. But it makes such a difference the way you use Ruby Day today. Implicit return is another huge one. Some of you know, this is kind of stylistic. Some people prefer to put an explicit return at the bottom of a method. I kind of go back and forth. But for a simple, you know, attribute kind of method, this is incredibly useful. I love it. And I have to admit, I came from a C background. I love the nitty-gritty stuff. The turnery operator has had my heart for almost two decades. And I'm so happy. So happy to find that it was in Ruby, because I loved everything else about Ruby. And I had the turnery operator. I was so happy. I love it. And that doesn't have anything to do with Ruby. Optional parentheses, right? Optional parentheses are awesome. Yes. Yes. It lets you do beautiful DSLs in Ruby. I mean, Lisp doesn't have optional parentheses. I love this. I'm just kidding about that. But, you know, with Ruby, you can take away a lot of the liners just by removing parentheses. I love it. Such a little thing, but it makes such a difference. And if you were to tell that friend of yours why you're passionate about Ruby, and you said, because you're doing the parentheses out, you know, most people would be like, okay, yeah, that's cool. This is another awesome one. Parallel assignment. C didn't have this. It ain't not in any meaningful sense. If you wanted to do swap two variables in C, how many of you does that in C? How many of you have written a function in C specifically to swap two variables? No, right? Yeah. And Ruby, it's a little higher. It's a no-brainer. I love that. Such a nice touch. And again, if you were to tell someone, I love Ruby because it has parallel assignment, I can swap a variable in one line. You know, it's a little thing that you don't appreciate until you've used it. It's not a headline. This, this is one of my favorite patterns in Ruby. Using modules to extend objects. This is an especially powerful pattern of exceptions. You've got an exception that's raised within some kind of context, and you want to capture that context. So when the exception is rescued, you can do something meaningful with it. Well, you just extend the exception, add your context, and re-raise it. I mean, it's beautiful. I love that. Last one, I love this. I use this every day. No exaggeration. Especially in Rails, where you might get a list of records back from the database and you want to build an ID to record mapping and memory. This is your friend, right? The inject is such a powerful pattern. And just being able to, you know, feed it a hash and build a hash that way. Wonderful. And then, truthiness. I love truthiness, okay? This threw me when I came from C, right? Because zero is false in C. And it's true in Ruby, right? Very confusing. But once you understand the rules, it's beautiful. Because you can do stuff like this. Some people get up in arms because they say, if you have a Boolean predicate, should return a Boolean. I don't have a little loose around that. I say, if you have a Boolean predicate, it's okay if it returns truth. Or what's the answer? Truth. False. Okay. Lies. Okay, good. True lies. I like that. If you return null or null or string, potentially, which evaluates to true or false? That's what I was looking for, thank you. I really like truth and lies. That's pretty good. Last one here, pure docs are awesome. I love... Well, yeah, I mean, it's not original Ruby. None of these are really original Ruby, right? But Ruby has them. I love that you can chain your docs, you know? It's not the most aesthetically appealing thing, but I just love that you can take this huge chunk of text and throw it in right there in line. Wonderful. So, how about you? What have you guys done? What are the little things you appreciate every day? Let's take a few. Yes. I got to repeat it. Optional parentheses. Optional parentheses. Preach it, brother. Sorry, yes? Think about it. A little simpler than your or equals begin, which I thought I'm going to start using. I'm going to be a fan of x equals if condition. Oh, yes. Yes, I have done that. Where you treat the if as an expression. I've done that with case statements. It's great. Yes. Auto loading. I'm sorry, what? Auto loading. Yes. That's great. Yes, exactly. It's beautiful, isn't it? Brilliant, brilliant execution on that. Oh, yes. On here docs. Sorry. On here docs, you can actually put a comma after that and add more arguments. Okay? You can add as many as you want. Even more here docs. You can even do like SQL docs along. Yes. So you can do like SQL.squish. You want to remove all the extra spaces. You can do that. That initial little introduction to the here doc can be treated as if it were the entire string. You cannot achieve some and remove the front spaces. Yes, exactly. You can call any method on it. Because it's a string. That's what it is. We'll do one more because hands are going up all over now. I love that. Okay, let's go where I look at. Splat. That was actually on my list of things to do originally. It didn't make a cut because I couldn't think of a good illustration for it. But splat is awesome. I love that. I'm so excited that you guys are passionate about this too. I love these little things, right? That make us passionate about Ruby. So, what's the takeaway? What can we learn from this? That the fact that we have Ruby. Someone's been persistent. So, I just want to point this out. Not as a coffee script is just like Ruby and also cool. But as a coffee script really is a lot nicer to use than JavaScript. Because every single one of these things that we've said that I say, I love that about Ruby. Coffee script has an equivalent thing. And it's so cool about coffee script. Not because coffee script is as cool as Ruby. But because it's so much better than JavaScript. I'll repeat it for the sake of the camera. But basically, coffee script has all of this too. And coffee script is awesome. And I totally agree with that. And I would agree so far as to say that coffee script is as awesome as Ruby. It is amazing. And it's so much better than JavaScript. Yes. Okay, so what's the takeaway? What can we walk away from in this? What's the lesson we can learn by looking to Ruby as the example? I mean, all of us are doing something with Ruby. Even if it's just tinkering on the side. But how many of us are actually using Ruby professionally? So many of us are using Ruby professionally, which means we are writing stuff in Ruby that others are going to use, either the Ruby product itself or some derivative thereof. So what is it about Ruby that we love in that context? It's not that we're out there writing Ruby code for the sake of writing Ruby code. I mean, sometimes we'll sit down in a little script just for the therapeutic value of it. But usually you're out there writing Ruby code because it's a tool that gets out of your way and does what you need it to. When I am in the mode of writing Ruby code, I'm not thinking about Ruby code. I'm not thinking of syntax and the interpreter and these features. It's fluent, right? It's just flowing. And the language is out of the way. With our own projects, what do we have anyway? Let's go further. What lessons can we learn from Ruby? Ruby does a lot of things well, but it does two things really well, right? First, it keeps curiosity really well. People are curious about Ruby. Secondly, it inspires worship. At the very least, it inspires loyalty, right? But I have a way. People are passionate about it. They're either curious or passionate. They're either poorer or against. Either people haven't heard about Ruby or they love or hate it. It's really where it is. I haven't talked to very many people who are down-viculous about Ruby. So what does that tell us about our own projects? Well, one of the things that Ruby has is a skeleton, right? It's those features that we told our friend at the beginning. It's all these blocks and all these things. It's got a very solid skeleton that makes a good headline, right? It's the frame that everything else hangs off of. The language falls apart. Obviously, you need something strong like that. The headline sells papers, right? That's what you hear. Headlines sell newspapers. But without something journalistic underneath, the headlines are only going to sell one paper per person at most. So you need something more. This isn't enough. The other half of the story is the polish, right? You need to put the flesh on the bones. You need to polish that until it gleams. It's those little details. This is the little stuff. This is the lesson I think gets ignored more and more often. I am in the presence of brilliant people right now. I have no doubt about that. And I have no doubt that many of you have already thought long and hard about the same topic. And have probably come up with better solutions than I have. But it bears repeating. This is important stuff. The little stuff is what makes the difference. But you can't build only on the little stuff. You need both, right? How many have you ever used an application that was all lean and no skeleton? A few. Like I have. It's one of those where you're like, yeah, this is slick. This is pretty. Next. It doesn't do anything. But the same thing. Like you can have an app that is all skeleton and no polish. Get. Right? This is what you don't want to build. You can look at this in either of two ways. It's all skeleton and no polish. It's all big features. This octopus arms and a robot dinosaur with satellite dish. Those are the banner features. Or you can look at it as having too much polish. Someone wanted to pack this thing with all kinds of cool things but didn't really have a purpose. This is the kind of monster you would fight once because after the first time you're like, you know, it doesn't do anything for me. In the end, we each of us need to go back to our problem domain and build the ruby of that domain. We need to build the tools that will get out of our customer's way that will inspire loyalty in them. The peak of curiosity of people from outside. Those are the lessons I think we can learn from a ruby that we can take wherever we are, whatever we're working on. So wherever you are, whatever you're doing, try to build the ruby of your domain. Thank you very much. Thank you very much. There is question-wise, five minutes of the day. I don't know how much anyone has questions for this, but if anyone has a question, it's all right. You're already the one. My hands. I have a bamboo pad and a pen and I have a spider artist. No, the bamboo pad that you draw directly, I have pixel natives, the application I use, because I can't afford Photoshop. Yes, sir? I find it awkward to do some work. Yes? Tools in that ecosystem that is equally enjoyable. The question is, well, first, confirm that I do woodworking. So I actually do wood carving, and I haven't actually done it in a while. Kids tend to suck up a lot of free time out. But the question was, do I have any tools from that domain that would be the ruby of woodworking? And honestly, every tool that I've used in wood carving is like that, because every tool is designed to extend your hand. So you're in there carving and you're not thinking about how you're holding the chisel unless you're just starting, in which case that's all you're thinking about. But you're thinking about the wood and what's inside the wood and how much you want to come out of the wood and so that chisel or the knife or whatever it is you're using, ruby is out of the way not intrusive. Any tool that doesn't do that quickly gets discarded for one that doesn't have it. Is it? Have you ever fought with ruby or has it always just been smooth sailing and bless? Have I ever fought with ruby or is it ever smooth? Is it always just smooth sailing and bless? Ah, ah, ah. I fight with ruby on a daily basis. Ruby is not perfect. I mean I think every single one of us can name numerous pet warts of ruby that drive us insane. The important thing is not that ruby is perfect but that ruby has enough to compensate for those warts that we're able to forgive it. The other thing is there was a time where I used to go language shopping and every few months I would choose some new language and do amazing or something. I quickly learned that there is no silver bullet, right? Every language is going to have different warts and so you're just kind of trading one thing for another. Yeah, I totally fight with ruby all the time. I think all of us do.