 Machine learning in Ruby? This is obviously the craziest idea because machine learning is reserved for the top echelon of programmers like Python, Java, and R programmers, right? Wrong. Ruby has plenty of tools with machine learning like C libraries. You can use JRuby to tie in with Java libraries. There's plain old Ruby like AI for R. There's plenty of Ruby tools to do machine learning. Plus, why not? I feel very passionate about this and I wrote a book on machine learning in Ruby. It's a test-different approach to machine learning and really, it's just to prove that us as Ruby programmers can do many of the really interesting problems like facial classification, spam filtering, part of speech tagging, language detection, sentiment analysis recommending beers, which is obviously important, and clustering jazz albums, which we all do on a very frequent basis. Quick ML lesson, machine learning. This is a little bit out of the book. Machine learning is interesting because it really helps you change your cognitive biases because when you look at this, you see two different circles and there is no way to put a line through two different circles and to make a decision boundary between these two different circles. But in machine learning, we have this amazing trick called the kernel trick whereby you project these two circles onto three dimensions and you're able to just put a hyperplane between it. Machine learning is really an amazing, amazing field and I feel kind of like Ruby doesn't ever talk about machine learning, which is unfortunate because we are kind of missing out. So if you're interested in buying the book or learning more, you can go to Thoughtful ML and sign up for an email list. I have all of the examples up on GitHub so if you just want to play around and not pay any money, you're more than welcome to do that. You can talk to me on Twitter. There's an O'Reilly link and it's on Amazon for pre-order. Thank you. So I don't need to volunteer very quickly. Could anybody come up here and help me with one quick thing? Just raise your hand, they're awesome, John. Thank you very much. John, if you would hold that deck of cards that I've put on the table and go ahead and shuffle it if you wouldn't mind. Where's the VGA adapter? Oh, here we go. Okay, so I feel like I've been screwed because someone did not unplug the VGA adapter first. Thank you. And what John's gonna do, or sorry, what John's gonna do now is I have this deck of cards and I'm gonna demonstrate card counting while I get the talk and while John is on stage at the same time. And let me see. John, if you would flip over a card every three seconds or so and leave the last card face down. Should I face the show? No, don't bother showing the show. Just keep going every three seconds and keep doing that for the rest of the talk or until I get kicked off stage by Ben. Okay, keep going, yeah. Is this? You don't have to keep, you can stack them on top of each other, yeah, that's fine. Do the AV guys have my, there we go, okay. So I got my volunteer comprehensive crash course and card counting as this talk. I'm John Feminella, you probably saw me yesterday, the Unicode dates and names thing, companies, uphex, and that's my Twitter account. So I run an organization called the CBC or the Charlottesville Blackjack Club. The Charlottesville Blackjack Club is 21 members. We have 34 alumni or no eight years old and we go to casinos and apply card counting to take advantage of the statistical discrepancy that's created and then we use the money and we donated to local, national, and international charities with a focus on, with a focus on math education, marginalized groups and gambling addiction. So card counting, real quick survey, raise your hand if you can count from zero to positive 20 in integers. Great, can you count from zero to negative 20? Great, can you remember one number for a few minutes at a time? Great, you can card count. All right, is this legal? Sometimes it's a big question that people have. Yes, lots of federal, state, and local decisions have ruled that card counting is legal so long as you use only your brain and not any other external device. So regular play, if you just play Blackjack at a card, at a casino, you'll be losing about 1.5% over time to the house. If you memorize a special strategy called basic strategy you can drop that down to half a percent and if you card count you can get it to 1.5% in your favor. So that means it's kind of a grind because if you bet 100 bucks a hand at 100 hands an hour, you're wagering 10,000 bucks an hour which equates to a $50 an hour wage which is probably less than you could make as a contract developer. So more money means that you'll make more but you also have to have more to start with. Likewise, if you play more hands per hour you can do the same thing but either way it's a massive grind because you wanna start out with 200 times your bet and that's not really gonna be fun if you're robotically applying the same strategy over and over again so don't quit your day job but we will tell you about how card counting works. So real quick, Blackjack tutorial. There's a dealer, a couple of players. The cards come from a shoe containing one to eight decks. The players place their bets at the start of each hand. The dealer takes a card face down. All the players get their cards face up. The dealer's second card is face up as are all the other players' cards. So it's a total information from all the players and the only hidden variable is what are the remaining cards in the shoe and what does the dealer have face down? So your hand will say that you're the first player there in this case you have these six of hearts and the four of hearts. Your hand's value is the sum of all the face values so if you have a six and a four you have a 10. Ace is count for either one or 11 so in this case the second player has either eight plus one or eight plus 11. Your objective is to beat the dealer's hand without going over 21 and you have five possible actions. The first thing you can do is hit which means you take another card. The second thing you do is to double down which means you double your bet and you take exactly one more card. Stand means you end your turn, you surrender if you think the dealer's got a better chance of winning than you do and you take half your bet and they keep half and you split if you're two cards with the same rank to make two new cards, to make two new hands. The best possible outcome is blackjack though. You don't do anything and all you do is get paid 150% of your original bet and then your turn ends. So the observation here is that blackjacks are much better for the player because you make three to two whereas the house, if the house has blackjack they can't reach into your stack of chips and pay themself an extra 50%, right? They can only take what you bet. So counting cards exploits this. The cards that are left in the deck are the cards that we care about being left in the deck are the ones that contribute the most to a blackjack, the face cards and the aces and the tens and the cards, I got that backwards actually, the cards that we don't care about so much are the 79 and the cards that are better for us to come out are 23456. I got this backwards, it's minus one, zero and plus one. So every time you see a 10 jack, king, queen or ace come out, increment a counter in your head that starts at zero by negative one. If you see a seven, eight, nine, don't do anything and if you see 23456, increment the counter by plus one. Then divide that amount by the number of decks remaining. So if there are, oh I wanted you to hold on to the last card, but that's fine. Well, I was going to demonstrate that the, because this is a balanced count that means that I know without having, I was keeping track of the cards the whole time while maintaining this conversation. The, because this is a balanced count before John drew the last card, this was a plus one deck and he showed the last card is a jack of hearts that's a minus one card so it works out to zero. I also would have guessed that that was the jack of hearts but that's okay. The magic trick still works. I'll be happy to do the trick anytime after the talk. So if that's the idea, just take that, go to the casinos. I'll be happy to show you anything more if you'd like one more thing before I get kicked off the stage by the Ben, I'm done, okay. So yeah, come talk to me afterwards if you want to learn more. Thanks very much. Hi, my name is David Molina and my first guest, Gidea Ruby. I'm from Portland and first time giving a lightning talk. So I was chatting with Whitney here yesterday and she encouraged me to give a lightning talk because we were talking about something that I knew intimately familiar with and she said, maybe others could benefit from what you know. So this was called hacking and federal procurement. Most of us think of procurement as big planes up in the air, billions of dollars. Sometimes they're scratched after a few years because we can't afford them anymore. But really what is federal procurement? US federal procurement accounts about 650 billion a year and it kind of grows up every year. Of which 250 billion dollars is services alone which is non example like construction, landscaping and of course IT. And how many here have I ever worked as a government contractor, either legacy code, that kind of thing, cold fusion, yep. So England is ahead of the game because of course we heard yesterday from Dan Hahn they're doing a lot of great things over there and we're starting to do some good things over here too. President Obama in 2012 here a few years ago put the presidential innovation fellows trying to recruit folks from the tech industry entrepreneurs, veterans like myself, others. And like Dan Hahn, we also apply but we get rejected and we're told, no, you're not good enough but maybe next year. So instead I looked for inspiration from technologists and others. Alex Payne from Twitter engineer kind of IPO'd. He had a lot of stock and now he's over at the department of better technology. I met him a few years ago. And in a great pose he says the healthcare.gov debacle is just one example of what an uphill battle we have to fight but it's unquestionably worth the effort for all its faults and frustrations government is a pillar of civilization and deserves a foundation of well crafted and open technology. Well as we know in Oregon we spent $300 million on Obamacare and the site never really went up but if you're not careful they will come after you and sue you like Oracle did with Oregon. This is really how it works guys. The bigger pyramid is this. They can sole source procure you a lot of dollars that's the very top. That's direct relationships. Think Lockheed Martin. Next step is the GSA. You can get a GSA schedule, there's a bunch of them. There's like a one nine month application process. This is like the government's version of Amazon. Then of course the open bidding market the very bottom open market. This competitive bidding these are usually five year contracts. You don't necessarily have a lot of experience but you have to have experience at least in the private sector that's called past performance you go and you bid. But the key is teams. Teams are vital. So IDIQ for those who don't know indefinite delivery, indefinite quantity that's a fixed period of time. GSA of course their website. One nine month application process and then of course you saw at the very bottom you saw HUBZone. HUBZone is like historically under utilized business area. So is Portland, let's see the offices here in Netspace, anybody work downtown? Six one nine, Southwest 11, that's a HUBZone. So you could have a HUBZone schedule and bid on contracts that are only HUBZone only. How to go and get the open market because you probably will not get the IDIQ or the GSA because you're not, we're not Lockheed but this website here will give you all the information you need. And at the very top right hand corner is a set of side codes. You can at the, where it says any you can drop down there and go to HUBZone or anything else. For example, we did a search for 54212 it's a NICS code. Air Force Integrated Personnel and Pay System they're looking for vendors to help them make it better because obviously all of us in the military we like to do things a lot better and lowest bidder contract isn't always the best but I think there's a lot of really smart people in the room and we can go bid on some stuff. This one for example is a request for information. Do in a couple of days, how hard is it? It's not really hard. I actually got out of the military last year and I got certified. I went and put my first bid together and I won $142,000 contract, $760,000 over five years. It's not very hard guys. It's just put a proposal together. If you want, if any of you guys are remotely interested in being independent contractors and do that field and open that up for your business either as a freelancer or teaming as a team with another team and bid on something because really it's about the teams. Come find me on Twitter and on Instagram or you can email me, that's my old fashioned way. Thank you. I'm Bethany Rence and I work at Nerd so we're a small consulting company based in Seattle, Washington, up on Capitol Hill and today I'm just going to do a quick show and tell and so how many of you are newer to Ruby development? Raise your hand. Okay, so hopefully and even some of you who have been doing Ruby development maybe this is something useful. So we have Robocop, many of you've probably seen the movie and in Ruby we have Robocop. So going out and so this is a gem that you can use and I use it a lot in my code so once I've discovered it it's kind of helped me get over just some of kind of the basic style errors that I would get in code reviews. I have nothing to do with this gem. I did create it. I'm just like using it. So it's based on the Ruby style guide and so that's actually posted out on GitHub and then what this gem does is it runs through the style guide and looks through your code and will tell you about places where you're violating style best practices. Okay, so to use it you just gem install Robocop or you can add it to your project and then you type Robocop and it will run through your project. Basically it just gives you an output like this so I just did this on an old project I have out on GitHub. I had 1,522 offenses and what I did next is you just run Robocop.a and it will actually go through and auto fix some of the errors that you run into and so after running that I am down, I think I'm down about 400 so I could actually if I wanted to go through and clean up this code go through the comments. Some of the other nice things is if you're working in a team you guys can come up in an agreement on what your standards are and put these into the configuration file and so as other people move on to your projects you can add this to your project and then require that everyone runs it and be able to pass Robocop before checking code into the branch. Okay, thank you. My name is Lauren Vosmickle and I wanna talk about something that we don't talk often about and that's pay. We live in a capitalistic society and in a capitalistic society it is the goal of corporations to make as much money for their shareholders as possible and we are often told by people that have lots of money that the best thing that we can do as people is work hard. That being said, corporations are now people so really our main goal should be making money too. There's a question that a lot of people ask when starting a new job and that is what's your previous salary? Avoid answering this question. Avoid it like the plague. It's not a question that you need to ask and if they're not willing to take an answer of I'm sorry, I don't see how that is relevant to this conversation and they say we require this information. I'm gonna tell you to do something. You know what you should do? Lie, ball face lie. Inflate your previous salary. Do whatever you can to make as much money as possible because that's what they're trying to do to you. It is their goal to make as much money as possible so they're trying to screw you as much as possible. It is also illegal for employers to ask what your previous salary was from another employer. They can only verify employment dates. Also, company policies that say don't talk about salary with your coworkers, totally illegal, you can't do it. The National Labor Relations Act was made in 1935 and has been ruled to actually extend to talking about salaries for workers and also to allow for collective bargaining and association. So now I'm going to do something that's really taboo. So I have over eight years in the industry. I've spoken at conferences. I'm well read on industry topics. I actively practice programming in my free time. I've gone to numerous code retreats and I teach through Grille Develop It. I'm a senior developer, web developer at my company. My company is a DC-based company. That's my salary. If you have those qualifications and you are not making that much and your company is based in a major city, you need to have a conversation with your employer. Is anybody else willing to say what their title is and their salary information? Anyone else? All right, in the back. Any new people? That's a general feeling for how, what salary people are getting when they're senior developers and occasionally when they're junior developers. I want to start a conversation about this. There's another great article that you can find at this URL. Read it, learn about it and start talking about Paymore. All right, so before I start my talk, I just wanted to quickly mention a site that I'm working on. It's called rubigamedev.com and it's meant to be a central resource for discussing and learning about game programming with Ruby. It's really rough right now but I could really use your contributions. It's an open source Rails4 project that you can fork and submit pull requests to. Even if you're just getting started with Rails, I'd love to have you to get involved. I think it'd be a great project for you. So I'm going to talk about the state of the Ruby CMS. My name is Andrew Havens. You can follow me on Twitter, Ms. B. Havens. Go to my website, andrewhavens.com. If you've never given a lightning talk or a conference talk, I'd highly recommend it because it's absolutely terrifying but I've gained a lot of fulfillment and conquered my fear of speaking. Ruby projects are leading the way. I feel like Ruby is the greatest language ever. It's beautifully simple and easy to use and Ruby has a great open source community and I feel like it's leading the way in a lot of different areas. Here's just a short list of some of the great Ruby projects that exist. I'm sure you've heard about a lot of these. They stand on their own and attract non-Ruby developers to become interested in Ruby. Some of these projects are being used in non-Ruby projects because they are so good and they can work in those environments. Ruby is leading the way in pretty much every category except content management. CMS is, let's review this highly unscientific chart of the top CMSs. We've got WordPress, Drupal, Joomla and some other PHP CMSs. I know that these are pretty obvious and just because they're popular doesn't mean that they're good examples of CMS. WordPress is a blogging platform and for some reason it's the number one CMS. Most of these are popular because PHP is popular but there are a lot of other CMSs that are also written in PHP and a lot of them aren't half bad. Many of these PHP CMSs are coming up with innovative approaches to managing content and the downside is they're written in PHP. So in Ruby we've got these CMSs. We basically have these four CMSs and I'm sorry if yours isn't on the list. I limited this search to the top most popular Ruby CMSs listed on Ruby Toolbox that seem to be actively maintained. So we've got Refinery CMS, Browser CMS, Locomotive and Comfortable Mixing and Sofa which is an acronym for CMS. So in searching for a CMS and I've used all these CMSs in evaluating them, my ideal CMS would be number one, first priority is a modern UI with an intuitive client friendly editing experience. I can't just choose a CMS because it's written in Ruby if the client finds it to be difficult to use. The other thing is it needs to be designer friendly. I'm tired of CMSs that require you to design around the CMS. That's just too hard. It also needs to be a small and lightweight. Sometimes I want a small site that has a CMS thinking like Sinatra is a small little application that you deploy. I don't wanna have to deploy an entire Rails app so I can have a CMS. But in some cases, I am building a Rails app and I want to include some CMS functionality and I need to give the client access to edit some tiny piece of content on the page. And in some cases, well in all cases, standard Ruby practices, testable, easy to deploy, separate environments and supports multi-tenancy. This is a nice to have in some cases. I don't wanna have to maintain multiple code bases or multiple databases. So in evaluating the Ruby options, I've even excluded one of them because these are all very similar. In some cases they overlap, in some cases they don't. This is a highly subjective list based on my requirements in regards to Rails integration. Just because a CMS is written as a Rails engine doesn't mean it's actually very integrated with Rails. I mean, how many times you build a great Rails application and then you have to roll your own CMS-like functionality or the CMS is siloed as a separate part of the application like content doesn't overlap. So none of these CMSs meet my criteria and that's why I'm building my own. It's called Compartment CMS. It's a project I've been working on in my free time for quite a while now, on and off, but recently got a lot of motivation and you're probably not asking yourself when will this vaporware launch? This will launch in November and I've got some backing to support it and so go to compartmentcms.com and you can enter your emails in front, sign up for updates, thanks. Hello, my name is Cassie Schmitz. Today I'm gonna talk about Jekyll which coincidentally is timed after the CMS talk. I work at Substantial and thanks to Substantial for sponsoring the talk and sending me here. So I was recently working on, we're working on at Substantial redoing our company website which currently is like this Franken site where it's like a Rails app with a homegrown CMS and then it has a WordPress blog and then the developers use Octopress to write blog posts for the WordPress blog that didn't have to go from Octopress to WordPress. So we're just like redoing everything. So we were looking around for like something that was a CMS that also had a blog that was collaborative but we didn't really have a lot of luck finding anything but we really liked Jekyll but the problem is we have people that aren't developers that need to write for the blog and update content. So they're like, what happened to WordPress? We need WordPress to write content but we luckily found out that there's this awesome project called pros.io. I don't know if anybody's tried it out but it's basically a content management system that basically sits on top of GitHub. So if you make any sort of edits to a file you can add files and they just become get commits so somebody who's not a developer can still write content for your Jekyll site but they don't have to know get and they don't have to set up the project they just use it like a regular CMS. So we were able to take our crazy Franken site and just make it in Jekyll. So now it is all Ruby, no more PHP which is really awesome. And the next really cool thing is that it's lightning fast. It's actually, Jekyll is actually a static website generator and it's also blog aware so you get best of both worlds so it actually, you just run the generator and it generates all these static HTML files which is also really nice because your server setup is super easy. All you need is a web server and you can actually host it on GitHub pages too so if you don't even have a server you can do that. And it also has lots of plugins so a lot of the stuff that we wanted to do we wanted to have like an asset pipeline. We just installed a plugin and we wanted Stas and Hamel and it was basically like having a Rails app but without Rails. But there are a few things we didn't like. Updating plugins is kind of like WordPress. You basically just have to replace a file on the plugins directory. I did find some that were actually gems like just a few of them so it would be nice as like a community thing that if you're gonna write a Jekyll plugin like Gemapy it. So that way when Jekyll updates you can just update your gems and all your plugins work. The other thing that was kind of awful was like it's really easy if you can't find a plugin that does what you want you can write your own. But I didn't really find a lot of good resources or testing frameworks because you have to sort of hook your plugin, testing your plugin into how Jekyll generates your site and there run a lot of good resources on how to do that so I wasn't able to test my plugins which kind of sucks some use to testing stuff. I did find towards the end like a gem that was for writing a Jekyll plugin that did have some tests but this was after I had actually written my plugin so it was too bad it was after the fact. And then the other bad thing is we were looking at the source of one of our pages and it just had like a ton of white space everywhere and we're like where did all that white space come from? So Jekyll has what they call liquid tags so if you wanna do any sort of logic within your files so if you wanna do if statements or for statements but the problem is if you put them on a line then that becomes an extra line in your file and so if you have for statements and all kinds of stuff like it can generate a lot of white space then you have to move everything onto one line but then it's a lot harder to read your code so that's it. So I recommend if you guys wanna do your own site check out Jekyll. It's a lot nicer than WordPress and if I was gonna do a new site I would definitely do it in Jekyll. All right, thanks. My name's Nathan and sweet baby stump town I've had too much coffee. This is keeping smart, keeping sharp with worst practices. This is about things that will make your coworkers cringe that will improve your skills. The first one, I'm gonna look at five different things. Don't do this in production code necessarily but learn some things from it. So first one is use and or not. Try no prints for a while, style guides hate it. I don't care. It'll teach you about operator precedence. It'll teach you how to make Ruby that looks more like English and it's fun. It'll teach you how to see your code the way Ruby sees your code. Try testing it syntax for a while. This is a kind of a standard RSpec test. I've seen a lot of these. When I'm looking at code I wanna reuse in a test. I wanna learn how to use something. I wanna ask three questions. What does this code depend on? How do I interact with it and what does it actually do? These three components are very key to understanding what the test does. And if you look at, wow, that's awful. If you look at, I'll just back up a bit. You'll see that the background of the state required is separated into two spots. You've got the six specs syntax. It's all jarbled up. And the English that it produces is really hard to understand as well. So if you just try testing it for a while it'll kind of get you back into the mode of just making your Ruby readable and it'll in turn make you better at writing specs. Another thing is stop practicing TDD altogether. I've been doing TDD for many, many years and I found that I was doing these short iterative feedback loop cycles that were great but I lost the ability to look at a really big problem all at once and try to conceptualize a solution. So actually quitting TDD on my side projects for a bit got that muscle memory back of how to work on a big problem and it actually let me do more with individual bursts of energy. And then another thing to try and stop memoizing. You see classes like this where there's just like memoization after memoization after memoization. This is really terrible for a lot of reasons. If you ditch memoization it'll force you to start conceptualizing your object's lifecycle which is a crucial tool that helps inform the design of larger components. This is a big one that really improved the design of my code. And another thing is get rid of private methods. A lot of people are talking about this now. It's kind of a big thing. So a lot of people think of, I want a small, tight public API, right? But they only conceptualize the size or they only measure the size of the public API by the number of methods. But the size of an API is actually measured by the number of methods multiplied by the variability of their inputs. Which is why RAC, this def call end is one method and it's a huge API because of all the different things that can go and end. So when you ditch private methods and work with just publics it'll force you to write more methods perhaps but with less variability in your input. So it's a big design win. That's all I got. Hey everybody, a jelly? My name is Lauren Voswinkel and I work for, no actually, Lauren and I get, people think we're the same person all the time but I'm the one with the bandanas. My name's actually Carrie Miller. I'm on the InnerTubers pretty much everywhere as Carrie's or which is actually a lie. I'm everywhere that matters. If you actually follow me on any part of the InnerTubers you know that I make a lot of jam and jelly. It's kind of my summer project. I work from home and it takes me about 45 minutes to make a batch of jam or jelly which is perfect for my lunch hour. These are some of the things I've made recently which not really the most exciting flavors but people seem to be impressed by them. So I want to teach you all how to make a batch of jelly. Well jam actually technically. First you want to take five to six cups of mashed fruit product. Usually starts out about 10 cups. You smoosh it around, get some liquid in there. Put it in a big pot, add some pectin out of a box. That is a standard measurement, one box. And bring to a rolling boil. What the hell is a rolling boil? A rolling boil is when the liquid is boiling and you stir it and the boiling does not stop. This is also really friggin' hot. It's hotter than water at this point and it's sticky so be careful. At this point you want to add four cups of sweetener. You can use honey, you can use Splenda, you can use brown sugar, white sugar, doesn't matter really. Bring it back to this quote, rolling boil for about one minute and once 60 seconds have ticked by, take it off the heat and use a correctly handled ladle to fill up a series of jars which you've previously sterilized hopefully. At that point you can just refrigerate or freeze it as soon as it cools down to room temperature or alternatively you can process these jars which is a very specialized jamming term for putting in a pot of boiling water. Now a really interesting thing to me about jam and jelly and why I'm talking about at Ruby Conference is that you can also use this idea to make fruit pie. Fruit pie is a very similar recipe, I won't go through it. But it's basically really, really simple. You take some fruit and you add some sugar and you do some heat magic and everything happens. And what's really, really interesting about this is that cooking is not about recipes, it's about ratios, right? So jam is three to two fruit to sugar, pie filling is three to one and the ever fancy compote is just six to one fruit to sugar. Similarly soups, stews and casseroles share very similar ratios here because oh my god, design patterns. Now if you're interested in this totally, here's a couple of books that talk about this at length. How to Cook Without a Book is more about, here's some general techniques that you should know and you can make anything within 20 minutes and ingredients you have at hand. Michael Roman's book ratio goes into this great length but he talks mostly about baking and how all baking is basically different ratios of flour, water and a leavening agent. Now I do have two minutes left and I have two more bonus slides so I can hit my insane amount of slides within five minutes and I want to teach you how to cook a turkey because that's the number one thing you get asked when people say oh you went to cooking school, how do I cook a turkey for Thanksgiving? I'm stressed out about that, here's what you do. Thank you. I'm Scott Windsor and I'd like to talk to us today about the birthday problem. Otherwise known as DHH, single responsibility principle, test driven development and three letter acronyms. So I don't know if anybody has recently watched the keynote from last year, has anybody seen this? Okay, so DHH introduced sort of a rebuttal against TDD and basically sort of introduced the concept of what he called test induced design damage. I don't really know what that is. I think generally his approach here is that basically looking through his examples he presented cases where his design became worse because he was using and following test driven development. So here we have his first slide. We have a person who has a birth date and we would like to display their age. Now we can see this is slightly tightly coupled because a person knows about date and date today means that your sort of tests are gonna be slightly brittle. Looking at the stub solution, this is a version using mini test spec. We basically have to stub out today so we can actually make sure that our tests pass and sort of don't fail over time. His rebuttal was basically adding dependency injection. So now we add a birth date into the person class so then we can actually make sure that we can test this and it doesn't break as the dates change. Here's his dependency injection code. So basically it introduces a default time of today for your actual code but then it allows you to override for your testing purposes. He then took the example and then added a can drink method which basically also then takes a date that can be overridden to sort of change. As a result our test becomes damaged. We now see our actual code now then takes now everywhere in each parameter. So as over time this seems even more and more brittle. So I'd like to sort of propose a little bit of a counter design towards this approach. So first of all I think that that wasn't dependency injection done quite right. The first proposal for you here that I have is basically injecting at the class level. So basically you wanna basically have today passed in and if it's not available the default that makes your can drink and age actually very simple. The test as a result are much easier to follow. We have classes created for each of the examples but you'll notice we actually have to write a lot more test code because we actually have to test our defaults of the day defaults to today. So in the end is this better or worse? We've sort of done dependency injection better but this example starts to not make sense. Here we have a person class actually asking if they know how to drink. It doesn't really make a lot of sense. And from Aaron's talk last night we know we need to separate our concerns. So we can sort of do better than this and I think this is a bit of a flawed argument in the first place because person class doesn't need to know anything about drinking. It doesn't make any sense. So let's go back to the original problem. We have a person and they really just have a birth year that we care about. We just limit that functionality. Test is very simple and the class is even more simple. It just delegates birth year to birth a year. Pretty easy. Concerns are clear. Now we want to add a bouncer class and the bouncer class is the one who's actually responsible for somebody can drink or can't drink as in most clubs. It actually takes the person class and then asks whether or not they can drink. This makes the implementation very simple. It takes in a date class, it asks to the can drink, it takes the person, does the arithmetic, checks to see if the age is 21, we're good. So in general, I just kind of want to reiterate that test driven development is just sort of an approach that may or may not help you write better code. But in general, you are the owner and is sitting in the driver's seat. You make all of these design decisions yourself. No one else has to make these for you. So don't write bad code, write better code given the tools that you have. So remember, TDD is awesome and you're awesome. So feel good, have fun. My name is Joel Stimson. I'm from Seattle, I'm not wearing this shirt ironically. I'm a software engineer at Codex Design. We make screen printed t-shirts, other cool things like that. Today, I want to talk to you about citizen science. Before I was a software engineer, I did my degree in physics and astronomy. I really love being a software engineer, but I sure miss the thing you can't see. Basically, let's see. I want to present to you, no, no, no. All right, well, so in terms of citizen science, what these basically mean is places for amateurs to help out professional scientists. These are places where computers just aren't good at cleaning data, identifying data, and places where our brains are actually still better than computers. Places like identifying and classifying galaxies, finding space dust, things like that. There are a couple of projects that I found to be really interesting. One is called Stardust at Home. Basically, they sent a satellite up for two years, slammed it through a bunch of space dust, trying to gather these little teeny teeny particles that basically coalesced as the solar system formed. Based on those things that they gathered when they brought it back down to Earth, they can start to figure out, okay, how did the solar system form? What is it made up of? Computers actually, for some reason, can't identify these little teeny tracks in the gel that they used. Human eyes, all the enough, were very good at it. So, if you have a few seconds, you can crank through a bunch of these tracks, help find those pieces of space dust, and actually get your name on some papers with all those professional scientists. One of the other big projects that are out there is called Zooniverse. They run a thing called Galaxy Zoo, which is a project helping classify galaxies. And in addition to that project, there are ones mapping planets, mapping craters on the moon, mapping Mars, even things that aren't space, things like history and weather, digitizing old ships logs from Navy and Coast Guard ships to help us basically take all the weather data that we have, say, for the last 100 years and moving it back farther and farther and farther. So we have all this historical data we can use for weather models and things like that. All of those are on the computer. There are things that you can do in five minutes, 10 seconds, something like that, and participate in the scientific process. If you want to actually go outside, not be in front of your computer, one of the organizations that I've been involved with is, let's see if I can remember the acronym, it's the AAVSO, and I want to say it's the Amateur American Association of Variable Star Observers. Variable stars are things in the sky, stars that pulsate so that they get brighter and dimmer over some oscillating period. Some of them are over seconds, milliseconds, very, very short, some are years. Telescope time is expensive, and it's difficult to get enough data to actually do the stellar research. So they actually grab amateur astronomers to use your telescopes, use your binoculars, even use your eyes to go out there and gather this data. How bright are these stars on this specific day in this specific time? And that data gets catalogued. There are millions and millions of data points that these professional astronomers can use to then go and build their statistical models for how these stars work, how fusion works in these stars. So if you actually want to get out, get your hands dirty, you can always go and learn how to be a variable star observer. So in terms of that information, that is all I have for you. Thank you. Hi, I'm John Highland, and I don't have any slides. I just have an idea that I had last night playing Tekken at the New Relic Party. But it has nothing to do with fighting games. It's about services. A lot of people are doing services these days, obviously. I've been involved in four, five, six different service architectures, depending on how you count it. And I found that I kept doing the same stuff over and over again. I've built a ton of user services. You're always gonna need a user service. I've done a permission service a bunch of times. And most of the time when you identify some of these patterns, you say, oh look, I keep doing the same thing over and over again. You like to extract that logic out. You like to build a jam or a library or something, but that doesn't really work for services because they're like big whole components. It's a whole application. And the other problem with it is that tends to be a lot of work, right? You can build these open source things, but it's hard to tell if anyone would actually use them if they were there. Especially for something like a service architecture because most of the people, not all of them, but most of the people who are doing services are like companies. And you don't have a lot of visibility into what's going on inside other companies. So I was just curious. If I were gonna write kind of a global universal user service or a permission service, I think I could probably hit about the 80% useful mark. 20% of you have crazy needs I can't handle. But 80% probably work. Would that be useful to you guys? Like just, quick show of hands, raise your hand. If I did something like that, do you think your company might use that? Or you individually in something else? Maybe? A few people, about a third? I will definitely accept pull requests. The more help, the better. Okay, I'm gonna do it then. And we'll see how it goes. I just wanted to get a quick poll. Thanks. Hi guys. My name's Amy Woodward, and I'm here to talk to you a little bit about the wonderful world of Bitcoin mining. I am a Ruby developer, but last year I decided to take a bit of time off software and join some friends who were doing a crazy hardware startup. So our aim was to go and build the fastest Bitcoin mining chips in the world, which we did, and then we ran out of money. So, such as technology, Betamax, VHS, and so forth. So I'm not gonna spend a lot of time going into what Bitcoin mining is, other than it's basically a worldwide competition to go and solve a very hard computational problem. And doing that helps keep the peer-to-peer Bitcoin network running. And the reward for doing that, if you're the first person in the world who happens to come up with a valid solution, which is basically more or less random chance, but increased by the amount of power that you could throw at the problem. If you're the winner, then you get 25 Bitcoin. Now, when Bitcoin was worth pennies each, this wasn't such a big motivator, and people were doing it because, you know, they believed in future and that the world and the internet is awesome. But Bitcoin recently got up above $1,000 per coin. It's now, I think, around 600. So if you're talking $1,000, these competitions happen about once every 10 minutes. So that's $25,000 every 10 minutes. $150,000 every hour, and you start to get some serious money. So our aim was not to try and collect that money ourselves, but to go and enable Bitcoin miners by giving them the next generation of equipment. So I think I kind of went through the what and the why on Bitcoin mining, but slides are really basic. The how. So initially, people went and used just their regular computers to do Bitcoin mining and ran software in the background, say, like study mine from home. We went, this is the chart, that you can go and look up if you're interested of all the steps that are involved in a Bitcoin transaction. When people went and started getting faster GPU rigs, they didn't just start cracking passwords with them, they also started mining Bitcoin. So the difficulty rate went up. It became more and more hard to mine Bitcoins as more and more people did it. This is a way old picture of the hash rate. You can see it actually has an up and down that's basically on a 24 hour schedule because people were mining on their own machines that they'd actually turn off at night. And I think this is back when the entire network was 15 tera hash. In November, it got up to one peta hash, which is you've got mega, then giga, then tera, then peta, a lot of hashing. And now it's at 16 peta hash as of a couple of days ago. So initially, people were buying a lot of hardware like this. We went and sold like for you servers that people stick in data centers and such. Covered this already. Oh, I didn't actually. So I got to GPUs, but not to FPGAs. So FPGAs, field programmable gate arrays, basically partly, what's major? Can't think of the right word. Hardware that runs faster than your GPU because you can go and tell it to do fewer things. Asics, you design them to do just one thing. And our specialized chips could do about 400 to 600 giga hash. Basically as much as about 70,000 Intel chips. Except for an Intel chip can do 70,000 other things and ours could just do the one thing, but it could do it real fast. So we actually sent it off to Taiwan and had it manufactured in a facility that does 28 nanometer silicon. And it was awesome until we went bankrupt. So this is part of why we went bankrupt. If you can see, you probably can't, but this slide covers just about a year in the world of Bitcoin. Back when I was selling machinery, was back at the beginning of the graph, 10, 13, 11, 13, 12, 13. And the difficulty rate was so small you can actually hardly see it. That was when it was less than one petahash. And now we're at 16 petahash. Meanwhile, coming around like March, April, May, it got really hard to sell equipment to people because they're like, why on earth would I buy equipment from you? I have no idea when I'm gonna be able to make any money. So that's about when we ran out of money. And I'm running out of time. Challenges, tight schedule. You know that it's hard to ship software on time. Imagine shift, shift software. Imagine shifting hardware. Ah. And imagine that your product goes and loses its value by 60% per month. And then imagine what slippage does to your profit line and your schedule and such. There were also crazy people. Snowstorms, fires, price volatility. And if you're interested in all those, particularly the crazy people that got stories, come find me after. Thank you very much. So this is primarily to those of you who don't think that you can help new people but you want to. I'm going to ask for some audience participation for those of you who have been helping new people. My name is Whitney Leviss and I'm Rose above it on Twitter and I'm a newbie developer-ish. And I was just at the distilled conference and there was a talk on, I think it was called like ushering unicorns or something like that. But it was about how to help new people. And I'd kind of like to elaborate on that idea and extend it and so this is my attempt to start that process. So when you're wanting to help people and especially get people into tech and so forth, there's some variables to consider. What type of investment is best for you and what extent of investment is best for you? So there's a lot of different types of investment and it's good to think about what your strengths are, what feeds you as opposed to what drains you. So here's a bunch of different things that you can do. I'm going to ask people to stand up if they've done these things and then if you're interested in that, look around. Those are the people that you're going to want to talk to at breaks or whatever to learn how they got into that. So if you've ever done any teaching, taught people to code, taught people, and this can be like an hour, it can be a day, it can be a year or whatever if you've done any guest teaching at code schools, anything like that, stand up. Okay, now if you've got any interest in teaching, look around you. These are the people you're going to want to talk to. They have some experience with this, they may be able to give you ideas, okay? And as I said, this can be done in person remotely. Feel free to sit down. There might be some up and down, sorry about that. The other bit is like conversations. The thing is that it doesn't need to even be that huge of a deal, right? I've had some really great 30 minute conversations about how to remote pair with people. I've had great conversation. It can be small, it can be big. If you feel like you've done a good job having one of those conversations that inspired a new person, gave them some solid information that helped them in tech, and you've been able to express that in a way that new people knew how to find you. So they know how to, like, yes. Those things are the case, stand up. If you think that you want to help new people by having these conversations and you don't know how to get started, talk to one of these people because they have somehow convinced new people that they are good people to talk to. They may have some insight, okay? Sit back down, all right. The next one is writing, blog posts. We've all read good blog posts, you know? If you feel like you've got a strength in writing, just go write it, write blog posts, post them around, share the ones that you find. That's a great way to help new people. Another one is code reviews and answering questions. I'm hoping that there is some system by which people can do this quickly, but Stack Overflow, that is a great opportunity to help new people as well. There's often questions there and so forth, so that's a good opportunity. Actively welcoming people. I don't have a whole lot of experience, but I can be at Seattle RB and there can be somebody who has that deer in their headlights look, like I don't know anything of what's going on here and maybe I don't even belong. And I can be like, hi, welcome. What are you interested in? They don't even have to have done anything, right? But what are you interested in? Here's what I'm interested in. I've done this little thing. So if you've played with anything at all ever and talking to people and welcoming them in is something that feeds you, do that. And it's great. Also slight adaptations that help all users. So for instance, I wanna talk about Aja's talk earlier that was like that awesome fire hose of information about design patterns that was amazing. She did a really good job of like letting us know what we were going to get. And that helps new people to navigate the talk. It also helped everybody else navigate the talk, but it was especially helpful for new people. Additionally, any sort of documentation in your gems. Very helpful for new people. Also helpful for everyone else. And then there's also a lot of organizations out there that actively help new people. And if you feel like you really wanna help and none of these things speak to you at all, you can donate. If you have the extra resources, you can donate to code schools too. Things like that. And then extent of investment, your choice. Make it small. Any little bit helps. Believe it or not, this is my very first lightning talk and I'm kind of terrified, but Whitney said I should do it. So thank you, Whitney. I can only give you a few seconds to prepare yourselves or flee, but for what it's worth, I am gonna bring up some uncomfortable topics and I wanna give you at least a few seconds to react to that. I was having lunch with somebody today who said something really amazing and I'm totally gonna steal it from them right now. What they said was I may start to cry and I would prefer that you interact with me as though I were not. So please take that advice. So Ruby's great. I really love the language, but more importantly, I love the community. I love how creative and friendly and welcoming we are and the thing that really got me into it in the first place was seeing why the lucky stiffs art and realizing that this was somebody who was not only allowed but welcomed and encouraged to do this stuff. But sometimes we're not as welcoming and sometimes it's not intentional. Some of the things that we do without thinking about them are actively unwelcoming and I'm here today to talk specifically about othering. This is a process or a rhetorical device in which one group is seen as us and another group is presented as them. This definition is straight from geek feminism and I think we need to talk about this. I've seen a few instances of othering here and I'm not here to shame anybody. Like I said, I love how open and welcoming we are and I want us to be even more so. We'll start small. I know that you all know women who don't mind being addressed as you guys and I know there are women who address other groups of just women as you guys but there are also women who feel excluded when we say this and when I first heard about this, this is a really hard one. Like my brain wants there to be another syllable there. So I've tried to replace it with you all or you folks and it sometimes feels a little awkward and I have a little hesitation but I still try to do it because a momentary hesitation and discomfort for me is an unusual thing and feeling othered is something that many people experience multiple times a day. I noticed a few things that were undesirably being described as lame. This is comparing perhaps a bit of technology that you happen to find awkward with a person who has a physical disability. Much more noticeable and frequent I think is the word crazy. I know we have this arms race in language and intensifiers and everything is awesome, thank you Lego. And so we feel like we need bigger words and crazy is really easy to bring up but this is a word that's used to hurt real people every day. This is a word that we think of or that we use when we can't think of absurd or ridiculous or extreme or incredibly and I feel like it's a verbal cop out so I would ask you to take a second and think of a word that means more precisely what you're trying to express. Quick reminder, this refers to a large group of people who committed mass suicide. And yesterday there was a slide featuring a man in drag, an actor and for the small number of you who are familiar with the TV show that it came from this slide said to you a funny thing about computers and differing authority but for a small number of you who are trans and for me who has some trans friends it was a slide of a man in drag that people were immediately laughing at and I know that it wasn't intended that way and I tweeted it down about this and Dan tweeted back immediately that he was sorry and he would think about whether and how he used this and that was exactly the right response so thank you very much Dan for responding with dignity and class and it really increased my respect for you. I don't know why that slide is there so othering doesn't just affect women or people of color or people with disabilities or mental illness, it also affects me. It makes me feel like I have to apologize on behalf of other people. It makes me feel a little less comfortable and I have to point out that my experience is not somehow more valid because I'm a white dude and I'm up here talking about it. If anything it's less so because I'm only feeling awkward up here on behalf of other people but because this doesn't harm me personally I can come up here and tell you all about it. Just please think about this stuff. If we welcome people with big actions like the Opportunity Scholarship that I'm very happy that we're doing this year we shouldn't then push them away in small ways with little actions. That's all I've got. I do have one last request. I would prefer that you're not clapped for me. I don't want applause for this. I just want you to think about it. Sorry for the down note. Thank you Sam and thanks for everyone else. We're gonna take a little break.