 Settling down. All right. This this presentation is titled there's nothing new under the Sun It is the first In a track a three-part track that you're experiencing called the future of Ruby. So let's hear a little bit about Ruby's future in the future Ruby will become more popular There will be more implementations and there will be more programmers using it more machines with it installed by default and And more people writing blogs about it. There will also be more people reading blogs about it I know this is getting crazy, but you have to trust me because I'm keynoting So that was 2008 Ruby hoedown Chris monster the CEO of github telling us a little bit about what the future would be like This presentation is the future of Ruby part one the past And at the heart of all of my talks that I present to Ruby conferences I'm asking the question. Why do we choose Ruby? I feel like we need to constantly you know Re-evaluate this and justify it and come up with good answers and to be honest that answer has evolved over time like for example If it was before 1998 odds are you knew Japanese if you picked up Ruby in 98 you were literally Dave Thomas Not that Dave Thomas mind you for the younger people know the one that wrote the pragmatic programmer with Andy Hunt If you came in before 2005, you're probably really into extreme programming like test-driven development In 2005 it was all about rails as was 2008 and 2012 and If you're learning Ruby today for the first time it's probably because that your manager was a big fan of rails back in their day But that oversimplifies things a little bit so I'll share some of my perspective I came to Ruby first in 2005 I was working through Kent Beck's extreme programming book learning test-driven development and loving it I was writing a lot of Java or I should say I was writing a lot of XML and curly braces and not getting a lot done I was also writing a lot of PHP and slinging thousands of lines of code that I had no hope of maintaining And I studied in Japan that year and I genuinely like my Japanese friends were really excited about the worldwide notoriety that this Little programming language called Ruby was gaining But if I asked the same thing about somebody in 2017 like why do they choose Ruby nowadays? I mean PHP has a perfectly suitable web framework Java does as well Microsoft with that net has embraced open source all of a sudden and even like the Mac To most people if you want to teach them how to program They're being handed node and react by default as opposed to rails these days Elixir and LM kind of have a lot of the mojo the new hotness if you want to do functional You can do back end in front and closure PLT nerds love rust and some people use go So this talk is really a retrospective I want to talk about the things that drew people to Ruby originally because if we rediscover that It'll help orient us about where we want to take Ruby from here But honestly that sounded like a lot of work. There's over 2,100 Ruby talks on conflicts alone And soon this is gonna be one of them And I frankly I just needed some help so as an employer I pulled a mystery science theater 3,000 move and locked one of my colleagues in a room for three months to do nothing but watch Ruby talks His name is Josh Greenwood and he came to Ruby a little later in like 2012 and at that point rails was the default Web framework choice in the industry in a lot of ways We'd reached a point of maturity with Sandy's like object-oriented design book getting a lot of steam and attention That was also right after rail ship the asset pipeline which solved the problem of JavaScript packaging once and for all and It was also the height of the great coupon wars where everyone I knew who practiced Ruby worked at either Groupon or a living social if they didn't already work at GitHub So I'd like to welcome Josh up to the stage Thank you so much for having me So let me tell you a little bit about my very naive plan So I thought maybe I'd just go back and watch Ruby comp videos from the first couple years Ruby comp What Justin failed to tell me is they didn't actually start recording those until 2007 So that was a bummer so I thought well, maybe I'll go check out some early versions of Ruby and see if I can get There's to compile That did not go well for me at all So I thought I was getting frustrated. I thought well, where's the internet store of its most valuable knowledge? Well Twitter of course So I thought maybe I'll go see what DHH was talking about when he first announced rails Yeah, so you might be thinking yourself like Josh rails or Twitter was not around back then and you would be totally right So I was clearly missing some of the context of the things that came before me and I suspect some of the room might be as well So today my goal is to share some of the blog posts the talks the exercises and the conversations We had with folks in the Ruby community try to unearth some of what drew people to Ruby in the first place because our goal really is to Reflect on these various facets of what made us all fall in love with Ruby and its community And to make it just the awesome language ecosystem that it is so that we can think hard about what we want to do to take it forward But as a result this talk is not an entree We're not gonna be up here with some big rhetoric trying to convince you of something rather These are mere appetizers showing you some of you know, Josh and my favorite talks and blog posts and ideas from the past Hoping to get you to engage with those two And so please don't fret over all of the individual URLs and stuff and I'm trying to take a picture of the screen or something We're gonna post to our blog right after the talk Sources of every single thing that we reference. So just keep an eye out of that for that later today All right without any further ado, let's sit back and Josh show me what you got So let's start at RubyConf Orlando in 2008 Matt's speaking Why we choose Ruby and Everyone has your own independent reasons for choosing Ruby, but for me it's very simple It is it my beloved last piece, you know Why we choose Ruby? Just because Ruby on Rails Could you raise your hand if you stay if you if you're going to stay in Ruby on Rails and it's not not interesting in Ruby itself No, yeah. Yes. This is Ruby conference You know love is a great the power behind Ruby and and it is the very reason behind Ruby, I think I believe I love people using Ruby and I love people who love Ruby and I love you all So Matt said that this acronym embarrasses him But Minneswan, you know Matt's is nice and so we are nice was so important to the Ruby community as it became today that He set the tone as the language designer You don't see very many language designers give keynotes like that, right? But that kind and welcoming spirit is one of my favorite things about Ruby. Let's jump to Scotland Ruby company 2011 our friend Chad Fowler speaking here Who here is in the service industry? Actually, you're all in the service industry So everyone who didn't raise your hand you're wrong everyone who was sitting next to them give them a funny look Our jobs are to be like an adventure tour guide for our customers to take them into these scary places Allow them to feel the thrill of you know, whatever it happens to be that we're doing not to treat them like idiots and make them You know stay in like a rubberized Room so they can't mess anything up, but to allow them to get as close as they want to the edge and make it safe for them to do that The other thing that everyone else is mentioning in this conference is Corey Haynes Here's a tweet that Corey did recently Contemplating what practices could constitute a list of required practices of modern software development So you're probably all thinking like unit testing, right and source control Etc etc etc Justin Gaitland says giving a shit actually really giving a shit knowing the first thing about coding and then giving a shit And I thought that is pretty deep He said Alexis dealership was his best experience which was not all that helpful so I said in what way and He said this the feeling that they do 10 minutes of work to save you one minute of your time and then I think the most important Piece of this caring like crazy Goal that I have in my new job and therefore in my new life here is To kill Senate cynicism wherever I can But rather than be cynical about that stuff. Why don't you just fix it? cynicism is laziness Speaking of Dave in the pragmatic programmer Dave and Andy have you know one of their little snippets I think they call up tips that says always answer every email that you get Which kind of sounds stupid like is that really a bullet and one of the you know Major headings and the pragmatic programmer the classic the computer programming classic and it is and the funny thing is that might be the Only one I can remember having read it 10 years ago I remember thinking it was weird though when I first read it But it's such great advice and when you're someone like Dave He didn't answer my email, you know In fact, I think that's why I emailed it because I knew he was going to answer it So we emailed Dave Thomas We asked you know, what was the early Ruby community like in the West he said well There was a mailing list it was mostly in Japanese But English speakers were encouraged to post to and folks would reply often We found ourselves communicating purely through code Someone would post a broken test and one of the maintainers would either correct the test or correct Ruby I started by asking Matt's permission to write the book He was enthusiastic and helped an incredible amount answering hundreds of questions and occasionally changing the language or libraries as I found Edge cases that book by the way is the pickaxe book and if you haven't seen it This was an indispensable API reference and guide for anyone using Ruby through the mid-auts The book was published at the end of 99 and led to the first international Ruby conference the following year in Florida There were 30 to 40 people there including folks from Japan and Europe So the moral of the story is that if you ever need help just email Dave Thomas and he'll reply to you Let's jump to 2007 Ryan Bates and just started producing railscasts. He's basically got me through my first job Well, this is where a rails 2.0 comes in really handy because you get this new rake task called DB create And this will create the database for the current environment Whoa So a lot of fancy new additions to migrations and rails to which will really save us a lot of time Also this TDOT timestamps here What this will do is add a created at and updated at columns to this table because rails assumes you pretty much always want that That's a lie I wish that rails would just do timestamps by default and I had to say like opt out of timestamps because I always forget it for the first month But you know what like a Lot of people over the years have complained to various degree that like like rails is too magic But you know if you were really in the Ruby community in the rails community No, like you just didn't watch enough railscasts that explained most of everything and That complaint is valid in that. Yeah, there was a ton of tribal knowledge Ruby's dynamic It was maybe under documented things were definitely moving really really fast But there was an unintended side effect of all that tribal knowledge Which that it forced us to create tribes and I don't think that we really appreciate the fact that Ruby has more local meet-ups and regional Conferences than any other language at size and it's because like the way that the language works and how all of our libraries are Constructed require us to talk to each other and I think that's really special in fact when I look back there's something about Ruby and The language and the tools in the community that's just like really really kind and welcoming and it's something it's one facet I really appreciate 2004 a blog post called tour de babel was written by Steve Yege and here's what he had to say about Ruby Ruby took Pearl string processing and Unix integration as is meaning the syntax is identical And so right there before anything else happens You already have the best of Pearl and that's a great start especially if you don't take the rest of Pearl But then Matt's took the best of list processing from list the best of oh from small talk and other languages and the best of iterators from CLU and pretty much the best of everything from everyone and he somehow made it all work together so well You don't even notice that it has all that stuff. I Learned Ruby faster than any language out of 30 or 40 total took me about three days before I was more comfortable using Ruby than I was in Pearl after eight years of Pearl hacking And one of the things I've always loved about Ruby is that it has all of these features But constrains the developer with almost no rules as to how to use them So it is dangerous but it also trusts the developer to express themselves and very few other languages even the other hip and trendy languages of our Day check both of these boxes. I think Ruby still stands out Next is Mountain West Ruby in 2008 Giles bokeh is speaking here and that's Zed Shah flipping off Giles But one of the things that Ruby is famous for is metaprogramming right which is programming Programming itself, but the thing is that's not usually what we really do when we're doing metaprogramming this magic, right? Because it's not metaprogramming. It's just programming what we're really doing is meta. Oh, oh What it does is if you add a method to an object it says I'm in yourself adding your name Okay, I mean your oatmeal adding your cranberries That's kind of eccentric Giles this kind of eccentric. I just took those, you know, I'm in your x adding your y I'm creating a new whatever I took that and I just changed it to return Ruby code Right, so now instead of printing random text to the screen like a log file What it's doing is it's creating code now There's no reason that you couldn't put executable code in a log file But when you run it you end up with Python that Populates a graph drawing program for node boxer and this is what that graph looks like and obviously it is not stunning Right, it is not gorgeous. It is a simple object graph Read this book and I've only ever heard one other person or read one other person say that the other person who said that is David Hannah Hansen Now the way this book starts is it starts with an ejb application, right? It was 2003 You've got a legacy app With a hundred and fifty tables you're using ejb So you need seven files for every table that you want to grok with your app So that comes out seven two seven times hundred and fifty that comes out to 1,050 Java files right by hand that takes a very long time to create with generators. He created it very very swiftly Everybody who talks about rails as they're like magic makes programmers more productive Bullshit code generation makes programmers more productive. Oh We email Chad Fowler to and he's right there and he also replied to our email One of the kind of things that kept coming up is code generation He had this to say and then I started doing stuff like building DSLs to generate code in his case Java So I could write code in Ruby and no one would have to know that it was Ruby It's true. Everyone was doing code generation in Ruby back then and in the back of my mind I'm just imagining how funny it is that before rails one of the core use cases for Ruby was to generate other Programming language code so that people didn't have to know you were writing Ruby And so we've come a long way Next up is code mesh in 2012 a talk given by Gary Burnt Hart the guy who sells screencast at destroyallsoftware.com And this is what his website looked like after he learned CSS This has got to be one of the best lightning talks ever given at least that I watched Let's talk about Ruby Ruby unlike some other dynamic languages does not have bare words So you cannot just type words in and have strengths come out Unless you define a particular method missing that does the right thing and then if you type bare words suddenly Ruby sports bare words and in fact it will even sport bare words with bangs in them And this doesn't is not deserving of Watt. This is actually a result of how awesome Ruby is But if you ever actually do this then Watt So looking back clearly Ruby isn't a tremendously powerful language And it's one of the hallmark facets of doing things just because you can even though there's sharp edges Not being afraid is is really great Later in that email from Dave Thomas. He explained what it was like to get started with Ruby in 1998 he said I first came across Ruby in 1998 You'd ftp a set of unencoded files concatenate them and then you you decode that typically into a tar file You'd then run this through tar X and start working on compiling Ruby had an auto comp file which helped immensely and it would work out what libraries you were missing You then entered the recursive hell of installing those recursive because those libraries would each have their own Dependencies which you need to install et cetera et cetera To Matt's credit Ruby was a fairly simple install. I spent the rest of the day playing with it I think it was Ruby 1.2 a Fairly simple install. I want you to keep this in mind next time you want to complain about RBM RVM homebrew or any of our fantastically convenient developer tools that we use today He continued I fell in love with the language I feel like it's something I've been waiting for waiting for a long time at the time I was writing mostly C Java Pearl and Ruby seemed to blow all them away. It was easy to use classes I had great default metaprogramming whatever I threw at it. It's shown So apparently before 2005 it took longer than 15 minutes to build a blog. I had no idea Sounds awful. This is what Chad Fowler had to say about that time period He said I remember more clearly is the distinct difference between the rails world and the Ruby world Because when rails came out David Hannah Meyer Hansen spoke at Ruby comp 2004 64 people in channel eVirginia and a holiday in select. That was a big one for us He kept talking about action pack and all these things. I thought wow. These are really dumb sounding names It was just hyping the hell out of rails before I came out I thought well, this is sort of silly because it's an NBC framework in a language. No one cared about So here's that famous DHH rails demo What we do is called the rails command to generate the skeleton of the application. So you saw it generated a bunch of things a bunch of files and then the next step the very next step is starting the Ruby server So seeing that everything works. The only proof is it to this is that you have Ruby and rails installed Whoops it worked Just gonna say hello world gonna reload and hello world That's how much work you have to do to get to hello world. That's not a lot Look at all the things. I'm not doing look at all the configuration I'm not writing all these things are mapped together just automatically just by saying blog up here Maps directly to the blogging controller and just by having index mapped directly to the index template Hello from the template and now we even remove the action and saw that it could go all the way to the template without having an action all right scaffolding is a way of easily putting a model object online in a way that you can edit it Whoops, we didn't create this. This was created for us just by this scaffolding thing And the view is just mixing code and HTML which seems like an old-fashioned way of doing things but Kind of looks like JSX So whoops became its own Ruby meme Around that time is the sort of Steve Jobs marketing tactics the DHH Of course the memes have been forgotten because Twitter hadn't been invented yet But Chad also said this about his perspective of David at the time and I love this He's young and he's thrilled about this and he loves Ruby and I see it He's found Ruby and he's gonna change the world with it And I'm not somebody who talks about changing the world very much However, if you go and read the YouTube comments on that particular demo, which I did a Relatively recent comment at the very beginning I don't feel any surprise because these are the common features for every single framework in almost every language today But when I saw the data published. Oh my god, this video was published 11 years ago So I think crystallizes the entire impact that like Ruby did change the world with David and Rails because now the entire web works like this It's pretty amazing But the Ruby world changed too one of the things that David told us was prior to Rails people who used Ruby were there because they liked the language and the people the pace of innovation was gentle as folks explored opportunities After Rails the mood changed now Ruby was there to solve a well-defined and urgent need writing web apps And so the Dave's teamed up and wrote agile web development with Rails through three Editions and three major versions of Rails and everywhere that I traveled every software team that was doing Ruby had a bunch of these piled up They were like an valuable handbook So apparently Ruby come for why you was a thing and I feel like we've regressed a little bit It was a fantastic they're given by Ben Ornstein about refactoring I Don't want you to think of this as a lecture This isn't me standing here and telling you all these things that are absolute truth think of this as pairing I'm now pair programming with all of you The first thing to notice is we've gone from one method with two lines to two methods with one line each Now I'm not going to tell you that that's always an improvement, but it usually is I'm starting to think these days that methods longer than a line or a code smell When the code looks like this for whatever reason because we're programmers because we read code when we see code like this We read it So the first thing your eye does when you see okay orders and range equals, okay? Let me figure out what this is they figure out what this is doing When it looks like this when it's its own method my eye is more likely to see orders within range Okay, that's just private method. I'm just gonna assume that selects all the orders that are within the date range What to do next? Most intermediate object-oriented programmers are too reluctant to extract classes The first rule of classes is that they should be very small the second rule of classes is that they should be even smaller than that In most companies pair programming is a euphemism for co-located troubleshooting But something about the extreme programming roots of the Ruby community in the West means that like most Ruby companies That that that I visit that I work with they actually pair program to learn and solve problems And so like don't think that Ben Ornstein like read all of that advice in a book No He like worked day in day out pair program with other people and sharpening their craft and that was really something special Something I really admire about the Ruby world Let's jump to 2007 and the release of heroku One of the founders of heroku James Lynn Bum said in an interview We disagree that those new to Ruby and Rails should have to go learn all the hard stuff It is the frameworks in the platforms that need to shape up and make themselves easier and more accessible I'll never forget the first time my buddy Mark sat me down to deploy my first Rails app onto heroku I ran get push heroku and then things happened And I didn't have to configure anything and it just worked and it blew my mind and Nowadays this sort of thing is normal, but in 2007 or whatever that was really really mind-blowing. It was really rare and Heroku was a product along a lot of other products that were built on top of rails that like just Dispensed with this assumption that like friction was okay And that pain was just a natural part of the development process like they were very allergic to any sort of extra friction That was being added to developers workflow and we all benefited from it So when you look back, you know, especially with rails, but like at some point Ruby became a massively productive language as well And I think that high productivity is still a hallmark of lots of Ruby teams Next up is Ruby comp San Francisco in 2009 where Ryan Davis and Aaron Patterson showed us that Co-presenting is a really really bad idea The first thing we needed to be able to do was figure out how to identify that idea came up with this field First and foremost, it needs to be well engineered and tested. It needs to be useless ish It needs to follow pose law and it needs to have a spiraling agent or what we call Whoops Ruby we all know and love is slow And she's not but why would you write me see when you can write in assembly? example of some inline C for a method called C that counts from zero to n plus one and Returns the result. Now. This needs to be as fast as possible because there are a lot of web pages that have to do this type of counting We can see that this assembly code does the exact same thing. Oh, I knew that obvious So really what we need to compare is the benchmarks and as you can see here Look at that. Wow. They're almost exactly the same time. I'm blown away. So Pooby Is a PHP runtime embedded in Ruby? Written a couple web adapters one for web brick because of course of course this PHP runtime isn't useful unless we can run say Wordpress Right. I'm starting up frack here down at the bottom case. You can't read that starts up web brick on port L. O. L. O. L So we access that create our little configuration file and whoops we have a friggin blog The correct pronunciation here is pooby on fails All right. All right So we're gonna start up. This is a normal normal rails project So we're gonna generate. Oh in rails everything's plural. So we generate the php's controller to control it, right? I suppose I could have named that codes, but I don't know if you can consider it codes So we opened up index PHP So do the php info. I Just learned that the other day total serious So for 3000 hit hit localhost for 3000 the php's controller and We're running that There's a lesson What Ryan is showing us is like speed is important. Yes, but it's one of many factors There are trade-offs like readability and writeability and it's just the case that like Ruby makes a lot of those trade-off decisions Just like Matt was talking about this morning in a way that like suits a lot of real-world problems just find the way it is And what Aaron showed us is that just because something has no practical use doesn't mean that it was useless to build it You know, maybe it was just simply entertaining to build a php runtime in Ruby But it was probably also a good challenge and it definitely taught us all a lot a Little it taught us a little Meanwhile in Orlando in V labs now code school was creating rails for zombies So you're probably wondering what is rails for zombies? Well, the short answer is that it's an interactive tutorial to teach the basics of web application development in the browser using Ruby on rails But here's the long answer in the world of technical learning. You've got books and you've got screencasts neither which has any Interactivity, but come on. This is the Nintendo generation. Give me a damn joystick This tutorial we're gonna be building a web application somewhat like Twitter except it's going to be Twitter for zombies Look quirky, but I remember this was so cool like typing code into the browser and then you like push enter and it's like Whoa Josh, you did it. Good job and feeling like so successful from that and Especially in an industry that just takes itself way too damn seriously most of the time It is something like I really love about Educators in the Ruby community who are willing to have a little bit of fun and try to find engaging ways to teach people programming And the code school stuff in rails for zombie was a great example of that By the way, there are zombie emoji now as of like a couple weeks ago And so I had to put one in my talk and that's all that size for now for some synergy and 2004 why I was writing his guide to Ruby which was just this oh and also you can buy this on Amazon now In a physical copy, so go do that I guess This book was so it's just so interesting. He mixed Like blocks of code with all of these comics and such like a creative and fascinating way And he had amazing ways to show off different code structures So take a look at this method invocation here And so this is how why explain this he said think of it as an inner tube The method is pulling along containing its extra instructions the parentheses form the wet well rounded edges of the inner tube The commas are the feet of each argument sticking over the edge So like I never thought of that, but I will never forget that inner tube now And some people didn't like the kitschy chunky bacon thing You know they hate fun But it's almost as if why was prescient and could see that coming because of the end of the chapter the same Foxes say the only thing the world will know me for is chunky bacon, and they're all sad and dejected which is In hindsight a really sad slide But the first thing that I encountered that that that why I built was try Ruby it was an online Repel that taught you a little bit of Ruby in a 15-minute tutorial and you know Nowadays with our modern browsers and these really fantastic job script councils. It doesn't sound that amazing But at the time I would send Ruby up to a server and put it in jail it was a really really terrific little way to show people Ruby without having to install it and Another one of wise projects is still alive shoes is a gooey desktop toolkit for building cross-platform apps with Ruby and Shoes for is a release candidate I think right now and tomorrow morning Jason Clark is giving a talk about shoes and how to use it So I'd encourage you to go if you're interested And the forward to the pickaxe boat Book Matt's right this he said man is driven to create I know I really do love to create things and while I'm not good at painting or drawing or music I can write software and There's a reason that like we made Poobie on fails and no one in PHP made you know, oh they made Django Anyway, my point is the Ruby community is really creative in hindsight This was fantastic Ruby Ho down 2008 Brian Lyles was talking about testing here Ask yourself where do I start and I'm gonna say test all the fucking time first But then I'm gonna say you can start at the beginning and Bible says in the beginning and in the beginning there was what no there was pearl Today I'll talk about BDD with our spec, but I like to change things around So let's just talk about BDD or really let's just talk about testing for its normal people And the real thing that I'm trying to get out to everyone here should be testing all the fucking time On to testing and this is with good old J unit and I was and I thought I was doing real good here But there was a problem Wow Problem was I was writing bad brittle tests and then my test had no organization And I wasn't using any type of the conventions all my tests look different every single time and Really, I was just confused all over the place I have what the code should do Rather than describing what it does and whenever I realized this I actually it's like it was a moment for me It's like I reached then I Remember test all the fucking time and I can't say this enough and really this is what I want everyone to say when they hear Ruby I want you to say test all the fucking time. Yeah, I Want to leave you guys with one thought do not try to Imitate the old masters seek what they saw and this is something that I live my life by and I want to leave you with one more thing So I again I think that there's something special about the extreme programming roots in this community Combined with the massive popularity of rails where Ruby really in many ways became the first mainstream language to normalize the idea that you should test your code And and not only test-driven development and behavior-driven development But for me working on a Java team like Ruby really made testing cool We were seriously jealous like testing was this drudgery that I had to do as a Java programmer and QA people retreated like second-class citizens I think that like the testing is part of Ruby's history and it really really helped push the industry forward Jump to rails comm Chicago in 2014. Sandy Mets is talking about making small things here and they have noticed some Principles and they developed a style guide about how to organize code That's what object-oriented design is that's what the rules of object-oriented designer there is it's a style guide About how to organize code with all the obvious trade-offs all the places where you can make your own decisions in That's the squint test Here's how it works you squint your eyes And you lean back and you look the code and we're looking for changes in shape And changes in color Changes in shape mean you have nested conditionals and they are always going to be hard to reason about Changes in color mean that your code is at differing levels of abstraction Here we have this is the code. We just wrote on this is the squint test version. Don't try to read it It's code. We just wrote on the right. This is how we started on the left. You notice that the The shape is flat and the colors are starting to cluster Kibbeck who's has a wonderfully succinct way to put this he says make the change easy this might be hard and then make the easy change People ask me now when people ask me how to write object-oriented code. I tell them I give them one small piece of advice I say make smaller things So I remember back in like 2005 when a lot of my Ruby friends were arrogantly laughing at my abstract context factory spring beam stuff and all these heavyweight design patterns in Java land Because they didn't need that because like Ruby was simple and straightforward and then to watch Sandy's book take off and then in like 2014 all of these like Rails developers trying to like jam factory classes into their Rails apps was a special kind of pleasure for me, but to be honest like I think that pooter and and teaching and mainstreaming Object-oriented design to so many people was really a mark of maturity For applications built with Ruby in Rails Thanks is Ruby Midwest in 2013. Jessica her absolutely blew my mind with this talk on functional programming Functional programming is a lot about that. It's about all the things We don't have to think about so that we can think about what's right in front of us And that becomes really important as our applications get larger and more feature rich and They don't fit all in one person's head anymore You have to be able to put most of the application out of your head and zoom in on what's right in front of you In order to solve these problems effectively I hear from people who've gone from dot-net to Ruby is That Ruby developers have a lot of discipline compared to job at dot-net programmers that that we programming Ruby impose discipline on our code and We do that through idiomatic practices and just avoiding the sticky bits and and we can choose to follow the same Functional principles that Haskell imposes on its developers We can do that in our own choice Ruby development is consensual Ruby community has taught the Java community a crap load of stuff about unit testing and how useful it is Here's something the Java community can give back if you have to overwrite methods or inject credit state Or in any way get around the simple stuff that you the stuff that you would do in production code in order to test An object your objects wrong your design is poor Realize that nil is not data So the problem with nil is it has 16 different meanings it means false It means crap. I screw something up. It means not applicable in a hash It could mean he not found or it can mean the key contains nil and When it can mean 16 different things it means nothing So when I was in college The idea of functional programming was like this ivory tower like faux academic Nonsense that was really like full of mathematical notation and people puff in their chest pretending They're smart and everyone else how most of us in this room learn functional programming is because like Mads thought that these were cool Functions to throw on innumerable and like wanted to teach them to people to be useful And so like I feel like Ruby was a great gateway drug to to real blue collar functional programming and popularize it in a way that like Academia had failed It's the only talk we're gonna present today that wasn't presented at a ruby specific conference But it was given by Jim Lyric. So we'll give it a pass Okay, so what does that mean can a sense itself means it's talking about the common birth of two or more things at the same time And the production two things that tend to grow together that tend to say the same so Can a sense in software are those things that need to change Together So what is name can a sense suppose you have a definition of a method here called foo and then we call foo over here This is can a sense of name because if I decide to change the name of my method foo Obviously have to change the name of every place where foo is called Able where it's defined and the title has to be there and the address has to be there So if I were to change the order of my parameters in this list I would have to change the order of every parameter or every place that was called to match the changing of order Why is can a sense important? Change is expensive. You want to you know It's good software practice to reduce the coupling between your modules and can a sense is a way of Talking about coupling in a particular way one of these Display is exactly like the first one displays all the methods available for the fixed-num class the other one displays all the methods Defined explicitly in the fixed-num, but not in the ancestors of fixed-num Which one is which? Okay, first one's all the way up. How do you remember that because please tell me You just looked it up. Okay. I did too. Yeah, I since I just looked it up for this talk I know but I forget it every single time. This is can a sense of meaning We have assigned a particular meaning to the values true and false that is not evident From their usage right here Actions reduce the degree of your can a sense in your code Increase locality and things things that need to change together put them in the same module bring them closer together So they can change together more easily and don't repeat yourself as kind of an application of increasing locality Single responsibility principle also Moves in that direction. So I think these things are kind of based upon the locality idea in can a sense So that's what coupling means For me that word just meant nothing until I saw that talk and Jim explained coupling through the term can a sense You know, it makes me really Sad to even have to share that like, you know, Jim passed away a few years ago But he meant so much to the Ruby community from it's like, you know Heady XP days and like like from the year 2000 onward to kind of shepherding so many of us through like how to build solid awesome Ruby code That like if you go to his last commit on github some of you might not know this like there's thousands of comments thanking Jim for his Contributions and somewhere in some github.com template isn't if else conditional to print this. Thank you message We recommend you go back and watch all the Jim's old talks and and if you do and you appreciate it We encourage you to contribute to the wire work fund. It's a scholarship program. That's Trying to keep Jim's memory alive and also help, you know, more people, you know, find the joys in computer science that he did So clearly Ruby is a really thoughtful language We spent a lot of time at conferences talking about ways that we can get better at our craft Ruby comp at Ruby comp Charlotte in 2007 Marcel Molina gave a fantastic talk about beauty There's something deeper than just appearances that actually dictates What makes something beautiful versus not? beautiful the first Topic that he brings up is proportion the next piece is integrity is clarity and Clarity is a simple concept. It's something is clear and something is simple That's a simple Working definition for what makes something beautiful those three parts now We're going to apply that to a piece of software to see how this can actually relate to code that we write You can choose one or two They're intended to all work in concerts and they balance each other out So they're each necessary, but none of them are sufficient. I Don't I don't I don't know if he uses the word beauty anywhere in the entire book but If you look at the information he gives you and you think about the three principles of beauty almost every piece of information in that book is driving you towards fulfilling One or more of the three principles that go to our working definition of beauty So he's setting out to write a book about how to write great software And it turns out that all the software that you create Following those principles is also by this definition of beauty beautiful software lucky for us Ruby is optimized for beauty big time Like to finish just by thanking maths in the Ruby core team For writing what I think is the most beautiful language. I've ever used So I'd like to thank Matt's given So It's no secret like surrounding yourself with beautiful code will lead to happy developers I think it also stands to reason that happy developers make more progress faster Asker manager more progress will lead to more money and so through the transitive property This is not like hippie-dippy bullshit like beautiful code leads to more money there. I proved it So this is actually really valuable stuff And they interview with O'Reilly in 2001 Mott's was asked the following. Did you have a guiding philosophy when designing Ruby? Never supplied. Yes, it's called the principle of least surprise I believe people want to express themselves when they program. They don't want to fight with the language First day of my first programming internship the first piece of advice I got was that there's no such thing as a good surprise and what the person was talking about was even with great tools like It's predictable tools that enable flow and even a good surprise can break you out of it Cascadia Ruby in 2012 Katrina Owen gave a fantastic talk about how refactoring brings joy Taken to coming into the office early in the morning and committing random acts of refactoring Some people are calling this guilt-driven development But really it's not refactoring just makes me happy I found this particular specimen in the dark recesses of that code base It had no tests and there was no documentation Where do you even begin testing something like this we don't really know what the inputs look like We certainly don't know what the output looks like We do know that it's in production and it appears to be working because we haven't had any complaints from the customer about it The easiest way to discover inputs is to just send something Anything really into the method and then see come see what comes back out We took a piece of undocumented Untested code and with a bit of hand waving we got fake assertions to give us the inputs The inputs gave us the outputs and the outputs gave us the real assertions Perfect, of course not. Is it better? Hell, yeah We went from this to this in less than 30 steps that I started optimizing for happiness. I Would specifically put something into its own class just that I could load just that class and nothing else The feedback loop you get when you have sub-second test suites for the thing that you're working on is unbelievable It's a huge enabler for flow Along the same lines of like the emotional layer of productivity with software Kent Beck at RailsConf a couple years ago in Atlanta Shared this those emotions are valuable information Emotions are noisy information, but they're valuable information and that feeling of I'm proud of this Mean something and that feeling like oh, I hope nobody ever looks inside this file. That also means something Remember that email from Dave Thomas earlier. Yes, this Dave Thomas. This is how he closed it He said I'm grateful for the excitement that surrounds Ruby that keeps it fresh and growing I'm happy for the folks who found a home here Programming is difficult and programmers deserve to use the tools that they love So one of my favorite aspects of Ruby is the pursuit of joy and program or happiness and delight I'd love for you to like look up like Ruby cones at some point soon And work through those exercises. They're great start a Ruby quiz club with some friends and play through some of the old example quizzes there Go on exorcism go through the Ruby exercises so that you can go and comment and help other people who are trying to learn Ruby We've only covered 12 talks. There's 2172 to go. So you got some homework for yourself We'd love you like think about the date you started using Ruby and then use Google advanced search and go look for some Ruby blog stuff I would see what people were talking about in our community before you joined And our message to you is we want you to go do something that makes you want to say whoops Because the last facet of Ruby's future is really going to be determined by people like you in this room So yeah, we work for test double. We're an agency. We're way over time We'd love for you to join the team at that URL like I said all these links are going to be up at our blog And just a little bit here and thank you so much for sitting through with