 Anyway, for question, if you've ever used Nocogiri or any other XML parser, or at least know what it is, can you raise your hand? More importantly, keep it up if you actually enjoy using it. Exactly, I thought so. So for the past about eight months, 199 days to be exact, hoping to do this tomorrow, so it could have been 200, but alas, I've been working on a alternative to Nocogiri as an XML and HTML parser in Ruby. And, okay, nice, as some quick examples, it's about 91% Ruby according to GitHub. It uses small native extension to be a little bit faster. It's not exactly at web scale. Then again, it's not Node.js, so sorry. It runs on MRI, Rubin is in J Ruby. It's for that safe, unlike Nocogiri, which is not. As a quick example, basically, on Rebedius, on our production systems, Nocogiri crashes about 30 seconds in consistently, meaning I cannot use it at all. If it will crash occasionally, that's fine, but every 30 seconds is kind of a pain. It supports XML and HTML. Most existing parsers out there except Nocogiri just do XML, because HTML's a total pain in the butt. It has support for XML namespaces, Xpath, CSS electors will be coming up, and it doesn't use system libraries, such as libxml. Probably pretty sure that most people that have used Nocogiri are familiar with how long it takes to install it. It's because they vend their libxml, which takes quite some time. For example, on my own laptop, Nocogiri takes about a little under two minutes to install. This is from a local file, so there's no, like, RubyGems network involved. On the other hand, the library I've been working on called Ogre, it installs in about 1.2 seconds, and that is including compiling a native extension. And the last bit, so you can install it from RubyGems called gem install Ogre. And so that's it. Well, thank you guys. Yeah, I hear you see me today in the morning. I'm a bit confused because I woke up really, really sick, but, well, when I was back home in Berlin, there was Florian Griecher, and he told me, yeah, you should actually always have lightning talks and conferences. Yeah, so I do a lightning talk here. And my lightning, yeah, my name is Malvina, you can find me there on Twitter. My lightning talk will be about sketch noting, so let's sketch note because I know that you want it. So now you probably think, oh, that girl might be an illustrator and it's totally easy for her to do a sketch note, but actually no, I'm working with Avanda, so I'm a Ruby developer, like you guys, and girls. So let's see what we need for sketch noting. We need material. Actually, we just need some paper or a little book like this. Here you see I made this whole thing today in the morning, and you need a pen, and it doesn't matter which pen, just take a pen that you have. And yeah, maybe then comes to you the fear of the empty page. But always remember, done is better than perfect. That's what I heard in Wroclaw earlier this year. So you might wonder how to start, and yeah, I can tell you just play with faces, fonts, and well, if I say forms now to have three Fs, then you might think, hey, what's forms? So I mean shapes. So how to play around with faces. Yeah, you actually, no, that's something missing. Yeah, whatever, you have a circle, then you put some eyes inside, and you can have a little mouth, and if you want, actually that's already enough, but if you want, you can add a nose, and then if you play around with the mouth, like having it going up or down, and then you play around with the eyebrows, you see that you get different expressions on things. So probably you can draw it behind or before things that you just heard in the talk, like what we've heard before, write down something, and then you can put like these kinds of smileys if you liked it or disliked it, or maybe you're a bit skeptical. And yeah, if you want to, for example, you want to include the people who are talking, and then you're not sure if you will recognize them later on just like put their names and then everything's fine. So fonts, it's very nice if you have like different styles of fonts in there, you can just play around, maybe you're able to speak Japanese and you can do some nice signs, but if not, no problem. And then yeah, we have shapes, and there's basically just one rule for shapes. It's first you write the things and then you draw the shape around it, like first you write Barcelona or Popono, and then you put the shape around it. So what we can do then here, I met in the last day, this girl called Nadine from Catalonia, and I asked her about special things about Catalonia, and she told me like two words, like Rauta and Sen, which is very popular here, and she told me about this Lagimaste San Lorenz and the Botifara and the Pig Slaughter Party, and actually I let her write down the Catalonian things, so I also have her handwriting in there. Yeah, and so you can get started with sketch notes. Thank you. Hi everyone. My name is Tobi, I'm from Berlin. You can find my Twitter at Pregtop, and today I want to tell you a little bit about Shoes 4, which is using Ruby for GUI applications, so graphical user interfaces. So first, what is Shoes? So Shoes is a GUI toolkit for or a DSL to build GUI applications. It's cross-platform, that means Linux, Windows, Mac, you have it all. You can package your applications so that they can run on any platform, which is awesome. You write all Ruby all the time, you don't have to write Java or C or anything else, you just have Ruby, which is awesome, and most of all, Shoes is simple. Shoes, I often think of Shoes kind of like, what Ruby is to Java is Shoes to SWT or other graphics libraries, because it's simple and it's fun. Because of that, I love Shoes. Because, quite frankly, ever since I started programming, which was many years ago, I always wanted to have two big graphical user interfaces. I wanted to do that. I just wanted to write a little nice application for myself that I can use and I can have fun with. But everything that I used kind of sucked, at least from my perspective. Your opinions may vary, but then I saw Shoes and I fell in love with Shoes. One of the common questions at this point is, isn't Shoes that? Like, isn't that the thing that Y built some time ago and now it perished? No, it's not. There are people around, like me and other folks, like Jason, somewhere here, who's going to give a talk tomorrow, who are maintaining or writing a new version of Shoes, which is called Shoes4. What's Shoes4? Basically, we all got together and said, okay, we've write one new implementation from scratch. We aim for almost 100% compatibility with Shoes3, dropping some features like video that were rather not used either way. It's a complete Ruby rewrite, so it's all Ruby all the time. We have a pluggable backend. I'll come to that in a second. And the default backend right now is JRuby and SWT, but we got proof of concept implementations of CRuby and QT and even Opel and the atom shell from GitHub. So yeah. Pluggable backend works. How does it work? We have one DSL layer where the domain specific language is defined and then we have a backend that actually does all the drawings. So right now JRuby and SWT does the drawing, but also we can generate HTML or JavaScript, whatever. Enough talking, some samples. This is just a simple, whoops, you don't see much, simple animation, but let's get to the next one. You can have a little clock, nice, right? You can play Snake and then Crash or something. And also, which we've been working for some while, this is Tanks Bank, but there aren't actually any enemies here. So a friend of mine named it Friedenspanzer, which is German for peace tank. So a couple of more examples. This is my first shoes application that I built. It's a Twitter client. You can build music players. This is my favorite shoes application myself. I use it to track Pomodoras. I just had no Pomodora tracker that I liked. So I wrote one myself that works on my platform because with shoes it's nice and easy. You can control drones, save the hack, teach children. I'm running slow on time. Simple app. This produces that. It's still downloading the image, pending the Wi-Fi. Nope. Good. Why should you care? So you're a web developer, right? Probably. Or you write command line applications. So why do you care? Well, it's about fun. And I like that I've been backed up by the last couple of talks. It's fun to write something like that. It's another tool in your toolbox to do something awesome. And of course it's there to teach children. And for the exact same reason that you put goggles on a dog. It's just fun, you know? So the reason is I love shoes. And I love shoes so much that this presentation software is written in shoes itself. So this is a shoes application and you can drag it around and you see the code of the slide there. Yeah, thank you. Hi there. Awesome conference. I'm coming up on this stage with the assumption that there is a fair amount of people in this room who like coding, right? And who believe that to be able to code is a very powerful and valuable skill. In addition to that, I'm sure that many of us are very passionate about sharing what we know with others. And I particularly like programming communities, especially the Ruby one, because of our friendliness and openness to newcomers and because we are very keen on sharing what we know, our knowledge and our passion with them. I personally have learned a lot, a great deal this way. And I think that the constant income inflow of new people and new ideas is what moves the community forward. So if you agree with me, I think that you might be interested to learn about and probably get involved with the upcoming Europe Code Week. I've talked with a few developers and I've noticed that they haven't heard about Code Week, which is a real shame, at least in my opinion. Code Week is an initiative which first launched last year by nearly cruise young advisors with some help from the European Commission. And this year will be the second edition of Code Week, which will take place from the 11th to the 17th of October. It has a simple purpose. It aims to bring more people interested in coding by showing them that coding is fun, that coding is interesting, and that it's a very powerful tool you may have. So how does it work? People from all around Europe are encouraged to organize local code events or workshops during Code Week. The events are mostly independent from each other and anyone can organize a code event, including you, especially the people from this room. Up until now, we have over 400 events planned, participating for Code Week, from countries all across Europe, including ones from Turkey, from Moldova, and countries you may, all countries. So the event has almost no, there are almost no restrictions about the format of the event. It's preferable that the event is as beginner-friendly as possible and as accessible to people with little or no previous programming experience. But even that is not a hard requirement. It can choose your own tools, your own format, your own technologies. These are all up to you. The target audience are people from all ages, especially students and children. And just any event of any format which will open the doors to coding to more people will do. So let's say you're interested. What can you do? There are at least three things you can do. Firstly, you can look for existing events in your local country and get involved by helping them. There are quite a lot as you already know, but nearly not enough. Secondly, you can organize your own event. It's really not that hard and it's extremely fun and extremely rewarding. And there is a great guide on how to organize your first event on the Cold Week website. Thirdly, you can help with online stuff like gathering beginner-friendly programming resources in your local countries language or just popularizing local coding events or just the Cold Week initiative as a whole. So if you decide to get involved, the first thing you should do is find and contact your local Cold Week ambassador. Each country has at least one. Spain has five, for example. And these are the people who are responsible for encouraging local events to happen. They should be in the loop of what's being planned so get in touch, contact them. This talk, along with some links and some contacts, you can find on bit.ly slash Cold Week Barucho or you can just Google Europe Cold Week and you'll find it. And you know, if opportunity presented itself, I would probably gladly join an engineering effort to create a virus to automate spreading the passion to cold to other people. But since that's not possible, thank you. Okay, I don't have time for you to clap. I like Ruby. I don't like Listerals. Listerals are ugly. This is ugly. That's a Listeral string, it's ugly. 23 Listeral numbers, ugly. Boolean Listerals are ugly. Array Listerals are also ugly. What I do like is calling methods on objects. That is pretty. Look at that, beautiful. I like newing up classes. I find that beautiful and pure. So, let's burn our Listerals. Let's program in Ruby without Listerals. Go. All right, first of all, we have to use the right Ruby. Ruby 2.0, patch level 451 is the correct Ruby for doing this programming exercise. It doesn't work in 193 because the date constant is not there until you require date. This will become important very soon. Okay, so Booleans, Booleans are easy. You'll see this is a new IRB session. If I do not date, I get a false because everything's truthy and opposite of that is false. Awesome. Now if I require date to s down case, so not literal date string, I get true because the first time you call require, you get true. Awesome. No literal Booleans. Okay. You've got to be careful though because the second time you call it, you will get false. So just keep track of what you're doing. It's very intricate this programming exercise. All right, numbers, numbers are great. So now we've got date, I've required it in. You'll notice this is line four of my IRB session. So I can do date.civil.year and date.civil, I don't know why I use that. I could just use date.new, but like, a date just has 4712 BC, that's the year, it just is. So we can convert that to a float as well. And of course, you can just add ones to these things or you could subtract it from yourself, you get zero. And then you just do maths to get all the others. Just get on with it. All right, hashes, hashes are great. I'm gonna use date again. So date has some great methods, a load of them, but this one is the best. In fact, it's the best method in Ruby, full stop. Underscore jizx0301. Now jizx0301, I believe is a Japanese date standard and the cool thing about this method is when you pass it a string, which is a valid date, you get a date, but when you don't pass it a valid date, you, oh wait, oh yeah, when you pass it something that isn't a date, you get an empty hash. That's pretty cool, an empty hash. Yeah, in the first version of this talk, I passed it the literal hash please, but then I was using a literal string, so it was ugly, I had to get rid of that. All right, arrays, literal arrays are ugly. So I struggle with this because you can do lots of things, but they're all sort of either cheating or not funny. So what I could do is I could get that hash that I just made with the jizx0301 method and I could call the array function, which makes an array out of a thing and then I'd get an empty array, which is funny, but it's cheating because I've used the word array, right? Or I could do object methods, which is a list, and then subtract object methods, which is also a list, but that's not funny, I mean that's just a property of arrays. So wait a minute, what if I close this IRB and start again, right? Date methods in that new IRB, remember the date constant is there, but it doesn't have any methods that aren't on object, right, so I can just take that list and take away object methods, beautiful. Of course now I've got nothing that I built up before, but never mind, we'll just do it again. All right, nil, nil's really easy, nil's everywhere and really. So my favorite way to get a nil is to grab a hash and then call the default proc method. Who knows what default proc does? Oh, a few people. All right, so there's a way of initializing a hash with a default proc, so what that will mean is if you call a key, like try and access into the hash and it's not there, it will run this proc and give you that pretending it's the value. So a normal hash doesn't have a default proc, so there's a nil. Oh, wait, it doesn't work, right, because I forgot to require date. So let's require date again, call that, I've got a nil, there we go, beautiful. All right, let's do strings, strings are fun. So the first method on self in an IRB session is 2S, that's handy, so I could inspect that and I've already got a string, but it's not the string I want, I want to get a specific one. Hi, everyone. Yeah, I'm gonna talk about my favorite algorithm. My favorite algorithm is called the Burrows-Wheeler Transform. This was invented in 1994 by Michael Burrows and David Wheeler. It's used in data compression and genomics and stuff. It's my favorite algorithm because it has this kind of extremely high cleverness to complexity ratio. It's sort of simple enough for anyone to implement, but it's kind of mind-blowing that it works, so I just wanted to show it to you quickly. The way it works is you take a string, it operates on strings, so you take a string like banana, and then you write down all of the possible rotations of that string, so if you rotate banana by one character, you get a nana with B on the end. If you rotate it again, you get the naba. If you rotate it again, you get a naban, and if you rotate it again, you get nabana, and then the final rotation of that string is a banan. So once you've got this table of all of the rotator, the rotations of the string, you then sort it alphabetically. So now you've got this alphabetical table of all the rotations of banana, and then you just read off the right-hand column, so NNBAAA, that's the output of the Burroughs Wheeler transform, so that's pretty easy to implement in Ruby. This is my Ruby implementation of it. Let me show you briefly how this works. We start off with a string, like banana, and then we take the characters of that string, so split it apart into its individual characters, and then we call each index on that array of characters to get an enumerator of all of the indexes, so zero, one, two, up to five, and then we call map. We map the rotate method of the character's array over that collection of indexes, so what that means is rotate that array by zero and then rotate it by one, all the way up to rotating it by five, so that's our table of all the rotations of banana, and then we sort that array to get the sorted rotations, and then we map last over those to get the final character in each array, and then we just join them together, and that's the answer. So now I've got that Burroughs Wheeler method, and I can call it with the input banana, and I get my NNBAAA on it. If I pass in a longer string, like the rain in Spain stays mainly in the plane, then you get output that looks like this. So the point of this is that that output is easier to compress than the original because it tends to put similar letters together, so you could use some kind of run length encoding scheme to compress this instead of storing I, I, I, I, I, I, you could just store six I. So that's good, but the downside of course is that it's completely scrambled our original string, but the amazing thing about the Burroughs Wheeler transform is that it's reversible, so we can write an implementation that makes that go backwards. But how's that possible? At first it looks like we've lost, we've thrown away too much information about what order those characters have to go into, but actually we haven't, we've got enough information to be able to reconstruct that table. I mean firstly we know that there must be six by six characters in that table, and also we know what the last column is because that's the string that we've got. But because each row of the table is just a rotated version of the same string, we can rotate every row and get another version of the table containing the same strings but in a different order. So if I rotate all of the rows, that tells us what characters are in the first column. We haven't been told what order they appear in, but we know that the table's sorted alphabetically, so if we sort that alphabetically we now know what the first column of the table looks like. And of course we also know what the last column looks like because that's the string that we've got. And you can keep playing this game. If you rotate the table again, you can get all of the rows of the table in the wrong order and then you can sort it alphabetically to get them in the right order. And then you can just keep repeating that. So you fill in the final column from the string you've been given. You rotate all of the rows to get the same strings in the wrong order and then you sort them to put them in the right order. Fill in the last column, rotate them and sort them, fill in the last column, and then rotate and then sort. And then the last time you fill in the last column, you're done. The rows are already sorted and there's the string we started with. So this is pretty easy to implement in Ruby as well. This is my implementation. I don't have time to explain how it works. But now if I pass in my string into inverse borrows wheeler, I get the whole table, which does contain the string banana. If I pass in my encoded longer string, I do get a complete table, which somewhere in there contains the original string. Now the problem is, I don't know which one of those is the original, but you can fix that by just putting a marker character on the end of your original string. I'm gonna use the dollar sign so that when you get this table out, only one of the rows is gonna end with the dollar sign and you just pick that one out of the array. So the bits in green here, I'm adding a dollar sign onto the end of the characters and then when I decode it, I just pick the row of the table that ends with a dollar sign and then I chop it off before returning it. And then it works. When I encode it, I get a string that contains a dollar and then when I decode it, the decoder knows which row of the table to pull out. Thanks very much. Hi there, good afternoon. As you said, my name's Phil Nash. I am a developer evangelist at Twilio. Twilio is a cloud communications platform that allows you to send and receive text messages, make and receive phone calls. But that's not really the point of this. My problem is that my code is more popular than me. Now I don't mean on GitHub and sure I've got some code which has some stars, which is more than my followers, but I don't really know what following means on Twitter, on GitHub or whether a star means it's any good or not. What my problem is, is that my code has a better social life than me. And this gets embarrassing. Let me give you an example. Who recognizes this? Right, brilliant. Secret of Monkey Island, insults sword fighting. The story of Guy Brush, Three Pud, the swashbuckling pirate wannabe who wins his fights with insults. And also as a Twitter user now, if you were to say on Twitter, you fight like a dairy farmer, he's gonna jump in and tell you that's appropriate because you fight like a cow. Now, as you can see, like he only has 429 followers, that is more of my girlfriend, but not more than me. So that's not that much popular, but sorry, this is where he does. But he has more conversations than I do. Bastard. And you get like, if I ever get a notification on Twitter, it goes off in my pocket and it's normally him getting something, not me, retweets, favorites, messages, all that kind of stuff. I particularly like this recent notifications because that top response is actually from what I'm pretty sure is another bot who on occasion says you fight like a dairy farmer and then Guy Brush responds to him and then he responds back again, something weird. And the bots are now conversing amongst themselves. What is going on? So, there's the code actually. You can go and make one of these yourself. It's based on a gem called Tweet Bart, which is written by Corey Haynes. He originally wrote it to say good morning to people who said good morning and rapidly ran out of rate limiting on Twitter over and over again. So that's where you can set the response frequency. Guy Brush responds to everybody because somebody says how you fight like a dairy farmer a day, but not too many of them. And that's how you use it. And you can go and fork this. And actually, it's quite wonderful because Guy Brush's suit would now speak French as well. And so, if you know the French forum, you fight like a dairy farmer, you will also, and you set that on Twitter, you will also get a response back in French. So there must be somebody here in Spain who can sort that out for me to make him a bit more multilingual. I've got another example, though. It's another Twitter bot or something. You guys recognize this, Chuck Norris, Vin Diesel. There used to be a bunch of websites which liked to make up stuff about them and that used to be fun. Here's a quick bit of code, you don't need to see that. So there's some hilarious things that people say. I think this might be DHH's approach. And Vin Diesel doesn't have sunscreen, him and the son of agreement, which is nice. So you're already starting to see that these guys are pretty popular as well. They've got some retweets, some favorites. The second response down there is I love you, which I can't remember the last time somebody said that to me on Twitter. But it's more than that. Chuck Norris has 267,000 followers. I set this going, I think, in 2009 or something and it didn't do anything about it. And then later, bang. And you're like, Vin Diesel, 442,000. Now you might notice in this, this is a screenshot from today. And the last time he tweeted was in October 2012 because the site went down. There's actually a Chuck Norris Facts API which returns JSON, which is really very nice. But nobody decided to resurrect anything for Vin Diesel. So he hasn't treated since October 2012 and he still gets more followers per day than I do. Bloody bots are more popular than I am. So if I can echo kind of one of the, some of our previous speakers as well, write code, have fun, but beware, it can come back to kind of bite you in the ass and be more popular than you. That is all I have to say. Thank you very much. Hi, so as I already said, I'm Grzegorz, I am nomadic programmer. And within the next four minutes, I want to share with you three lessons that I learned over the last eight months when I was constantly traveling around the world, working as a freelancer and basically living in hostels, staying at my friends and in some guest houses. So to get to first lesson, we need to go back in time a little bit. A little bit done a year ago, I got burned out. I had really cool job, really great team from which I could learn a lot, but suddenly I stopped enjoying my work. And what do you do when you stop enjoying? Well, I started pushing harder and when it didn't work, I started pushing harder even more and then I ended up being burned out. And this was really, really horrible feeling. I wanted to give up my developer's career. I wanted to quit programming and doing something else, but as I can't do anything else, here I am again. So the lesson number one is do not get burned out because it's really bad and now I am sure that it's better to prevent it than to recover from burnout. What can you do? You can of course take some break. You can switch teams at your work. You can start some pet projects. You can go on holiday for a few weeks. Just try to avoid burnout because it's really, really bad. In my case, it didn't let me to giving up my developer's career, but it led me to quitting my job and I had no idea what to do with my life. So I thought, okay, let's do something funny, like buy the tickets to the furthest place on earth and go there and think what to do. So this led us to lesson number two, which is about fighting my fears. I am a man of many fears and so are you. We all are afraid of lots of things. We just don't talk about it because these are our weaknesses. So I am afraid of heights and when I stay in skyscraper, I don't come close to the window because I'm then scared and I just need to keep the distance and when I swim, I am afraid of deep water. So when I swim, everything is fine and then at some point I realize that it's too deep for me to reach the ground by my feet and then I start panicking. Even though at just a moment ago, I was swimming with no problems. So fighting my fears was something that started with going to New Zealand. So it's farthest place on earth. I just bought ticket there, I went there, I left the plane, I had hostel booked for two days. So I left this plane and I said, okay, I'm in New Zealand. What can you do in New Zealand? They've got queues here, yeah? Maybe let's go and see some queues. So I left my comfort zone 17,000 kilometers from home and that's how my journey started and since then, now it's day number 256. I stayed over in more than 70 different places and I fought my fears. I jumped on bungee, I did scuba diving and I realized that I can do everything just because I left my comfort zone, just because I put myself in different contexts, led me to things that I would never do if I stayed at home. And story number three is about working in the middle of nowhere. This photo was taken in the middle of Taiwan in a hostel where no one spoke English, only Chinese, where there was no Wi-Fi, no hot water, but there was fridgey coverage. So I could listen to Spotify, I could watch Netflix and I could work and it appears that SIM card is actually the only thing that I need to work comfortably, okay, temperature, when you've got over 40 degrees, it's pretty hard. But what I mean is some people say and tell me that, oh, I like my office, I like working in office because it's so comfortable. And I say, yeah, and I've got a beach, like 20 meters from my work, from my hostel. So just after work I can go to my surfing lessons. So this is a matter of, this is a trade-off of comfort but not a trade-off of productivity. I can be productive working in Philippines and having these views just as much as I can be working in the office. So I know that lots of people want to try this lifestyle. So if you want to talk about it, just talk to me and I want to share and exchange my experiences with all of you. And until then, enjoy the conference, see you at the party.