 If your name is on this piece of paper, come up here, right now. If your name is not on this piece of paper and you want to be on this line, come on. The way it works is it doesn't matter that Ryan's level is first. If someone on this list is a shorter amount of time, they go first. So everyone come on down and it will both sort you into the right order. Oh, and also you can one jump if your talk doesn't require a computer. You don't need slides, but because you don't need setup time, you jump to the front line. So are you all sorted there? That's just good. My name is Jack and I'm the best reason for you to believe that you should be doing a lighting talk because I'm going to talk about something I don't quite understand. So here's a pattern. It's really useful. It's underutilized, but it's forking your Ruby process into another operating system process. Some benefits, Unicorn does this. It loads your app once. It forks it out for the workers, and that's instant each time it's uploaded again. Orca dies just because of the process, forks itself again. It's a great way to get memory rollbacks instantly. So again, you'll do better than me if you do a lighting talk tomorrow. Okay, so here's a common situation. You have something you need to do. Runner is a thing I want to evaluate. It could be huge in this case, I'm adding. In memory, I call it, and it gets assigned to a value, and now I have a result. Lovely, but that's just one process. Let's say I want to fork. I have my runner. I fork the process. This all happens in a setup process. Or a trial process. Yeah, I result to whatever runner happens to evaluate it to, and I leave. But the result is nil, because I store that. The memory split in half. Two dimensions that match and get branched from earlier. They can't talk to each other. So the way this is usually handled is some kind of IO. So you can do a Unix socket. I'm not gonna grow that again. Alright, I'm just really popular. A Unix socket, a TCP socket. You can do a web call, communicate to the database. Somehow, outside of this memory process, you need to have your child and parent talk to each other. I'll leave that to an exercise to your implementation. But imagine you have this thing called sendTo, which outputs something to this interface, and wait and get from, which wait blocks and waits for something from it. In this fork, you can send to the parent IO the result of runner.call, and then wait until it gets something back from that parent, and then leave. And then in your parent process, which will be having this as parent process, and happens at the same time as child process, you can first wait for this line, and then send this to this line, and now you have an actual result. If you want to see this implementation working in three completely different ways. The Unicorn, the Forker, and the Spork gem all do this in different ways. It's really useful if you're writing a test framework or something, and you want to have a context that is a setup block that's run once, a bunch of suites that are run independently, and you want instant memory rollbacks that happen to like doing magic for the processes. I don't know, finally used for this, and hopefully it'll be difficult. Thanks. We're going, hi, my name is Frank. I'd like to talk about XML. This is the Java conference, right? I guess not. Oh, sorry, how do you actually deal with XML? Most of you, you know, right? Like, when we write new applications I'm happy to see in Rails 3.1, it sends it to JSON now. I don't have to replace all that XML stuff. But when I was asking around how do people deal with XML, I found a bunch of different answers on Convore when I just started their conversation. They can't quite get really a good, solid answer what people like to use, and when I started at the company I was working at now, they used Crack, and I got the company off Crack. And I kind of look at XML in a lot of way data, in a lot of ways like exposure to radiation. Like, in small amounts, XML is not bad for you, right? It's a little, it's like radiation, because when you deal with something like this, and this is what I deal with, like multiple different objects, I mean, I know you're going to say there's just name spaces up there and you're just taking out space, but all those name spaces are used, and this goes on for several thousand lines. I knew this, I lived this. This is stress people. There's a jam called happy mapper, and I was really excited about it, but everyone at work said, hey, you've got to use no-ciguri happy mapper. I was using the website Ruby Toolbox to find these cute little statistics. So someone said, hey, look, I don't like your happy mapper, so I'm going to make it to no-ciguri happy mapper. So yay, look, I found it. That's me, I was putting some commits there about updating their examples, because I thought they were really bad. So let's talk about happy mapper a little bit and how it's used to actually deal with XML and sort of play. It's as easy as one, two, three. If you notice the XML at the top and then you see the class that maps to the XML, so number one, you include happy mapper. Number two, and I likely didn't even need to do this, but there's a tag call that matches the tag of the XML. And number three, I define all the elements below. That seems pretty good, right? Let me do it again. One, two, three. And four, how do I handle that guy? Public schools, public schools. Okay, so four, actually what I did was made a little subclass in the middle there. I just did the same thing again. I have a little country class, happy mapper, it's got a tag country, and I use attribute and text node so you can deal with attributes and text nodes. And here we go, I've got an element that says country. Isn't that exciting? All right, so I got it. What about for this douchebag? I mean the guy that came before me, he built an element that had some crazy name. Well, oops, it's easy to deal with because all you need to do is specify a tag, so that's really nice, right? What about where streets have two names? In this case, you can say I is many now. See that has many? It even highlights if you're doing the Rails thing and it shows it to you, that way it infects me. See? Totally. All right. Parsing. Parsing is super simple. Happy mapper puts this little parse method on there and that's it. It's a big kid's meal. Dealing with namespaces and also some other sort of fancy things, XPath in there. So here we go, namespaces. You put a namespace up there and it sort of defaults all those, but you can override a namespace. By default, it's going to grab everything underneath the sign that's there, like we have in our thing. Well, you can actually specify an XPath to make sure it only happens for this gallery instead of all galleries. See that? Great. So what about some other things? Like dealing with stuff I deal with, this situation right here. I have these multiple classes inside of there. So I had to deal with composition as a model, a module way of dealing with the composition here. So a lot of these have very similar functionality, yet they had all different namespaces. It was very frustrating. So I thought, ah, I'll do this, but it doesn't work because Happy Mapper assigns it to the class. So I figured out, hey, let's program like a Ruby programmer and I decided to use some actual fun Ruby programming into the included method there. And the object that pulls in, I define those things that are shared between all of them. It's really easy to do to have, like, sharing this publication information across the whole way. But what about 2XML? Particularly the gross stuff with all the namespaces. Well, they didn't have it, so I wrote something on it and put the I'm Happy Mapper part to it. You can check out this information about it. Thank you very much. Okay, who likes coffee? Isn't that the law in Seattle? Like, you have to like coffee or something? Yeah. Anyhow, I was one of the organizers of Great Like Ruby Badge last year and we were thinking about something cool to do for the attendees and I happened to be friends with one of my friends and he was like, and I happened to be friends with some guy who roasts coffee. I live in Ann Arbor, Michigan, so this is like Michigan coffee. And so he made, he designed these bags and stuff for our conference. We gave them lots of people at the conference. And so now whenever I go to a conference I lug around a bunch of coffee to hand out to people in exchange for them telling me a story of some kind. So I have a bunch of coffee in my bag and if you come up to me and tell me a story, I'll give you a bag of coffee. But I'm going to tell you a story real quick which is coffee it's made like before you make it. So coffee comes in big bags like this from some guy in Central America or Africa or something. Hopefully the people who take the coffee were not morally abused. In this case I don't know if you can tell very well from there, but the beans are kind of green when they show up and they actually have a lot more caffeine like this than they do by the time they're roasted. But then you dump a bunch of coffee beans into something that looks like that which is essentially a big metal drum that gets very, very hot. They're in there for about 15 minutes or so they're about 470 some odd degrees and then that's my friend John and they come out, cool down and they end up in a bag and these are some of the sketches and this is the little logo thing that came up with that's Billy Slutcher who grew his information about the coffee and come find me so I'm just going to stay in here and have any slides I was just going to talk to you guys really quick about my experience getting pulled into the open source community and especially getting pulled into Ruby and present you with basically four concrete steps or if you've got anybody else, any friends or anyone, first dogs, whoever that you want to teach Ruby that you want to get involved into the open source community sort of how you can help them to do that help them avoid some of the stags so step one, show them Ruby is awesome step two, do something with them step three show them the community get them hooked up with the community and step four, teach them the game so step one show them Ruby is awesome there's lots of different ways to do this you can show them the project that you did if they're a programmer you can come up with I love why is pointing a guide to Ruby if you haven't read it, it's pretty awesome but whichever aspect of the language is going to get them excited show that to them because if you just toss it out there and then you're like, hey look at this then they're going to get around to it but if you actually do something with them then they'll be like, oh this is fun if you hook them up with the community that attitude of this is fun, I like to do this it's going to be self-sustaining because they're going to get to know other people in the community they're going to get to contribute to stuff it's going to start to maintain momentum and step four, teaching them the game because frustration is the thing that shuts down people trying to learn new skills basically if they delete a couple hours worth of code they're going to throw your language out the window and never look back so that's it thank you Jake that I've been pouring my heart and soul in my name's Ryan Sobel this is me when I had a shorter hair I'm a Ruby in Rails developer and an independent contractor by trade if you have any questions about my talk because I'm going to go kind of quick this is my Twitter handle email address and if you want to get a head start on everybody go to mangoRB.com so what is mango who here in the audience by a show of hands we've heard of Jekyll the framework cool and Sinatra so think of mango as Jekyll on Sinatra it's a website framework it's dynamic it's database free it's built for small teams and developers, designers and writers it's open source and it uses Ruby 1.9 so why did I build mango well like I said I'm a web developer by trade and I love the Ruby universe but it's really painful that I have to leave that universe and I have to leave that universe to collaborate with other developers, designers, or writers so my goal with mango is to make it easy for others to collaborate with me using the language and tools that I love it does this using activity based collaboration write, theme publish, extend and maintain these are the five areas that mango tries to solve so how does mango make it easy to write well for me the environment my writing environment is the biggest thing this next slide works for me this is a slide of text make you can substitute this for Clips, or Vim, or Emacs this next slide doesn't work for me this is where it presses admin interface so mango takes the approach of using files instead of using database records to store your content content formats include markdown handle ERB and liquid here's an example of a content page at the top this is Lake Jekyll has a yaml front matter where you can define your metadata down below is the body notice that your page title is included from your metadata mango is also really easy to theme you can get started very simply by using static template files like HTML CSS, or JavaScript but if you want to use dynamic template files it also supports handle, ERB, and liquid for those as well as scss and sass and copy script too so here's an example of a template file notice we're using the same page title from the content and also this is where we're pulling in the body from the content file mango is also really easy to publish because it's built on Sinatra and uses Rack so I like to deploy our Roku and it's as easy as Git push for Ocean Master but for non-programmers like some of my friends who are designers what to do for them well I tend to recommend them to use Git because of version control just basically means that your content files have history and this is kind of the environment that they get to work in this is an example of Git tower which I think somebody was talking about earlier today also mango supports drag and drop SFTP publishing which is something I really miss from my days of working in PHP mango is also really easy to extend so one of the big things one of the reasons why I wrote mango is because Jekyll doesn't support a server-side processing it just generates a static file so there are some things that are really important for me on my projects like HTTP responses and PHP that includes things like redirects browser caching minify my gavascript and CSS and also support for the JavaScript frameworks like back on JS also server-side processing is important when I want to communicate with customers email and newsletters and device location awareness like if I want to send specific content to mobile devices to geolocation and to language translations and lastly mango is really easy to maintain because you can solve it as a Ruby gem and you upgrade using bundler and it respects semantic version so mango means collaboration, thank you my name is George File I have been working at a company called New Relic and the problem that I've been dealing with lately has been how do I get various websites to really behave together and to play well with others this is a problem I'm dealing with in our company and a lot of other people are dealing with this so before I answer that question I just want to go back to the history a little bit Web 1.0 which was really about the portal there was personalization and we had things like web scraping we had offline data sources we had lots of hyperlinks and basically every portal behaved like a castle you went to the portal, you got to see it you didn't really get to do much with it but just to view it and access it Web 2.0 made it a little bit better I could take data from various sources put it all together, make it a useful tool that I could look at all the information presented on a map we had things like JSON and XML coming into play we have simple services to do things like hey I want to pay for something I want to display something on a map and you also have things like live syndication so I want to have some feeds show up somewhere else that's pretty easy to do so we have lots of content mashups pretty good but again the data is not really working together so let's look at what I see Web 3.0 is evolving to be and you know I asked on the web I did a search to see what people were thinking Web 3.0 would be lots of different answers a lot of them kind of vague Conrad Wolfram's answer which was he sees it where the computer is generating information rather than him and what I see that is meaning is that the data is working together with you so we have a few tools out there like RDF semantic formats howl we need to have some sort of a multi-directional data flow data is coming to me but it also is going back out we want to have some form of synchronization that's particularly important and we really want to build federations of shared services where it's not just one tool doing everything or exporting the information you really want them to work together so we have a whole bunch of tools that are available out there now like OpenID and OAuth and you've got things like being able to show things off at Twitter and you've got Facebook apps and you've got RESTful APIs which can allow them to really work together and what's really missing from the equation is having semantic transactions you really want to be able to have data that I'm creating on one site that I can have send over to another site and I can update it on there and it comes back and this is a particular problem when it comes to the help desk this is a very typical display of what's out there in terms of how companies manage customer support there are all these different systems that work together to just deal with a particular issue of solving customer support problems so how we can resolve this there's this new consortium called the Network to Help Desk I wanted to point you out to it this is like one of several new initiatives that are actually working to create shared, cooperative websites where you can actually there's an API on this website and when you go at it there's a whole bunch of folks some of them are actually competitors but they're all agreeing to work together to create a shared standard for how I can take data and have it available on other sites and have them be able to send updates and have them propagate so look at some of those logos at the bottom and this is an open standard you can go to networkhelpdesk.org take a look at the API see what you think encourage everyone to think about how can we work together to create shared semantic common APIs that we can use together and therefore we can have all of our sites just sort of play nicely with each other so that's about it, thanks so my name is Gary Bernhardt and I would like to talk about fast cycles there are all kinds of cycles that need to be fast but the one that I want to talk to you about requires a demo so no more need for slides I'm going to pull up a piece of destroyall software which is the company that I am building right now and it's called the download policy it takes a screencast and the user and all it does is decide whether the user can download a given screencast and I'm going to show you what TDD looks like when I do it so I'm going to add a spec called it is not allowed for anonymous users I'm using the device so an anonymous user is just nil sadly and I'm going to invoke my module ask it whether the download is allowed for this screencast with an anonymous user and that should be false there's my failure run over here add a line of code that was python sorry still happens occasionally and there I'm green now the reason that I've shown you this is that the length of that cycle where I was running the code was so short and this is I think very important and in the ruby world spec running often looks more like this that is not good this is much better so that's my live directory which contains sadly still less than half my specs so they're moving over there slowly as I extract behavior from models and controllers and helpers move it into naked objects but you can see that instead of 6 seconds I took 600 some milliseconds so it's roughly 10th of the time and that one spec that I showed you the download policy has an end to end run time up to 160 milliseconds so that's something like 30-40 times faster and that allows me to hit my red green cycle in full for a minute or often even less than that so what I do in order to achieve that I lie by the way there are slides is I take all these things that I might interact with models, various rail stuff routes, helpers and I need to eliminate all the crap that these things pulling this slows me down so basically everything is going to depend on core rail stuff that I neither understand and rails itself has about 3.6 seconds load of time for me on my box I'm 187 if you're on 19 that penalty doubles roughly so you're paying about 7-8 milliseconds load of time, every time you load rails so basically what I do is stuff everything all the time and there's a word for this it's called London style TDD or isolationist TDD but the style in which you only interact with big things you never integrate directly with another class in the system whether you wrote it or not and this first of all makes your specs extremely fast I average about 1-2 milliseconds per spec and it makes your end to end times fast because you don't have to load dependencies and of course whenever I speak about this in public as is my nature I state the most extreme form so I don't literally isolate from everything all the time but I think it would be a good idea to start thinking harder about isolating from dependencies because you want these two benefits you want the faster cycle times and you want the design benefits of seeing things like in my spec what am I integrating with? well I have this stuff at all so here's the full set of things I could possibly integrate with in this spec because if you look at the requires the only thing I require is download policy and download policy is this module so there's nothing else in the code path I know that this is my full set of integrations and that's very valuable very valuable for design so that's all I have and I would love to hear you guys come up to me afterwards and tell me why I'm an idiot because that happens a lot with this topic thanks lightning talk after me so last chance if anyone wants to get in so that's me I go by being insured on the internet I used to live here in Seattle a few years ago and now I live in L.A you know there's not been enough heckling today I'm especially disappointed in Ryan Davis there you go so I work for a company called engineer and they're one of our sponsors and this job is unlike any job I've had my whole career or whatever I've made websites usually for other people and it's the technology I've used has changed over the years and a few months ago I started an engine yard I still make a website here and there but mostly what I do is talk to people and get them excited about stuff and my title there is open source cheerleader and Dr. Nick is my boss and if any of you know Dr. Nick there will be costumes at some point so I've primarily worked on promoting or evangelizing or whatever and expanding my gaze to include J. Ruby and I want to share some of the things I've learned in a short time so I don't have all the answers I don't have some definitive things here but I've been there about three months and it's a fairly new role in our industry in general so it's not real clear what to call this thing people say how would you do it it's a great question so here's some things I've learned people love free shit we made Revenius stickers t-shirts and we give them away you just have to email us and we made a whole bunch we gave away BrailsConf people love it that's for a special shirt I'm getting there captain we also made stickers that require zero effort except for emailing us although we have other stickers that are like merit badges that you do have to do stuff and people love that it's such a small thing I have some on my computer and we expected that people would ask for these things but what's happened is the opposite it's people who don't know about Revenius see these things and then get interested and then later excited and participate in Revenius we've tried to turn up the engagement in the conversation with the community so the first thing I did which was super simple is I just followed all of our followers back everyone got excited about that it turned up the dialogue of a lot and it also enabled everyone to direct and message us so if they need to send us something private or whatever they can sometimes maybe it's the private gist of their statuaries they don't expose their class name and also people can just email us about anything outside of bugs and issues but this is also where people write us to ask for free shit and we send it to them we've also coordinated full events so at RailsConf Dr. Nixon if you use Revenius during these three days we'll give you a sticker we have like 50 people try out Revenius that have never played with it for a sticker that's awesome that's such a cost effective investment it's great it's such a small thing it's better than in the door coming up on August 5th is RBX day where people all over the world who are into Revenius are going to run their apps on Revenius and send us a performance report you know submit bugs and we've always been asking for stuff but by making it an event today making it like a party we're telling people to take pictures and wear your party pants people are getting excited about it like 80 people coming to their office to test their apps we're trying to be more open about what we're doing so we made this status board which is very fuzzy of our progress on these different features for one night support in Revenius and people got really excited about it they were like oh I could tell that Windows support is pretty far long but Symbol is not and you know like just little things like I posted a picture and Evan working on how they were going to deal with I don't remember what um nothing in mind maybe but you know like people got excited like oh this is how the mad scientists work and we also open sourced all of our collateral all of our logos and stuff so people in South America may teach t-shirts rather than ordering one from us and dealing with shit and um our project you know just goofy dudes so all of our communication tends to have that kind of voice too it's turned some people off a little bit but overwhelmingly people have been really excited about it so like this post was where I announced the status board but it's written in this fictional dialogue between Evan's grandma and Evan's grandma asking for some sort of progress support on Revenius and it's silly like that's the kind of people we are and you know we also take pictures like this and that's not totally staged you know Evan just gives me movies and when I send out stickers to people at least in the beginning before I got to a world I've written like handwritten notes and I signed all of our correspondence XOXO RVX and like people have reciprocated you know people tell us that they love Revenius you know so it's um like that's the voice of us we have our project and it's got a long way to help participation and like I said I've only been doing this for a few months so I don't know how successful it's going to be but that's what 600 T-shirts look like and we got rid of those at RailsConf in like three hours and then I've got another 600 at my house or part of 600 that haven't been shipped so if you want Revenius T-shirts just email community of Revenius.us and that's the map of all the places that we've shipped shirts and stickers so there's at least you know people in most corners of the world who have got excited about Revenius since this to sort of like open engage in the work that's it I love you I spontaneously came up with this talk this is the talk that I was going to do if I didn't do the other talk that I'm going to do in about 30 minutes so now you can go both this one will just be abbreviated alright so I am with Living Social and what I want to talk about is some of the applications we build are for the consumers especially on the mobile side and some of the applications we build are for merchants so what we're doing is protecting consumers with merchants and things like that and we don't currently have apps for consumers or within the social app so we were challenged to kind of come up with this and I really