 Come on, come on, come on. It's more fun at the front anyway. Here we go. So welcome back. Has everyone had a good conference day today? Oh, come on, you can do better than that. Come on. That was about the same, but still, two is twice as much. So let's say without any further ado, let's have Miguel to talk to us and add about whatever he'd like. Yeah. I feel like a rock concert with this guy next to me. I think I'm going to...anyways, so I don't have slides. I just have web pages and e-mails, so I'm going to quickly... My name is Miguel. I live in Germany, now in Berlin, and I'm going to share a personal experience with you. You won't have to cry, don't worry. I'm going to share how I, in January of this year, my girlfriend got a job offer in Berlin, and she wanted to move there. She was in Munich at the time. And so we started looking for a flat, like a normal person would do, you know? So the first thing I did, I went to this sort of web page, looked for a, you know, places to live. Normal, like, that's a mobility scout. It's a famous, at least in Germany, web search or a web-to-search flat. And so we only had a requirement. Her job was in the, like, really south part of Berlin, like in the middle of nowhere, but we wanted to live in the city center. So we sort of said, well, let's get something central, but at least, you know, you can reach your job in less than 50 minutes. So, okay, what is the approach? You take, look for some apartments. You take the address, and then you go for Google, and then you search for the fastest way to get there, and then, for example, in this case, it's around 48, 6 minutes. That would mean I would have to do this a lot, and then send the link to her. You know how we call that? That's super boring. So I said, well, maybe there's a way I can sort of automate this and impress my girlfriend at the same time, you know? And so I didn't know anything about scraping or scrapping anything. I actually only have one year from in Python, so let's see, let's check it out. Let's check the tutorial, copy all the code I can, and hack something. So I basically coded a scrapper that takes all that, and the idea was to get all the information, and then using Google API, try to add to that information the distance of the time that it would take to go to that place and get the best offer, maybe send her an email or plot it somehow and send it to her. So really cool. That's a scrappy class. It's scrappy, sorry. And it's basically a lot of fields you have to fill. I code a spider, and you probably know a bit of scrappy as well. So basically it's super hacky. It goes to the webpage, get all of these items you see here. So I get the price of the meter, which is the rent price, the square meters, the number of rooms, et cetera. Scrappy provides you something called pipelines that once you have already an item or something that you scrap, you can add any other information or add more data. So I took that, I wrote a pipeline that basically, as you say, at the time, take the item, I use a geolocation, get the place where my girlfriend is going to work and the place where that particular flat listing is, and I sort of calculate the best route using Google API. So far so good. I ended up with sort of JSON with all the information I wanted. So now, cool, but I cannot send this to my girlfriend because I mean, seriously. So I said, okay, let's use iPython. I use iPython at work. I said, okay, what? Let's do it. And I came up and used iPython in pandas and I sort of load everything up. What good thing is you can actually do sort of like SQL-like queries and I said in this sample I get only something less than 800 bucks and that the time to get to her job was less than 40 minutes, right? And I get a list of these with the links. Now, iPython has something good that you can actually run HTML and JavaScript like you can render that. And so I can basically, inside Python notebook, render a Google map with those points, actually. And I won't go into details here, but basically you use, from iPython core display, you use HTML and JavaScript. You have to write the JavaScript also there, which is not nice. And what I did was to write sort of like templates of the JavaScript, so each of those is a marker inside the Google map. And you can see I replaced the name of the variables and all the information that I required and then I sort of like compiled that code and then I can run it. And in this case, you can see the whole HTML is there and this is an object here that renders HTML. The bad thing is that it doesn't work statically, so you have to be running the iPython notebooks. And so in this case, I generated it and put it in an iFrame on my webpage. And this is the result. Basically, it gives me sort of a map with all the possible, with only the flats I want to take a look at. If I click one of the... One, it would give me the link to check it out. The time she would take to go to the MPI, I took the best approach, the fastest one, the size and the price of the... In Germany, it's like cold rent, which is without any other extra cost. So the experience, using this tool, my girlfriend got super cool and she started looking for an apartment. She was already in Berlin, I was in Munich, so she went to all the ones she liked and we got another apartment. And since April, we were living in one of the places I found, I found something. So what? That means you... I got that. What happened? So yeah, so I can say that... Yeah, you're out of time. Five minutes is up. So thanks very much, that was amazing. Okay, a little reminder of the lightning talk rules, which a good lightning talk host would have done first at the beginning, which is the speakers have exactly five minutes. That's no problem, no, no, no, that's the end like that. So if the speaker is nearing the end, I'm going to put up one hand. If I put up one hand, you guys need to clap fingers like this. Would you like to practice that for me? It's a weird sound, which if you're not expecting, a speaker would be completely freaked out. I'm so sorry. And then if I put up two hands, you're going to clap massively loudly and go, well done! Thanks very much. Next we're going to have Lynn, and I also would like to come up to the stage. Okay, fine, after that, it's going to be Larry Hastings. He's new, I too. Everything's great. Okay, take it away, Lynn. Awesome, thank you. So, side note, you and I are hosting lightning talks at PyCon in Portland, so you should come see us. All right, just a little pimping out here. So, yet another self-moding lightning talk. I'm Lynn Root, Roglin on the Interwebs, and I'm from San Francisco, a place that costs twice as much for a lot less than Berlin. So, the TLDR ramifications is a Python reference implementation of rammel. It parses rammel into Python objects. To give some context real quickly, what is rammel? Rammel stands for REST API modeling language and builds on top of YAML. Go figure. If you've heard of Blueprint or Swagger, it's a very similar concept, but it really is meant to describe your REST API. Within a rammel file, you define API endpoints, if it's secured by OAuth, if slash how it's paginated, et cetera. So, why would you use rammel or Swagger or Blueprint, et cetera? It gives you a single source of truth for your REST APIs, and since it's in YAML, it's both human and machine-readable. It essentially gives you a clear definition of what it expects to receive and how it responds. But why rammel specifically? Unlike Swagger, you're not limited to JSON schemas. Typing out JSON is a bit of a pain and repetitive, but you can use JSON and rammel if you really want to. Rammel allows you to define and maintain more than one version of your API. Blueprint does as well, but not Swagger. You can include sample functions, for instance, give example responses for endpoints. A huge difference between rammel and the others, and the main reason why Spotify chose rammel is the ability to refer and pull in external files, either from the local file system or over HTTP. So, when I started at Spotify, I had to answer a lot of questions about our web API and how it behaved, how to work with it, etc. And I got annoyed. I'm sure you all can relate. So, I built a thing. I made a developer console where you can test out our API, see how it behaves, how to get an OAuth token, getting real responses to sample requests. It's on our developer website if you want to check it out. But it's essentially a Flask app that creates forms based off of our rammel file and knows how to use it. It's super easy to maintain. So, being the good developer that I am, I am open sourcing it. The first portion of which is the parser for rammel. So, what ramifications does again is takes a rammel file and gives you Python objects. And it's best to see it in action. However, I am not Dave Beasley and I can't do live demos that well. Let's see here. Awkward pause. Not so live demo. Come on. There we go. Let's see. So, you can kind of see it. I'm sorry for the huge text because I was trying to be good. So, you would import pars for ramifications and you would define your rammel file and pass it through pars. You have an API object. You can optionally pass in a rammel file. You can add some more things that are legal in rammel. So, you have an API object. This is how you would validate it. You would just import the validate function and validate. It returns nothing if everything is okay or says an error if something is wrong. You can get some API metadata. You can see the object is called root node. You have a lot of information about the data and security schemes and a bunch of other metadata. Let's see, some actual end points. If you look at Spotify's first endpoint, it's albums. It has a display name description. Responses that it expects. Some query parameters. You take a look at the query parameters, the example, And it's a string type, description, however, it also parses markdown so you can get an HTML. Two command line tools, you can validate on the command line so you see a success. And you can also get a nice tree output of the ram file itself. So back to the talk real quick. Coming soon, eventually. Back in May, our last hack week at Spotify, I made a small script that takes ramifications and creates static documentation. So expect that to be open source soon. And with that, a Flask extension, Sphinx, and Django. And then I'm also starting to finally clean up our API console code so that can be open source as well. And my copious amounts of free time. So it's released on PyPI. The code is on GitHub under Spotify. Documentation on ReadTheDocs. Or you can just go here for everything. Thank you. Thanks, Lynn. So I was in a karaoke bar last night. And I don't know if any of you have been there. I recommend not doing so. But I will go. Of course you should go. I found myself singing Tony Braxton's Unbreak My Heart, which is a song that I used to hate and then liked ironically and now basically just actually like. One of the wonderful things about karaoke is that people sing really badly, which means that it's a safe space. If you're not a very good singer, you can still go for it. And we'll continue that little song-based story in a moment. After Hinnick tells you, he tells us about Atterus. Hi, I'm Hinnick. I like proper data structures. And I don't think that tuples are proper data structures. And what does it even mean? So I've ever had a tuple in your PDB and didn't know what it is. So I'm of the opinion that if you're building your API around tuples, you're doing it wrong. A lot of people still do it. I would like to have this. Call me old school. So I want to have classes with types and attributes. But if you want to have that, you have to implement this, nine dunder methods. And a small font is both for a dramatic effect and it wouldn't fit. So there are ways around it. There are dictionaries, which are awkward, and are makeshift for data structures like that. Of course, everyone wanted to heckle me with named tuples. I know they exist, but they behave intentionally like tuples, so it's a feature. But I don't find them very useful. Because let's see in this example. We defined two named tuples, which have each one value. And those attributes have different names. And still, if you put the same value into them, they are equal. And they are equal with the tuple one. So I don't think this is a good data structure. This is the reason why Haskell people are making fun of us. So also, if you want to add methods to your data structure, you'll have to subclass named tuples, which since composition is over inheritance, not a nice thing to do. And if you want to change the instantiation of your objects, you have to play around with Dunder new instead of Dunder init, which is also kind of hacky, magic, and idiosyncratic. So I like types. I like proper classes. I don't like boilerplate. But classes are tedious that you've seen. So I'm promoting another project. And it's called address. And it solves basically the problem I was talking about. It helps you to get rid of boilerplate while writing proper classes. It works with IDs, with Jedi, because the attributes are defined on the body. There's no subclassing. The decorator just adds the methods to the original class, nothing else. And how do they behave? Exactly how you would expect. So we had two different classes. We instantiate them. You get nice wrappers for free. Of course, those two instances are not equal. But if you compare to the same, they are equal. And since within the same type, the values are actually treated like tuples, you can compare them. So 0.1 and 2 is smaller than 0.22, which is useful. So now there are some more nice features like defaults. So you can have both scalar defaults. And you can define a factory for mutable types, like lists, dqs, dictionaries, whatnot. My favorite feature is sdict, which everyone who is writing APIs and has to generate dictionaries will love. At least I do. It even works recursively if you define it. So it's really nice to work with. And there's much, much more validators. You can switch on certain features. You can switch them off. Subclassing works just the way you would expect it. There's introspection built in. So you can query what attributes have been defined. So you can write your own, own decorator on top of it. And I'm overconfinated. I need to do the rest room, so I'm finishing now. Check it out. Actors on readthefunkydocs.org. And thank you. Thank you, Hinek. That was great. Larry is running up to the stage. The next talker for that is Agata Maron. Are you here, Agata? Good, just wait here. And so you're checking that you're ready. And we'll be great. All right. So what was I saying? Yeah, something about singing. And that reminded me. Yesterday, I did a little bit of a drum and bass MCing. And drum and bass MCs are people who have got nothing to say but still hype up the crowd. And that also reminded me of another kind of bit of hip hop that I remember from my youth. This one is by actual hip hop artists who do have something to say. And I thought I'd like to do a little bit for you now. OK. This is by the outfit Salt and Pepper. And it's a song called She-Fing. And it goes like this. Now I can bring home a bacon fry in the pan. Never let you forget that you're a man. Because I'm a W-O-M-A-N. That's what I am doing what I can. The thing that makes me mad and crazy, upset. Got to break my neck just to get my respect. Go to work and get paid less than a man. When I'm doing the same damn thing as he can, uh-uh, when I'm aggressive. Then I'm a witch. When I got attitude, you call me a bitch. Weaker sex, yeah, right, that's a joke. Have you ever been in labor and a fake soul? No, I'm a genuine feminine female. Think and you hang ain't nothing but a she-fing. Larry Hastings here also does raps, by the way. Yes, I was going to say, how clever you are rapping at the lightning talks. I'll take it away, Larry. Thank you. OK, astu, the extraneous else. In case you don't know the word astu, it's an obscure English word that means get rid of. Don't like. So during David Beasley's talk at PyCon this year, Python concurrency from the ground up live, this was his first slide. And I saw that and I would go. Because there's a construction on this slide that I don't like. So to see what I mean, let's talk about if statements. So here's a conventional if statement. If the condition variable is true, we execute a then c. If the conditional variable is false, then we execute b then c. We all understand this. But consider, what if we return from inside of the if statement? Well, then we just execute a. We never get to b or c. And if the conditional variable is false, we execute b then c. C is only ever reached if the conditional variable is false. b and c are really kind of the same thing. They should be in the same block. One of them's indent and the other one isn't. Why is that? Because we have an if, we have an else statement. It only takes a minute of considering this to realize you don't need this else statement. If you get rid of that else, boom. I think that looks better every single time I do it. So let's go back to David's. This is the law. If you have an if that ends with a return, you don't need an else. You're eating into my time. You're eating into my time. I only have five minutes. So this is David Beasley's first slide. We do the transformation. Alakazam. I think that's better every time. Oh, man. Impressed. So here's another example. It is also true for four statements or any iterating construct. If you have a continue or a break, if you've got this else or this else, you don't need the else. It can just be an if. You don't need the else. Bam. More readable every single time. The final bad example, if you have a function and you have an else statement that returns but an if that doesn't, you swap the condition. You swap the else and if statement and you negate the condition and then you do the transformation as normal and it is improved. Thank you. Now go forth and clean up your code. All right, Alakazam. Alakazam, welcome. Who else have we got after that? Da da da da da da da. Fod in IT project, Radoshlaw. Radoshlaw. Ganchirek, which is exactly how that's pronounced. There, there you go. Radoshlaw, are you somewhere near here? Hooray. There you go. Can you run to the end of the row here and come up to the front so you'll be able to get here quickly? Da da da da. Who wants to hear the end of the joke? All right. Who wasn't in here and didn't hear the beginning of the joke? Oh, that gives me no choice but to tell the whole of the beginning of the joke all over again. Oh, well, let's have a lightning talk. Are you ready, Agata? Hooray, that'll be better. Okay, hello, I'm Agata. I'm from STX next from Poland. First of all, thank you very much for inviting me here this year. Big thanks to Fabio and big congratulations for all of you who really made a great job this year. So really, I'd like to invite you to go to Poland because not only because of a beautiful country and officially, I can say we have a seaside because everybody asked if we have a seaside. Yeah, we have a quite beautiful seaside. And if you guys, yeah. And if you guys like Bilbao for sure, you will like Poland too because weather is pretty much the same, especially at the seaside. But today I would like to share with you our best practices, best superhero practices. We are a company about 170 people and 120 Python developers. It's like the biggest Python software house at all software house around Europe. And I'm here not because we are looking for a bunch of developers, but we do. But also because I want to tell you how we do it, how we build up and increase this business and also the philosophy of our industry. We believe in collaboration and synergy efforts. So that's why we don't send people on site. There is no possibility that we will work remotely, I mean remotely for our company, but we as a company work remotely for our clients. It means that we have 120 people sitting together and the whole knowledge stays in house. So even if you quit, even if you change company, everything, what we were working together for a year stays at house. So this is the first rule we have and we never break it. The second one is that we really believe in collaboration and synergy efforts. For example, it's like unwritten rule, but it's working. In every team we have instead one woman and of course it's not a tester, very often it's like developer girl or scrum master proxy project owner. And it really helps, especially if you have like eight guys and you know, we have right now about 20% or even 25% of women in our company. And also we support Django girls and communities like that too. Third thing which is like really important for us, maybe not very agile, but really, really efficient. It's like our own time tracking system. We wrote it for ourselves. It's like, very often we tell about agile, it's like, it's not really agile. Yeah, it's true, but it's working. So it's like 100% life time tracking system and our clients and also every developer is like connected to the system. So on one side they're very good help and stuff like that. But for that, on the other side, everything is connected with JIRA, so every minute of our work is will there. Even if I'm not technical person, every minute of my work, even the stuff right now for sure is like reported right to this time tracking system. The next thing, which is like awesome I guess, is like that we are really involved and engage in cooperation with our clients and we are looking for developers also who want to really build that community inside. What does it mean? That we really want to do the software that matters and we are looking, and now we are in a position that we can choose our clients basically. So we are looking also for clients who want to build like long-term partnership. So mostly we are offering new showing stuff and looking for people who are also able to commit and engage maybe be even more than just involved to the stuff we do. So if you are guys looking maybe for a good job, maybe not the best paid, but very interesting. If you want to do stuff that matters, if you want to really be responsible for your life and if you want to have a good over your life, just come to SACnext in Poland because we have SAC2, thanks. All right. Thank you Agata. Okay, next speaker and then after that we're gonna have do, do, do, do, do, do, ah, ah, ah, ah, ah. This looks like Shimon Pshowsk. And you're here, very good. And then after that we're gonna have Peter Victorin, are you nearby? Excellent, there you go. All right, so what did we have? We had like a Russian watchmaker. He was showing his friends around the shop. They were picking out the best things. One thought it was like Greg or the bracelet. One thought it was Vanya the dial and the watchmaker himself took him to the back of the store and he said, no, no, no, I think it is Olaf the second hand and they're all like arguing about it. They're like, no, no, no, oh, it's Greg or the bracelet. No, no, no, it's Vanya the dial. No, no, no, it's Olaf the second hand. And like they're arguing and arguing and arguing and they can't come to a conclusion. So what they decide is that they need an independent third party adjudicator to come and decide for them. So they get Tina Turner and Tina Turner comes to the shop. Are you ready to talk, Radisle? Take it away. Okay, hello. My name is Radisle Gonczarek. I am also from STX Next. Do you know what is FUD? FUD is a technique used in propaganda and manipulation. When you are fit with fear, uncertainty and doubt so that you don't even, don't judge things in a fair way, you judge things based on your fears. And I'm going to talk about how it appears in IT projects. So maybe an example. Yeah, when Python 3 appeared, there were lots of FUD. People were talking, oh, it's going to kill you. It's bad and so. And time showed, Python 3 is really, really good and better than Python 2. And people are slowly going from 2 to 3. Yeah, but there was a time of some uncertainty, doubt when we weren't sure that we really wanted. So what about IT projects? In our IT project, we were going to use React.js and people were looking on this and were uncertain how it will look like. And there was one person in our team experienced developer who took a look and said that, oh, it's going to suck. It's going to be awful. We are going to regret this to the end of our lives. And yeah, and all developers just, without checking, just took his point of view. So, yeah, so we did this ourselves. No one come to us and said that our React is evil. We just invented it ourselves. And that's, oh, okay. And that's how it happened. Yeah, the courses after this are, of course, early judging. You browse to first page of the tutorial and oh, it looks weird. I don't know it, so I should hate it. Yeah, afraid of living comfort zone because React.js introduces a language which joins in some way JS and HTML. You write the HTML and JS in the same time. So after all, it's a new language to learn. And of course, the third course was blind following one solution. If you are really, really attached to one solution, it's difficult to switch to another one and you treat any other solution as an enemy. So result of this was that instead of enjoying new framework because React is truly an awesome framework. And I got to know this. We hated it. We, it is painful. I don't know if you ever had a moment in your life. I hope not, that you forced yourself to code. And it's just because, it's just because the fab, just because someone told you it's going to suck. And it's very terrible. And after some time, you get to know this tool and see, wow, it's awesome. I can do impressive things with that. And but it's too late. You just spent a couple of weeks hating your job. Okay, so how to pre-met it? Okay, kill with fire. In fact, stop any discussions. If you see that someone is talking, these things make sure he actually knows what he's talking about. Yeah, it's like a viral infection. One person starts it and if he is respected in the team other people will take his point of view. Okay, so what you are going to do if you approach a new technology, new library, new framework, just give it an honest try. Try to code with it and don't fear because there's nothing to fear. After all, it's all in your hat. Thank you. Perfect, fantastic. All right, so maybe I should just recap the whole of that joke again just to make sure that everyone is totally on board with it. What do we think? Okay, Shimono too. Okay, so where were we? They've got an independent third party adjudicator that's going to help them to decide between Gregor the bracelet, Hanya the dial and Olaf the second hand. And it's Tina Turner. Tina Turner shows up in the shop and she's like, what's going on? And they're like, oh, we're trying to decide what the most beautiful object in the shop is. And the first guy's like, oh, well, I think it's Gregor the bracelet. And the second guy goes, oh, well, I think it's Vanya the dial. And the watchmaker goes, oh, well, I think it's Olaf the second hand. And Tina Turner goes, Olaf. What's Olaf got to do, got to do with it? What's Olaf but a second hand in motion? Yeah. Don't clap that because I'll just do more. Are you ready? Take it away. So everyone is older age about I think I also, you also want to learn I think I also, but then you look into the documentation and it is so complicated. There is all of these futures coroutines task and whatnot. And you don't know how to start. Then you go to the conference and everyone is like, I'm going to show you how to make a 20 million user application with Async.io. And you say, oh, it's not for me because it's so hard. So I'm going to show you a simplest shortest tutorial for Async.io. I won't be doing a 20 million user application. What I will be doing, I will be downloading wallcats for offline browsing. All right. Okay. So first of all, let's look how would we download some page with requests. Request is a great library. It's more comfortable than URL lip. And we were, we are downloading from Tumblr. Tumblr has a great API. So we can get a JSON that describes some blog like here. If we want to turn this function into Async.io coroutine, we just do this. The AO HTTP has almost the same API that request. So we only give this decorator. We put yield from here and there. And we use AO HTTP instead of request. So this is a coroutine that would take the information about the blog from URL base and print it. And after we get this information, we can use some other technique that is as accessible in Async.io. We can delegate our task. So we just take a normal list. Then we put some coroutines on this list. We ask it to download all the pages with posts in this blog. And we use Async.io wait to make a new task that would run all these tasks simultaneously and wait for all of them to finish. In the same fashion for every page, we delegate the tasks for all the pictures there where we can see the URL of the picture. For if we want to download some picture, we don't have to use AO HTTP. We can, for example, use some external console tool like WGet and we can also communicate with our other processes with Async.io like this. And with these three functions, we get almost everything. This would download all the pictures. So it took me about, I don't know, three minutes to show you all the functions that you need to achieve a simple task like this. Although that would be a little too good because this would try to simultaneously download everything so Tumblr will think you are, they don't think it. The last thing I can show you is we can use a semaphore to limit the tasks that can run simultaneously. And if you want, you can see the whole script here and I think it's a very good point to start to take some simple tasks and try to achieve it. You will see that Async.io is very simple. The code doesn't get into any kind of callback hell or something like this. The code really is async but it looks like a synchronous, simple sequential call. And with Python 3.5, it would be even simpler because we will get all these syntactic things. Okay, and the last thing I would like to ask if there is someone who plays Bridge because there are three of us already and we are looking for a fourth person. So if someone would like to play a rubber please contact me. Thank you. Fabian, are you here somewhere, Fabian Kreuz? Okay, we'll have you next. And that was the nice, silent transition for everyone. Much better than the last one, wasn't it? Are you ready, sir? Sure. Take it away. Okay, hello. Everybody's favorite topic, right? So how do you port to Python 3? You use the modernized tool and the Sixth Library or Future Eyes and Future and you can use or Future Eyes and Future and then you pretty much have to go through all your code and understand what it does which is the most hard part of this whole thing. If you're stuck then read this book, it's available online, it's pretty good, then you have no reason not to port your Python code. If you, on the other hand, have a C extension there's also an easy way to do it. Rewrite it in Python or use CFFI if you have bindings to another library. This, well, you also have to understand all your code. You also have to rewrite it in another language but you will thank me later because your code becomes much shorter, much more maintainable and just overall better. So yeah, it's easy, right? The problem is that you will have some people on your team saying, ah, why Python 3? Why do you have the Sixth Library? We don't want another giant dependency in our project. So sometimes Python reporting for Python goes like this. You introduce some small, specific wrappers that just the ones you need for your project. They're small, there's little magic involved. Then your library grows because you need more and more and then you realize you have just stream-implemented half of Six very badly. So you introduce Six, your compatibility layer shrinks into a tiny adaptation library and next time maybe you will start with Six from the beginning. What do you do if other people on your project don't like Python and you have to convert a C extension? Well, there the situation is a bit worse because you still can start with writing these little compatibility macros and you will realize that most of these are very simple. You just need to read the docs and know what they do and it would be really good if there was a collaboratively maintained collection of these macros you need for reporting C extensions. So if you're ever in that situation, you're in luck because I open sourced my collection and it's pretty complete and it also comes with a very extensive porting guide. So if you want to, if you have a C extension to port and you for some reason can't use Python or CFFI then go to p3c.readthedocs and follow the tutorial and it's explained pretty nicely there I think. If you find any bugs then send up a request. Thanks. Florian are you ready? Fantastic. There you go. So we're almost at the end of our time. Florian might be the last one. Like who by vote would like to have more lightning talks and carry on for an extra 10, 15 minutes? By applause. Okay, okay. Stop, stop, stop, stop, stop. Now who by applause would rather get out of here and go and have a beer or go to the shower or whatever it's gonna be? I think that's a vote for the extension. Now organizers are we actually allowed to hang around in here for any longer? I mean there's democracy and then there's the overriding force of the Urskal Luna Palace of Congresses. Yes, we can stay. All right, fantastic. So should we have two more lightning talks, three more lightning talks, four more lightning talks. Should we take it to half past six, quarter past six? What do you think? Should we have like basically what could we have? Like sort of voting system or sort of let's say quarter past and then we'll make another decision. All right. Do, do, do, do, do. So who would like to hear the joke about the pirate programmer that walks into a bar? Wait, we already had that. Yeah, I'm out of flair. I should have prepared more. Who knows a joke in the audience and wants to tell one? We could sing another little song. Da, da, we love the python, we love the python. We love setting up, we love to be in the screens. We love all these sorts of things. Oh, I thought, I thought like with the whole, I could tell you another really long joke. There's one about a guy who's really into tractors. Who knows this one? Oh, I tried like this. I tried like this. Are you sure? You want to like, you can have a couple more minutes because I've got this joke. It takes about 28 minutes. I have no idea why. I have no idea why, why it's a bit too, too tough. You're going to give it a go? Yeah, I'm going to give it a go now. Take it away Fabian. So I have heard this conference a really great inspiring talk about a wonderful theme and I thought that, hey, I'll jump on the bandwagon and I'll have a very similar talk as a lightning talk. And maybe you'll recognize which talk I'm referring to. So it's a story. It's a story about the forest of technology and where the big and wise snake caught for a meeting, caught all animals in the world to the meeting. And, but also the little mouse wanted to go there. And when the mouse reached the forest, there were all kinds of badgers around. Lots and lots of badgers. Actually, in the last years, there were more than a thousand badgers around and that is really a scary lot in itself. But badgers themselves are scary. What you don't see is that badgers have a really huge brain. They know everything. And whatever they say, it's really, really smart. And the mouse is completely intimidated by them. But unlike the squirrel, the mouse can easily adapt and just put on some black stripes, mingle with the badgers. And the only problem is that the mouse simply doesn't dare to talk to those badgers. So the squirrels are sad. It says sad there. And the mouse would like to help, but the thing is the mouse was never really good in talking to squirrels, especially because the mouse thinks that squirrels are great with these great fluffy tails. You don't see that. It's so fluffy there. And so, so the mouse rather hides in the little mouse hole, as mouse do. Now, the squirrels, the mouse is very happy to see that the squirrels are uniting and they have become happy there. It says happy about that. But when the mouse looks around, it sees only badgers, badgers everywhere. And another thing about the mouse is that the mouse is too shy. It doesn't even want to build some group and participate in a public group. So that simply wouldn't be a solution. So the thing is that in the end, the mouse goes home again and is thinking about all the great talks, all the great public talks that the mouse attended to, but regrets a little bit that the personal talks were a little bit on the low side. So what's the moral of this story? It didn't have such a nice ending. And at this place, I want to say that I am one of these mice. And when I'm outside in the coffee area or in the lunch, at the lunchtime, I'm just standing there and I simply do not dare to approach other people. And I think this China is something that technical people have in general. I'm definitely not the only one and it's not a gender thing either. So if I were to suggest a solution, let's play a game. It would be a simple icebreaker game. For example, that the task is to seek a person of certain characteristics. So you have kind of an excuse to go around and talk to random people. And of course, it should be all very nice and low. So if somebody doesn't want to participate and just doesn't want to play the game, then he can just say, no, I am not participating and that's fine. Tender for conference. Tender for conference. Tender. Oh. Oh. Oh. Oh. No, we can do better than that. No, no, no, I don't want to make a dating agency or something like that. That's not at all what I mean. But the nice thing would be, and that's why I'm calling out in this lightning talk, if lots of people would participate, because mice don't dare. And if it's a thing where you identify yourself as a mouse by simply participating in this game, then that defeats the purpose in a way. So I hope if I can get some help, I'm not going to do this all alone. But if I get some help, talk to me today, if you want to have an influence, the game plan is a little bit unripe still, not very mature, so come to me and let's figure out what we are going to do. Then tomorrow, maybe, if during breakfast, some volunteers would come to me and during the first coffee break and the last coffee break, we could have a shot at the game, that would be really great. And I think that's it. All right. So Fabian, do you want people to come and try and find you and give suggestions for the game? Where should they find you? In the forest. Ha, ha, ha, ha, ha. After the lightning talks, I'll hang around in the front area here around the Google. Just in front of the entrance here. Okay, cool. Thanks, thanks very much. All right. Come on, we've got to have at least one more lightning talk. What have we got here? Pi3C, pionconf Hamburg, Mike Muller. Fine. So there was once this guy who was really, really into tractors. Who knows this joke? Oh, you're in such trouble. Okay. So he's really into tractors. He likes tractors. I mean tractors are cool, right? And so he's got, like, lots of pictures of tractors and he's got model tractors. He's got Lego tractors. He's got subscriptions to agricultural magazines. He's got subscriptions to tractor-specific magazines. He writes to all the tractor companies and he gets them to send them brochures pretending to be a person that's going to buy lots of tractors. And so he's just genuinely really into tractors. And it just so happens that the Euro-Python of tractor conferences comes to his hometown. Are you ready to take it away, Mike? Yes. Excellent, go for it. Okay, obviously you like conferences, Python conferences, since we are here. Maybe you also like Python unconferences because we have something that's called a Python unconference and it will be in Hamburg just in less than two months in September. So we are all invited to come there. So who of you knows what unconference is? So I need to explain what unconference is. So what's an unconference? It's similar to a conference, but we don't have, like, a preset schedule. There's no call for talks and speaks and something like this. But the speakers can just introduce the talk on the day in the morning and just have to convince the audience that the talk will be good. And then there will be some kind of voting. We vote for the talks and then people can have the talks. Typically, these talks are a little bit more casual than these official talks, more discussions. And some people really prefer this kind of style to a normal conference, but it's very interesting. So if you don't know what it is, you are invited to try yourself and come to Hamburg. Last year, we had the first version in 2014. We had more than 100 people. And there was a lot of discussions there and a lot of people liked it. And I think it was a great outcome of the conference and people wanted to have more. So we have more this year. This year, we expect about double the size of the conference. And it should be even better than last year, if it's possible. And it will be the biggest Python event in 2015 in Germany. So if you ever want to see Hamburg, Hamburg is the second biggest city in Germany. So come and see Hamburg. It's a very nice city. Woo! Great. The program is very simple. So we have one day. The first day is dedicated to trainings, open space and sprints. So we have two trainings already up and there's a lot of space to have open spaces and some sprints. And on the weekend, Saturday and Sunday, we have talks. And I should mention, it's very moderated price. If you look at the prices, very, very moderated prices. So pretty affordable. The conference itself. And the talks are very interesting. We'll have keynotes. So typically we have some keynotes which are set. That's the only thing that's set. The rest is open. So everybody has a chance to get a talk. You can come as an attendee, but you also look for sponsors. So if you want to reach out to the pricing community, the people that gather in Hamburg, you can come and find some talent there. So they even have some special equipment options. So if you look for people, come and they have a job board and they have interview rooms. So that's a URL. And this will be the website. So you go there. That's an unconferenced website and everything will be in English and in German. So you can have English talks or German talks, whatever you prefer. Thank you very much. Okay. Next we have Three Python Tips and Tricks by Mark Smith. And after that is Jacob somewhere in the room. Jacob, how are you? Yes, very good. There you go. All right, where were we? Yeah, the tractor conference. The biggest tractor conference was coming to town. And so this guy who's really into the tractors is really excited about this. Like he gets his ticket way early on the early bird. He's like reading all up about the conference. He's subscribed to the blog. He's all tweeting at them. And like the conference day is getting closer and closer and he's getting more and more excited. Like he hears about what like the exhibits are gonna be and what kind of tractors are gonna be there. And there's some amazing tractors that he's always wanted to see. And like he's almost come up to the conference day. Are you ready to go, Mark? Yep, go for it. Okay. Hi, my name's Mark Smith. I worked at Fandill. You can see that. I've been doing Python for 15 years and I've learned lots of things. So I thought I would pass on some three things that I know that you probably don't know or useful things that I've built. So, useful tip. Number one, this is something you didn't know. This is Marge Simpson. You're wondering why have I got Marge Simpson on the screen. It's interesting because Marge Simpson is also Ascii Arts. And what's probably not immediately obvious is that Marge Simpson Ascii Arts is a valid Python code. So, this is something that I know this has blown your mind. And you're gonna want to use this in all your own code. So I'm gonna suggest that we add this to the Zen of Python. So import this, we'll get this added to the Zen of Python. So that's useful tip number one. Useful tip number two. Regular expressions. So you're looking at this, you're thinking, Mark, that isn't Python code, that's not gonna work. No, this is better than Python code. This is Perl code. This is the second talk I've done at EuroPython which has involved a slide with Perl code on it. So I'm extremely proud of myself. Final warning. So what you'll notice here is that this, there's not a lot of code here, this is great. I've defined a variable called dollar A with the my keyword. All variables in Perl begin with a dollar or non-lists and things anyway. And that's nice and consistent, so we know what that is. And then we are matching the contents of that string against the regular expression. And then what happens inside the F statement, you see we're printing this out, there's a backslash n at the end, so Perl doesn't just stick a line break when you print stuff out, it's much more explicit than that. So Perl is more pythonic than Python is. Inside the string, we've got a magic dollar one variable that was just filled when we ran the regular expression. So it's a dollar one variable inside our own scope but it was set by the regular expression, it's just magic. So this is the equivalent in Python, you'll see this is terrible, this is five lines of code and that's three lines of code. That makes the Perl code nearly twice as good as the Python code. We've got an import statement at the top and I think we can all agree that namespaces are an experiment that has never worked and we need to stop doing that. It's just extra code, we don't want that. And then the regular expression, we run the search with the regular expression and the string and we have to assign that to a variable first, it's really annoying, we can't do it just inside the if statement, it doesn't just magically create any variables and then we have to test whether the match is none or not and if it isn't none then we can extract the group that's printed out, that's the whole point of really storing that away. But I fixed this, you'll be pleased to know. So we have magic search, we run the regular expression against the string and then on the next line we have this magic variable code S zero that's been created for us. I couldn't call it dollar zero because Python isn't as good as Perl. So I'm printing that out and you're thinking, Mark how did you do this? So I'm gonna show you the code, it's not much code and you need to write it once. So we run the regular expression and then we start going up the stack frame. So for people who aren't quite as experienced as me, every time a function is called, the variables for the function that called, the other function is stored away in this stack but we can actually go up the stack, we can pull out the variables and we can modify that, I found out, it took me quite a while to work out how to do this. There is a bug in this code, if I have enough time, I'm gonna show you how you fix this if you want to call it from a function. But so you're probably thinking like that's pretty horrible code, I heard people kind of groan when I showed that on the screen but it's fine, I ran this through PEP eight, this is perfectly valid. It's okay to use this in your code. Useful tip number three, I bet you can't wait. So Booleans are, they're okay, I mean types are all right, I quite like types. So I used to be a Java programmer, I'm quite experienced with types. So they're fine, if you have a Boolean and you want to test this, it's okay but sometimes you don't have a Boolean, sometimes you've got a string and that Python's quite good, I mean this works, so this is fine, but unfortunately this also works. So this isn't ideal, so I've created a library called ish, would you please, no. So if we subtract ish from a Boolean, whether it's true or false, we can then test obviously the standard cases work, I mean you'd expect this to work with true and false, but it also works with the strings, true and false, it works with slang, it works with Esperanto, and it works with Unicode. So I think you can all agree that this really should be part of CorePython, so I'm gonna submit a pet for it and we'll get that into CorePython. So I hope you found this useful, if you're interested in using this code. I am GD2K on GitHub and Twitter and you can check out this repository, it's got lots more stuff in there, there's some meta classes, it's awesome. And submit pull requests with some more experiments so that would be great. Thank you. The act of your up next, amazing. Oh that was quite something, almost as good as a tractor. So we've also got Brecht Mahils, did I pronounce that anything like right? Yes of course I did, there you go. So the tractor conference has come to town, the tractor day is finally there, like he's really excited about all the tractor, he gets there like three hours before it's due to start to make sure he's the first in line, he gets into the conference venue before anybody else, he gets his badge, he gets in there and it's an amazing orgasmic world of tractors. It is very much like a Python conference to a Python person but for the purposes of the joke you have to square that or something, start start two. So here he is, looking at all the tractors, oh wow they're amazing, here's one, here's that one, here's that one and he knows in the back of his mind that there's a particular tractor that he's really looking forward to see. Like there's a new John Deere Giganto model that's as big as one of those mining trucks, it's got wheels that are higher than your head and so he's wandering around through the conference venue, he can hardly contain his excitement as he gets towards the John Deere stand and he sees this tractor and sure enough it is the most amazing tractor he's ever seen and he's looking up at it and there's no one around and there's just the pure glory of his tractor is there and he can reach out and he can almost touch it, almost but not quite because there's a little velvet rope and he's like oh I can't quite touch the tractor, it's come all this way and he's like I just wanna feel it and he's looking around, there's no one looking and he maybe thinks well if I just could unhook the velvet rope and maybe just sneak in quickly, just to, it won't, I mean obviously I'm not gonna, so he just unhooks the rope and sneaks forward and he touches the tire of the tractor and like just sort of shiv at those two and he's like oh wow and then he notices and he's like sort of just maybe just rubbing his hand over it and he comes to the door of the tractor and he's like his hand is just resting on the door handle and he's thinking wow I mean just check, he opens it, it's not locked, the door is coming open and he's like he just takes a step back, he's like I don't know, come on, I probably shouldn't but by this point he's already crossed the boundaries and he's like well, I would just like to feel what it's like to sit in the cabin of this tractor, I mean I've loved tractors all my life, this is the most amazing tractor, just wanna sit in the cabin so he looks around and he climbs up and he has a little steps of the tractor and he gets into the cabin and he sits in it and he feels like the lord of the universe, like this tractor is amazing, it's stupendous, so is Jacob, is he ready to give us a talk? Yes. All right, take it away Jacob. Jacob, Jacob, Jacob, Jacob. So now we go from fast to the mildly entertaining. I encountered a problem last week. I work on a project where we install point-of-sales servers in stores all over the world and we do that from a data center in Finland where we have a server and last week we had a problem with the server when we were installing stores in Great Britain because the server has about eight gigabytes of memory and this memory is all eaten when we're running the install. Now, this is a rather simple process. We have a daemon which reads a config file and then it loops forever waiting for hello messages from machines ready to install and then it spawns a task doing the actual install. Very, very simple. Why is it eating all the memory of my machine? So I started analyzing this problem and I found that my config file was not entirely small. It was 165,000 lines. I need about 200 of these lines. So this seems to be the start of the problem. So I started testing it. So I wrote a test script. What's in fact there is actually what we're testing. We're importing this YAML file of config and then before we look at the contents, how much memory I'm using up and then after we're looking at how much memory I'm using and the results are rather interesting. First of all, this takes about half a minute to run and after I've done my import, my system uses about three and a half gigabytes of memory and I have a data structure which is about 32 megabytes. But why is the system still choked after I've done the import? Well, it turns out Python processes do not give back memory to the system. And this is a long running process. So it keeps those four gigabytes of memory until we restart it when it reads the config again and keeps four gigabytes of memory. And of course, the task of installing a new machine does exactly the same. It starts by reading the config file, it uses up four gigabytes of memory and then it does the config and it's done. But it means I can install one machine at a time, otherwise I'm totally out of memory on this system. And I think that learning to take home from this is don't blindly trust your third party software. And once you are encountering problems like this, they're actually easy to solve because we can split this config file into many and then the problem is gone. But how many people here actually knew that a Python process does not give back memory? We might learn something else. Under some circumstances, it will do, but under this circumstance, no, it does not. Okay, thank you. Happy days. Thank you, Jacob. I love all of Jacob's talks. The pace and delivery of the voice just makes you feel like you're in safe hands. It's wonderful. There you go. Brecht, this is you. There we go. And we have, let me see, two more Lightning Talks after Brecht. So shall we finish them all? By applause or should we wanna go home? So first, finish versus go home early. Okay, out you go, now. All right, are you ready straight away? Looks like it, yes. But everyone is desperate to find out about the tractor. What would happen if I didn't get to the end of the joke before the end of the Lightning Talks? My, that would be frustrating, wouldn't it? Should I give up? No, no, no. Should I give up my time? Absolutely. Well, I don't think, I don't think we wanna give up Brecht's time. Absolutely not. All right, Brecht. Hello, everyone. I'd like to introduce RhinoType. It's a project I've been working on for the past couple of years. Actually, I'm giving a talk about this on Friday. But since it's on Friday, there's perhaps little time to receive some feedback on it, hence this Lightning Talk. So it's not just a shameless way to promote my talk. It's another purpose. So I'll keep it short at least. What is RhinoType? It's something that's very similar to Latich in use. So it compiles documents, in this case, to PDF. It's written in pure Python, and it has very few dependencies, so you can use it in other projects easily. For people that are not familiar with Latich, this should be a better description. RhinoType comes with a Sphinx builder. That means you can create the PDF from your Python or Sphinx documentation projects. It comes with CSS-like stylesheets, so it should be easy to use for people, I think, pretty much everyone who is used to using CSS. You can use document templates, just like in Latich, to determine how the document looks like or what the document looks like in the end. And because of the simple fact that it's written in Python, it should be much easier to customize when you compare to text macro language. Current status. I've released the first version a couple of weeks ago. I call it, it's near beta, so it implements already a lot of the stuff that Latich provides, including columns, automatic table of contents, generated footnotes, floating tables and figures are also supported. One major thing that is still missing are equations. So if you require that, you should wait a little longer. Also, it's still lacking documentation. However, there's a readme included, so if you want to try it out, I would refer to that one. And I'm afraid I will need to do lots of testing and book fixing also. I will soon release a new version. This one will have nearly complete Sphinx support. For example, it handles the Sphinx, or Sphinx's own documentation, which seems to use most of the stuff that's supported by Sphinx. And it also comes with a prettier style sheet than the one that is included in the first release. So if you're interested in this project, I'd like to invite you to come to my talk on Friday, 12.30 in this room. If you want to search for more information on the internet, make sure you get the spelling correct. The H is not in the location where you expect it. And you can take a picture of these URLs for future reference. Thanks. Thank you, John. All right, anyone that wants to leave the room and is desperate for the bathroom or whatever it's be, it's great to walk out while I'm talking. That's a natural, understandable reaction, but it's less embarrassing for the speaker than while they're talking. So this is a good moment to run off if you're desperate to do so. Right now, we would like, please quote browser by what? Yeah, yeah, yeah, you're gonna have that, probably. Florian Bruin on quote browser. Is this you, Florian? Fantastic, and after that, I've got Gemma Hensch on why I love the days. I get to optimize things. Oh, did I miss one? Oh, okay. Maybe, yeah, we might even have three. Well, I don't know, the sideways one, it's a bit controversial. Fine, so where are we, everyone? I think we're in a tractor, right? Like, he's climbed into the tractor, he's sitting in the driving seat. It's the most thrilling thing that he's ever done. And then he notices that the key is in the ignition. And like, he's already crossed a barrier and he's crossed another barrier and so he thinks, come on, I've just got to start it. Like, how many times is this gonna happen to me in my life? So he reaches down and he turns on the ignition of the tractor because he just wants to hear the sound of the engine and the sound of the engine is like the rumbling of a thousand horses of thunder and he's blown away by it and he's thrilled and the vibrations are shaking him and he's at this point going, ah, ah, the tractor, it's all become overwhelming for him. He's like, getting to the gear shift, he's putting it in gear and Florian, are you ready to give it to him? I am. All right, take it away Florian. So hi, I'm writing a browser and that in Python. So by now you probably think I'm crazy and you are not entirely wrong but I actually have good reasons I do so. So there are three big browsers at the moment. Well, let's say two. But I want WIM-like key binings in my browser and I want to be able to click links by keyboard. There are some projects for this, like Wimium for Chrome but that isn't really integrated well so it doesn't, it didn't feel like Wim for me. There are also some Firefox things like Pentadoc Tool and Wimperator but Firefox really got worse and worse in my opinion lately and now they're doing things like integration of third-party services to get some money which I don't really agree with so I stopped using that as well. And then there are all those minimal browsers like DWB, LuaKit, Usable and some others which I also used for some months but most of them aren't really maintained anymore and all of them use a deprecated version of WebKit GTK so that wasn't a usual experience, damn crashing. So yeah, I did my, another browser. I picked my favorite tools that's Python, Qt and currently WebKit and there it is one and a half year later by now. They have a command line with a really nice auto completion. I can click my links with the keyboard like I want to and it works on pretty much everything. It's, it works a little bit worse on Debian and Ubuntu because those have ancient versions of Qt. Well, Debian Chessi not anymore actually and it works very well on other operating systems with recent versions of them. There are some things I learned. It's a very good idea to focus on clean code and mark easy box as easy because that will get you a lot of contributors. I merged the 100 pull requests recently and write tests before it's too late because now I'm doing very much boring work of writing tests which I didn't earlier because it took off more than I really expected. So you can find out more on kubebrowser.org. There is an IRC channel on Free Note and you can reach me at me at the compiler.org. Thank you. Okay, next we had, I said this earlier. Gemma Hensch, where are you Gemma? Gemma Hensch, coming, all right. There you go. And then after that we have one final sideways talk which is called Debugging Hot Found. I suspect that's actually an N. There you go. You can't wait to find out, can you? Is there gonna be time to finish the tractor joke in this session or is there gonna be another awful one that spills over to the next day? So who wanted to give the debugging talk? This gentleman here, there you go. Are you gonna be okay to do it? Are you gonna be okay to do your talk? Are you okay to do your talk? Okay, fine, I have a seat down there. And all right, it's looking a lot like there is gonna be time for the end of the joke or is there another 10 minutes left in the joke? Let's find out after Gemma's talk. Oh, two seconds, two seconds. Oh, no, not yet. Okay, okay. Take it away, Gemma. Hi, I'm Gemma and I'm a developer and it's been about one minute and 47 seconds since I last touched a line of code. I spent seven months working on a haircare website and out of those about 140 days, I got to enjoy about three of them. Those are the days that I got to optimize my code. Oh, I have to, I usually work for agencies on short timescales where getting something to work is the only thing that matters. But programming isn't just a job for me. It is a craft. It's about problem solving, which I do enjoy, but it's also about building something efficient, well-architected, and beautiful. The part of my brain that writes code is the same part of my brain that writes prose. There's a rhythm, a flow, a weave, and a weft to good code. When I take something that works slowly and I make it lightning fast, that is not only an enjoyable challenge, it is the pinnacle of my skill. I'm not just a code monkey mashing buttons when I'm optimizing. I'm an engineer. Something I love doing. When I was writing this talk, I came up with a few ideas for trying some problems, to try for some problems I've been working on, and I had to stop myself from implementing them there and then. Write talk first, optimize later. Unless you're living on the event horizon of a black hole, time matters to you. Be users waiting for a website response or deep analysis across giant data sets. Time is directly related to your AWS bill. I'd like, oh, do I jump? No, I did right. So I'd like to introduce you to my latest and ongoing obsession, Kerbal Space Program. I don't know if anybody has come across it. If you haven't, stay away. It's worse than Minecraft, I'm telling you. Now, when I got started, I was experimenting around and I sent up Bill Kerman into space with an early design and he got stuck up there. Unfortunately, he's actually, if you look at the orbit he was in, not too high up, but unfortunately, he doesn't have any fuel to get back home. So being a little bit obsessive, I decided I'm going to solve this. I'm going to go back up, find a way of getting him back home again. So I decided to design a ship to do it. So the first iteration was, let's look at everything I did wrong in the first craft, put in lots and lots of redundancies, lots of backup systems, and this is what I came up with. Slight overkill in the design because this ship doesn't care about orbital mechanics. It left the Earth-Moon system without making any course corrections. So I slightly overdid it. But I thought, what was the original problem? All you need when you're in an orbit as Bill was was just something slow, small, low fuel just to slowly decelerate. So what I wanted to do was I wanted to fix that original problem. And what I did was build a small probe that was automated with a deceleration engine. And if you look at the size to scale of this ship, this is the optimized solution. T-bit smaller. So how does this relate to coding? I wanted to share just sort of my three top tips when you're getting around to optimizing your code. The first one, surprisingly, is don't optimize your code. I've made this mistake in the past and I see it happening time and time again. People get stuck on trying to write efficient code first before they've got it working. And it doesn't work. You will get stuck, you'll get frustrated. The first draft, the first thing you write, make it work, then write it, then come back and optimize it. And over time, as you get better, what your first drafts are will be more efficient naturally. What I write now is probably more optimized. All of my first drafts now are probably more optimized than the optimized versions of things I was writing five, six years ago. But still, get it working first. Next thing, be evil. What this refers to is when you're dealing with whatever you're working on, well, generally this refers to when you're dealing with a dataset, go out and find as large a possible dataset as you can. When I was first doing this talk, I was talking about an analytics page I wrote. So it was using social media data. So I went out and captured a day's worth of the top Twitter hashtags. This kind of, my original idea, worked quite well on the small sets I'd used. Didn't work so well when you're dealing with hundreds and hundreds of thousands of items you're trying to deal with. And then the final thing, technically speaking, I just wanted to put break things here because it's actually break things apart. Always try and take, what you're trying to, always try and take the problem and break it into as small individual pieces as possible. So when my analytics page was running, it was actually 20 different statistics I was generating. And some of them were happening that quick. So there's no point in wasting your time doing that. So, in conclusion, when trying to optimize, don't optimize, be evil and break things. Thank you very much. So he's turned the ignition on, the engine is going and he's just gone completely crazy at this point. He's gonna slam down the accelerator. He's driven the tractor off its stand across the purple barrier. He's smashed it through some of the conference exhibits and stand. He's crashed it into another tractor. He's driven it through a wall of the conference center and like the police and the National Guard called out to stop him on his matter as crazy tractor rampage. Nobody dies and no animals were harmed in the making of this joke. So, he's called by the police and he's given a massive, like a suspended sentence and he's sent home and when he gets back from jail or whatever it is, he just gets home and he looks at his life and he goes, I've let this tractor, I've got to call it an obsession. I've let it go too far. I've overdone it. I think I just have to cut tractors out of my life. So, kind of with a heavy heart but a knowledge that this is what he has to do, he goes and gets all of his pictures and posters of tractors and he takes them out to his backyard. He gets all of his model tractors. Are we okay? He gets all of his model tractors. I'm just going to get to a good break to break and he piles them up in a big bonfire in his garden and you'll hear the rest of the story a little bit later. Since this is the lightning talk, the final one might be smart. Okay. Take it away. Take it away, right? Okay, so I wanted to give a talk about debugging. And I'm going to do something very embarrassing here. I'm going to do a live demo. So I'm going to demo a little tracing tool, a debugging tool because when debugging, you shouldn't try random stuff. You shouldn't guess. You should see what's going on. So Tracer is quite useful. So, but the setup here. So one day, a person comes in on pre-node, on PyPA on the channel and asks about something. My package cannot build a wheel. I get found out there. I look at the package and the manifest is okay. The setup is okay. What the hell is going on? So I actually check out his little project and then I want the build command, right? So I want this and then you see here down. We have a problem here. Okay, let me decide it. We go. Okay, so you see, what the hell is going on here? It seems that somewhere in the many libraries that are involved in creating a wheel somewhere, I mean, there's an exception. And it gets discarding. You only get the message. I mean, that's not useful. I mean, you cannot figure out what's wrong. So, you can activate this tracing tool with an environment variable. So there's a Python Hunter. The library is called Hunter, the bugHunter. Right, so I'm gonna set it to empty. So it's gonna trace everything and then I'm gonna take the command here. Then I'm gonna just paste it here. And you're gonna see that it runs all useless stuff. I mean, I don't care about the regular expressions, right, so I'm gonna stop this. So I'm gonna add the, I'm gonna add a filter here. I mean, you can add filters with a callback. So I mean, here on command line, you can only specify lambda. So I mean, this is very bad. I don't, yeah, the card in the scene of presentations, you know, yeah, doing like this once, okay. So I don't want any, the S-U-E-R in the module, you know, right? I think the module, okay. Yeah, that's the problem with the demos, you know. I knew it, I was wrong with the, you know. It's boring, otherwise, I mean. Right, so, okay. Oh, dear God, oh my God. Oh, okay, so now it's, whoo. Now it's, you see that the red stuff, there are exceptions, I mean, it takes like 10 seconds to run, you know. And let me, okay, see, so let's look what's going on here. Okay, this is the, you know, the exit stuff. I mean, this is kind of, you don't look at it. I mean, right, it's confusing, right? But you see here that we got some exception here. Let's see, oh wait a minute, what, what's going on here? Oh, lots of exceptions, but something. Well, we gotta read all and see, it's around here. You know what I said? OS, oh look, there's something interesting here, look. In a bidis wheel, there is a sub-process being called. What? OS and Veyron wheel, wheel tool, what? Okay, so maybe we should, you know, we should, you know, just check. I'm gonna use the history this time. I'm gonna check what, what? I mean, okay, there's something wrong in the environment. I mean, okay, so that's why I work on my machine. I was, what? On set this, you know, then I'm gonna run it again. Let's see what, okay, how it builds. Would you look at that? Okay, so that was quick. Basically, I'm looking for feedback on this tool because, you know, the API is quite bad, you know, and it's kind of slow. So, I mean, if you're interested in some of the stuff, I mean, come talk to me. All right, and that takes us to the end of the Lightning Talks. Thanks everyone for coming along. And would you please give another massive hand to all of our speakers and to yourselves. You're beautiful, you're wise, you're intelligent, you're amazing. And we'll have the social evening this evening. Everything is gonna be brilliant. Good night!