 Lightning talks time. It's my favorite time of the day, I guess. We actually have a lot more lightning talks than we have time for today, so hopefully we get through all of them. Which actually, it's why we're starting 15 minutes early, but anyway. So, Grace Nolan is up second, but first we have Jesse who's going to tell us about CodeLingo, and your time has started. Hi, I'm Jess. That's Matt, somewhere that ran away. We're both working on CodeLingo, and I just want to quickly talk about ratcheting down technical debt. There's the Standish Group, which does the Chaos Report annually. They've been doing it for over two decades. So, where they do a study across the whole industry to see how many software projects are successful. By their definition of success, they've never found more than 30% of software projects industry-wide successful. The Gartner Report estimated technical debt to hit globally $1 trillion. So, it's an industry-wide issue. So, there's a tension between technical debt and features. Managers and business owners like to take on technical debt because it allows you to get to market quicker. They take the analogy literally. As engineers, basically we see technical debt like taking a rake, placing it upside down, and turning off the lights. So, there's quite a disparity between how managers see technical debt and how engineers do. Nonetheless, we all need to push out features and products to get money and survive. So, you have to resolve the tension between these two. With CodeLingo, what you can do is actually add Claire, and Claire is a virtual mentor that you can add to your team. And she will help you manage your technical debt at scale. So, what we can see here is, as a pull request is coming in, Claire is going to say, I see that you've added more arguments to this function. Can you please take a data struct? And make it take a data struct. Now, the important thing here is that this isn't a bug. It's not idiomatic go or Python or anything like that. It's a particular style that has been made by a senior engineer in a project. But the point is that Claire is guiding that change to happen when the developer's context is in that space. So, you're reducing that context switching. So, she stops cargo-culting. So, she reviews the pull request as they come in to stop the cargo-culting of technical debt. And she guides the refractoring, which I just talked about. And she also praises you. So, if you incidentally improve some code, and it actually incidentally fixes some of the technical debt that the CodeLingo platform has detected, you get praise because she's about educating your contributors. She's not a linter. She doesn't just find all the bugs. How it works, basically, it works with .Lingo files in your repository. And inside of .Lingo, you just have this. This is literally all you have to do to write a tenant. And the tenant that I just described, this is literally all you have to write. It's based on YAML. And then this is a DSL. The grammar of it is the BNF file is maybe 50 lines. You can learn it in a day. It just works on node branches and leaf branches. So, we're just writing a little pattern here. This is a function. So, each one of these is a fact. And you write a segment of facts. And what facts are available to you dependent on the lexicon that you pull in? Now, a lexicon can be, it's a domain of knowledge relevant to the software development process. So, the back end of the lexicon is actually Docker container. And inside that container, you can use any language to do any analysis that you like and define any logical facts relevant to a particular domain. So, for example, you could actually suck up a lot of the existing analysis tools. The other point here, you can see here, FUNC is actually an inbuilt common lexicon. So, this will actually find a function in Python, Go, PHP, what have you. But then, if you want to express more specific facts or facts from different domains, you can pull that in. So, this is actually quite cool here because we're talking about a function. But then we pull in the lexicon domain and suddenly we're not just talking about a function. Sorry? One minute. So, talking of time, that's exactly the point I want to make here. So, now we're not talking about a function as a static bit of text in a file. We're actually talking about a function that exists in time. So, we can now actually define a pattern that says, find the function, find the number of arguments that function has in the previous commit. So, everything under here is in the previous commit. Assign that to this variable and then we jump out here. And in the current commit, does this same function, find the same function in the current commit, does it have more than three arguments and more than the less, more than more arguments than it did in the past commit? And that's what enables Clare to do that review. And that's just one example of one lexicon that you can pull in. You can pull in lexicons that really anything that you can think is logically relevant to the software development process. And thank you very much, Jesse. That was fantastic. So, up next we have Marcus Holderman, but first, Grace Nolan, who's going to tell us all about how to sell computer science. At least she will once she gets up here and sets up. Right. Yeah, Grace Nolan. Okay, hello. So, one of the things that I've heard quite a lot at this conference so far is people's interest in computer science education and outreach. And I recently was doing a research project which kind of talked quite a bit about this. And I thought that maybe you might be interested in some of the things that I came across when I was doing these studies. So, one of the top concerns that people seem to have or problems are around perceptions. So, stereotypes, we talk about this quite a lot. And there was one study that I looked at where they did find that stereotypes were formed in about two minutes and these lasted for about at least two weeks. So, they kind of checked in at different points in that two-week period. And they found that for people who kind of contradicts those stereotypes were taken kind of like a little bit more seriously and people could envision themselves being in that role. So, that study was around students talking to other students, like ones that were studying computer science and moving on to the next thing. The next one that we looked at was computer science for social good. So, this idea is around that, you know, when you're talking about computer science, often people don't actually know what it means or what it leads to. Like, you know that medicine's going to lead to being like a doctor or a surgeon or those kind of things or doing law is going to lead to like a whole manner of things like lawyer, being prosecutor or whatever and same with engineering. But a lot of people still don't really know what doing computer science could lead to. So, some of the examples that some of these researchers like looking at is like looking at like humanitarian free and open source software type things or using kind of disasters as a way of giving examples when in like group situations. Like for example, if you've got, there's been a natural disaster in everyone's and like a game stadium, how do you sort the people so they can get their rations and that kind of thing, like so you can kind of use that for teaching computer science concepts. The next thing was the importance of considering the context of the students that you're working with. So, before going to work with a group of students, think about them and think about where they're coming from and what their life is like and kind of try and tailor it to that. But avoid pink washing if possible. If you're particularly targeting, you know, female students, you want to be careful not to inadvertently perpetuate stereotypes by, you know, talking about like sewing and cooking examples and stuff like this because people do that and it's not so great. The next thing is the outspoken minority. So, if you're working with a group of students and you have some students who, you know, they're really enthusiastic and they're bringing up all these points about lots of different technologies and it, you know, people, it can be quite off-putting for other students. And I quite like the strategy that Maria Claude did from Harvey Mudd where they would pull those students aside and be like, hey, it's really awesome that you're enthusiastic about this and you may not be aware of it but, you know, it can be a little bit of putting to other students. How about we talk about, you know, some of these things that you want to talk about, like offline, how about we talk about it, you know, on the side and let the other students have the space to learn and that kind of thing and that seems to have worked pretty well. There's, I don't know how many of you have heard of CS Unplugged which is some activities that Tim Bell has been coming up with which is a way of kind of teaching computer science but away from the computer. So for example, acting out sorting algorithms and stuff like that. There's like a whole range of them and they're really awesome and they can be quite a good icebreaker as well. One minute. And basically like join forces with people who are already doing really awesome stuff. Like take a look at Tim Bell's work with CS Unplugged. There's gather workshops which are at the high school level. There's Code Club Aotearoa which is a primary school level. Mind Lab, Code Avengers, Future in Tech and there's like, there's a whole bunch of stuff. So if you want to know more about these things then come and find me later or tomorrow or something like this and I'll like gladly talk to you more about it. Great. The end. Thank you very much Grace. Hello. Cool. So, Jordy Tablata if you can come and get set up please and Marcus Holterman is going to be presenting our next lightning talk hopefully. Shall we start his timer now? I think so, yeah. Unplugged. Unplugged. Let's move this one over here. I'm going to do a live demo. This is awesome. No, I'm not. Who here in the room uses Django? Good point. Let's start off with creating a project. Let's talk about Django's Google Summer Code project. Tim Graham and I mentored a student called Access. He actually started or implemented class-based indexes for Django. When this is going first then... So let's install the current Django development version. And when we have that done we can look at how we can actually use them. Let's start a new Django project and let's call it GSOC and let's start a new Django application. Let's call it example. Now let's start editing the settings. Let's activate the project. And let's edit the models. So let's create my model which inherits model name, which is a draw field, which has a maximum length of 150 characters. And now we create a meta class and now this is new in one point. It's going to be new in 1.11. There's an indexes attribute which is a model of type or it's a model index. This takes a fields attribute which is a list of field names you can define. And it takes a required name which is the one the index will have on the database. Now let's create the migrations and see what the migrations look like. Why is it not showing? This is bad. This is bad. Anyway, an example. There we go. So what you can see down here we have this new index. Awesome. Well, Django was able to do this with a DB index on the field. What's also new is that you can have other types of indexes, for example, Django indexes. Let's go on Postgres. Let's change this to Django database and open the model again. Let's go in there and import the Postgres JSON field, for example. And the JIN index for Postgres, from the Postgres extension, from the Postgres dependent indexes. Now let's add the JSON field here and add the, with an empty default and let's add a JIN index here. One minute. So much time. So much time. Now let's see, make migrations. Let's run pip install psychopg2 because that's what we need to do before. And we should be able to see the JIN index being created when we look at the SQL output here. Damn. Recording screen sessions or recording session batch sessions is apparently not entirely working. Give me a second to replay everything. It gets so fierce. Much fast typing, Mark, because it's amazing. Now it's a piece equal. Thank you very much. I was sure such a fast typist as yourself would have been able to finish the entire demo in five minutes. Few typos next time. Yeah. So Tim Penhey, if you can come and get miked up, that would be fantastic. And Geordi Tablata is about to tell us about Wagtail and Meetups. Oh, yeah. Pause it. This is not fair to him. It's actually a technical issue. Okay, I'll reset his timer. Yeah, it's Chris himself. Yeah, once you can get Mac OS running on an FPGA. Thank you. Yeah, so my name is Geordi. I work for Coordinates in Wellington and I like to talk a bit about Wagtail. I believe there was a presentation last year at PyCon about Wagtail, but maybe some of you already know about it. I wasn't there, so I just like to make this introduction. So Wagtail is a CMS. It was originally developed by Torchbox, which is a UK-based agency, and they open sourced the project two and a half or three years ago. It's a Python, obviously. It runs on top of Django, and it comes with a bunch of features that make it very, very attractive for developers, and that's why I started using it. So as I said, it's been around for two and a half years, and it has already like a good user community. It's really easy to get involved, and it's been using around the world, not only by Torchbox, it's original creators, but agencies all over the world, people in the US. And it's been used a lot already in New Zealand and Australia. So there's a web agency called Springlot in Wellington. They're using it heavily, and there's another web agency in Australia. Take Flight that are using it. So it's been used by big websites like the New Zealand Festival or Red Cross, New Zealand Red Cross. Contributors all over the world, as I said. There are online demos that you can go and see, have a play with it. I wouldn't recommend it using it for really small sites. You can use Lector for that or maybe Flask, but if you really need heavy CMS that is going to be used by several users at the same time, you need a good workflow for your content editors and you need a good user experience at the same time. I would definitely recommend Wachtel. It comes with a bunch of things that are very useful from a development point of view. Really easy to plug with Elasticsearch, which is definitely a useful thing to have. You can plug your own template engine, Django templates, Jinja. It comes with a form builder as well. Excellent documentation. I guess because it's based on top of Django, they wanted to keep the same level of quality dog-wise. It's really good. It comes with an API package that uses the Django REST framework, which is awesome. You can share the content of your pages across any other applications that you have using that. That's really good. It can handle a good amount of pages. This example, more than 10,000 notes. This website is the one that I was showing you. This was developed by Springload, along with MasiYudi. This was scraping the flags from the government site. I'm creating one page for each flag using Wachtel, and it was awesome. Besides the product... Oh my God! Keep going, Jordi. There's a bunch of repos that I wanted to show you. Like the Wachtel itself. You can see a good amount of users already. It's easy to stack in and to get stack in, sorry. Basically, I wanted to share my personal experience with this project, because it was the first one that I personally got involved with. There's usually an open source that you can get quite intimidated or you don't know how to contribute to something. This was a good example and a good experience, because the guys running the project are quite welcome. It was easy to contribute to it, and this led to my first contribution to Django that got merged like two weeks ago. Yay! This also led me to create the Wellington Wachtel CMS Meetup along with Springload. Yesterday, someone was doing a luscious talk saying, what if I'm not a native English speaker? Look, go ahead, do it, people are going to come. Now I get messages every week that when's the next meetup? So really, just go ahead and do it. Thanks. Thanks, Jordi. We know that the AV people should be not seen ideally. But everybody, please thank Ryan Verna for fixing everything during the middle of that talk. Yay, Ryan! Alex Hogue, if you can come and get mic'd up, please. In the meantime, Tim Penhay is going to tell us about push notifications. All right, so Tommy asked me if I was going to do a talk this year, and I was like, yeah, yeah, yeah, and never got around to submitting it properly. So this is my talk very shortly. So push notifications, we've got a start-up, and it's a Django app with Postgres database, and we've got users who have phones. And we want to notify them of changes. Let me see if I can just get that. All right, so we've got iPhone users, because for some reason they're popular. We've got Android users, and I don't really care if we have any other users because I'm not going to deal with their phones anyway. So we've created an iPhone and Android apps, and I actually use Xamarin Forms for that, so C-sharp, but we won't get into that here. So Apple has a thing called Apple Push Notification Service. It also has a sandbox version, which is the only thing you can do if you're not going through the app store. It's a royal pain in the ass to use, and Android's got the Google Cloud Messaging service. So we wanted to notify our users of things that happen. So what we have to do is when you install the app, you have to run a particular API call appropriate to the phone. That will give you a token that identifies that phone. So that identifies the phone to the push service itself. Then what you need to do is tell your app about that token. So when the user logs into the app, we then go and get a token, and we know who the user is there, and so they then push that token up to our web page. So we have a page which you can send the tokens up to. So now we've got that token up on the web server. So what I'm using is salary for asynchronous task execution on the server, and there's a Python library called BOTTO, which allows us to talk to AWS services. AWS has got a service called the Simple Notification Service, and that abstracts nicely Apple and Google's end user endpoints. So what we do is we receive a call on the web server. We then create an asynchronous task to register that phone endpoint because AWS won't talk directly to those endpoints. You need to give them a token, and they give you a different token. So you've got your GCM token, you give it to them, and they'll give you an SNS token, and that's what you use to talk to SNS. So we then need to store that token against the user in our database, and we have someone that comes along and says, right, we're going to make a change on your system. So we want the user's going to, the system, the website, someone's busy doing stuff on it, and we want to send out notifications to our users. So let's say someone's cancelled a game because that's something that we're kind of like people who are supposed to be at the game to have their little phones go bing, right, and let them know something's going on. So we have, someone's edited the event, the event's being changed, we go, oh, so that view post initiates an asynchronous task to send off the push notification. Salary worker will then pick up that task, queries the database to find all the affected users. We then got all the affected users, we got all the SNS tokens for those users. We then constructed the wonderful SNS payload, and then we send that data to every token, and the phones go bing, and there were many, many, many issues, and maybe I should have done a real talk and we could have covered them, but I'm done. Fantastic, thank you very much, Tim. So Barry and Rob, you are up next to get mic'd up, though we only have one spare mic, so we'll figure out what to do with that. But first, Alex Hogue is going to present something I can't actually read as handwriting, so I'm sure it will be very interesting. Thanks, Alex. Thanks. Can you all hear me? Is this microphone happening? Okay, good. Yeah, okay, so earlier this morning, Tommy said you can give a lightning talk on anything, and so I'm here to really destroy the structural integrity of lightning talks at KiwiPiCon and leave a smoking crater where it used to be. So does anyone want to see a magic trick? Yeah? Okay, let's do it. So does anyone have three ropes that I can... Okay, it's all right, I bought some. It's fine. But like just in case, did someone put their hand up? Are these really organized ropes here? And you can just trust me that they're completely normal ropes, and so I'm just going to start the trick. No, no, I'm not. Can I get somebody to look at these and convince themselves they're normal? Anyone? Thank you. Time doesn't know what normal is. So take those ropes and look at them for as long as you like and convince yourself that they are not stretchy, that they are not magnetic, that they are not AWS Amazon cloud enabled. Make sure... And what's going on with the ends of the ropes? They are different lengths. All three of them are different lengths. One of them is very short, one's longer, and one's pretty long. Okay, that's good about the length, but what's going on with the ends of the rope? They are like little shoelaces. They've got tabs on the end. Yeah, they have... Yeah, I did sticky tape the ends of those ropes. Okay, are you convinced that they're regular ropes and not trick ropes? Sure, why not? Yes, I am convinced. If you think you know how this trick works, don't say anything and keep my secret for everyone else to make some more fun for them. Now that you've looked at the ropes, could you say how you describe the lengths again? One's like half a meter, one's a bit shorter, and one's very short, like 10 centimeters. Okay, I was going to go for short, medium, and long, but look, that'll do. Some people can't handle it. Never ask a programmer. Some people can't handle it. They're like, how short are they? What are the lengths? That one's got sticky tape on it. People can't handle it. Anyway, for this trick, I'm going to make it look like they're all the same length. Obviously, they're all different lengths, because you saw them, but it's going to look like the same length. So it's a trick of the light optical illusion thing, I think. So you're going to have to tell me when they look the same length. So do they look the same length now? Say no. Good, you guys are getting good at this. You have to tell me if they start looking at the middle like this. Now do they look the same length? Yeah, they all look really short, but not like this, right? It's only good like that. What I do is I just stretch them and pull them like this. Does it now look the same length? Everyone's like, yeah. So look, if this trick is too confusing with three ropes, we can just do it with two ropes, that's fine. I'll keep this one in my pocket right here. If the trick is too confusing with two ropes, we can just do it with one long rope. That's okay as well. The thing about having one long rope is it has one middle and two ends. If you don't think about it too hard and please don't, then you can move the ends to be somewhere else. Stop thinking about it, don't do it. If you have magic hances, it's like me, then you can just cut the ropes and move back to two ropes where you started. But sometimes when you're doing your magic trick rope thing, here we go, you have your two ropes and you turn them into one long rope too far. Now you have just this thing and two little ends and the trick is ruined, you can't do it like this. So to get it to go back on, it's easy, you just massage it gently like this and it goes back on. You have to be gentle though. So if I want to do this trick again, I have to do the whole thing with magic hances and getting back to two ropes and now if I want to make them all look the same length, then they already do look the same length. So I need someone's help to do it. No pressure, but here, could you take this rope please and just tie it to the end of one of these. Any knot you want. Feel free to phone a friend with a knot if you want. Okay, whoa, Oscar's doing it by himself. What is that? Okay, yeah, sure, that's a knot, sure. Okay, so now you can see, my knot and Oscar's knot down here are the same length except for this one because of the knot but it's fine. And so to get them to be back from the beginning you just move the knot. You just go like that, don't think about it please and then when you undo it, here's the short one and here's the medium one and here's the long one. This Oscar. Thank you very much. Thank you very much, Alex. Thank you. Oh, thank you. Wait, we will have a spare mic hopefully. But first, Barry and Robert are going to tell us about sprinting. And their time has started. Check, one, two, okay. Yep, alright. So yeah, Barry and I are running CPython Development Sprints at Tommy's reprise tomorrow and we want to remind, not tomorrow, Monday. Well you guys should give a lightning talk because clearly we don't know how to work with internals and how to work with the code and the bug trackers and get patches up. So if you'd like to help make Python better you should be there on Monday and Tuesday and that's all I have. Well, you're too young. When you said talk loudly that's not what I thought. That's how enthusiastic I am about Sprints. So I've been going to pycons for years and years and years and I really think that at a Python conference you get to sit in a room with a bunch of other people who have similar interests and you just get to dive into code and you get to do what you think is fun and you... Okay, so for this sprint if you know C that's great you can dig into the CPython internals but don't feel like you have to because there's lots of Python in Python to do as well the standard library and so we'll talk about how to do how to clone the repos and look at the bugs and create patches and get a building on your machine sometimes a bit tricky and we've probably seen all the ways it fails I think. So I think you can pretty much do it. I know Linux we should be pretty comfortable with but we could probably do it on Mac as well. And I can solve Windows as well. You know I encourage you to come to the sprints because they're a lot of fun. Anything else? No. Thank you very much. I didn't know to check the conference details. Is there a limit to the number of people? That can... No. You said there was so... Yeah, okay so there is a limit to the number of people so if we go over the limit you can pay either Rob or I to get in. You can pay me. I don't say anything about what you get in. It's at the University of Otago and the details are on the NZPAC website. Yeah it's not here though it is somewhere else. It is somewhere else. At the University. I've said that three times. At the University. Where? At the Polytech. At the Polytech. Don't let me up front. So if you want to not sprint on C-Python on Monday and Tuesday show up at the University Campus and for those of you who are interested in learning a bit more about the internals of C-Python perhaps getting your first contribution landed go see Barry and Rob at Otago Polytech later on on Monday. So next on my list is somebody who's listed themselves as not Katie McLaughlin so if Graham could come and line up and in the meantime Jürgen Brandl is going to tell us some stuff. Hey. Can you hear me? Alright. So I just looked it up the Java programming language is 21 years old. Yeah. It can drink in the States and that's probably a good thing. Right. And Python? Anyone know? 24? 25. 25. 25 this year. Python is older than Java but for some inexplicable reason Java went all mainstream and everything. Python not. And I guess the reason is pretty clear Java had a big corporate sponsor behind it and still has and so anyway the rest is history as they say but I have a question here and I have actually a bunch of questions that's what I'm really here for and I wanted to know from you if I could just see a show of hands how many of you have learned Python in the last two years? Alright. And of those keep your hands up. Keep your hands up. Now keep your hands up if you have learned Python because of university or your employer, your work. Okay. So I think a bit more than half. Alright. Okay. Cool. Now let's go back a few more years. How many of you have learned Python around 10 years ago? Around 8 or older. Let's say 8 years or longer. 8 years longer. Yeah. Alright. Yeah. Okay. Okay. How many of you how many of those with hands up? Keep them up. How many of those did so because of uni or your work required it? That is less than half. That's less than half. So I think what we can see from this is that Python okay. I just said Python has gone mainstream in many ways. You can find job ads for Python developers and that just wasn't the case 5, 6, 10 years ago to such an extent. If large doggie companies like Cisco and Telcos and such if they can employ hoards of Python developers you know it has gone mainstream. But there used to be the time when Python was the hot new thing and you had to go to your organization which was doing C sharp or visual basic or Java or some other crappy thing and you have to tell them hey let's use Python for something because it's cool and it's great but what do we see here at this Python we have two talks by traders who want to talk about Rust and Golang the outrage. So my question is I will admit the fact that I work for a company which does Golang stuff as well. So my question is Python is not the new hotness anymore it's not the latest cool thing it's just a very well developed well established tool so have we seen the peak hype cycle for Python have you gone past it have we seen I don't know if we have seen peak Python enterprises still adopted but are we past the hype cycle are people are developers looking out for new languages new stuff what do you think who agrees who would agree with that who would agree with that Python really isn't the latest greatest anymore alright all of us out but yeah so I just wanted to just that was really my question here the rest of you still think that Python is the greatest thing out there greatest programming language don't want to learn anything else one minute you know we have another slot for lightning talks Tim you know what but hey I think that I'm really glad to hear this because I would love to keep working on Python so I'm encouraged to hear that there's still a lot of growth going on in Python alright anyway I was just what I was thinking about because I saw these other talks thank you thank you very much Jürgen so Ian Reeves if you can come and get mic'd up please wherever you are Ian are you around great so our next presentation is by not Katie McLaughlin who is presenting about not Tom Eastman and your time has started so hopefully you all here yesterday where you saw the talk you got a problem so so what happened yesterday we had Tom Easton and Katie McLaughlin did a talk of his so let's consider this in Python though so we have a class called Tom Easton who has a who I am I have returned to Tom Easton so we create an instance of Tom Easton and we print the result of that and we get Tom Easton okay we have a class for Katie McLaughlin same thing we're going to print out who am I and we're going to get Katie McLaughlin all looks good so far now Katie made the statement that she was not Tom Easton but is that actually correct if not Tom Easton we'll print not Tom Easton otherwise we'll print Tom Easton what's the answer Tom Easton so I don't think her statement's right so what about maybe she meant to compare this to the type and not the instance of Tom Easton so we'll go if not Tom Easton and the answer is no it's Tom Easton both of those fail because the only way that that can be correct is that it's you're comparing to none and we've actually compared to an instance and a type and so they're both always true okay so that's why it fails let's see what Graham has to say so maybe she meant this maybe if Katie McLaughlin is not Tom Easton is this going to work Katie is not Tom so yes maybe this is actually what she meant now just to make sure where our logic is correct is if Katie is not Katie what are we going to get well we get Katie's Katie so it's good we look like we're going fine now what though if science actually got cloning to work and we had more than one instance of Tom Easton we had a whole room full of Tom Easton's here the previous check worked because we were comparing the ID of the object of each one and so we were actually just looking at IDs so what we really want here is we actually want to compare to the type because it's a whole room of you where you want to know whether she's actually going to be not an instance of any of the Tom instance and so if not instances Katie of Tom Easton then Katie McLaughlin okay so it works good we're doing well so there what Katie was actually doing was she was actually being a proxy for Tom in some way she was pretending to be Tom so we can do this with wrapped because in wrapped we have an object called an object proxy so we can create an instance of Tom we then create an instance of Katie which has wrapping Tom as a proxy so we print out Tom Easton who am I is Tom Easton and Katie McLaughlin who am I Tom Easton so she was pretending to be Tom so what else can we do here is Katie McLaughlin an instance of Tom of type and the answer is Tom Easton so Katie is actually Tom I get this right I've knocked something up there okay going so this is yeah I've stopped something Katie of Tom no of Katie so Katie is Tom but let's make sure and Katie is an instance of a self and the answer is yes so Katie is actually both Tom and Katie at the same time when we use this proxy okay so how then do we know which is the real Katie okay in that case we need to look at the type so the type of Katie is Tom Easton and no it's not it's not Tom so the way we determine whether it is Katie is we look at the type so what do we learn that you have one minute okay no there's more than one way to skin the cat and this is where as a newbie to Python you can get a bit complicated in times in terms of when you need to use not equals or is or is not how to compare types and so there's always complexity around this so yeah so it can get messy when you're doing stuff with types especially do make sure you're using the right contract to compare things otherwise it can get become a mess so in the end who am I Graham Dumpleton I'm an instance and I am not an instance of either Tom or Katie okay true thank you I've always wanted to say this on stage Dumpoulton thanks for that Graham Tim Mitchell if you can come up and before that we have Ian Rees who is going to tell us about Python at the South Pole apparently the place is further south than here who knew it that's right and colder let's see sorry cool where is my mouse yeah how do we yeah trying to find the find the cursor left there we go sweet mirror displays cool so I should apologize that I was looking around for the source for this talking all I could find was this PDF this talk was made about 18 months ago for a pretty different pretty different audience it's obviously not working cool does this make it a little bit better okay cool yeah so instead of talking about the how or the what or the why we're talking about where so I I was really fortunate a couple years ago to get a job working for Ice Cube it's a neutrino telescope located at the South Pole so it's sort of a job that's kind of a mix between a bunch of different sort of sysadmin sort of programming bit of shoveling all sorts of random other jobs so Ice Cube is a neutrino detector that works basically by detecting Schroenkov radiation I don't really understand it but the idea is essentially that you bury a bunch of things that are like CRT TVs wired backwards in a bunch of ice and you can detect neutrinos so my buddy dog the second guy on this talk he's the physicist so this talk was a bit about our year at South Pole this is a bunch of stuff that's only really relevant if you want to get a job at South Pole it's a long way let's see this is not going could we get unplugged or rebugged there we go okay so you get to you get to South Pole by way of Christchurch most of the time so there's a basically a flight that takes you down to McMurdo Station it's for the south you can take a boat and then from there you take another plane to the South Pole flight cargo class which is kind of fun in the back of a C-130 with skis pretty cool plane McMurdo Station is kind of what people think about I think when they're thinking about Antarctica it's got penguins it's got animals water sometimes where in contrast South Pole is incredibly high and dry it's about 3,000 meters pretty much nothing there definitely nothing alive year on average temperature it's about negative what does it work out to be negative 50 something you see so we were doing computer work down there though Ice Cube gets a quite a bit of data from these from these what are they called the photomultiplier tubes about a terabyte a day which all gets stored on tape or at least when we were there all got stored on tape so I don't know how many folks are familiar with tape but that's LTO3 data tape hooks up with Ultra 320 scuzzy so it's kind of old stuff but it turns out that newer tapes don't really work down there due to problems with static that sort of thing so we in our winter we had some pretty severe problems with tapes this is my buddy Doug he's the other Ice Cube guy that was down there trying to sort out which tapes are good and bad that's quite interesting yeah so the same effect that drives the seasons in most of the world drives your sunrise and sunset at South Pole so that means that the sunset and sunrise are kind of kind of a big deal it gets a bit a bit too cold in the winter to fly airplanes you might have heard in the news what was it two or three months ago there was a winter medical evacuation from South Pole I think it was the third one that's ever happened does not sound like a fun time to me about nine months of the year no planes in or out so it's just you and 40 other crazy people just a little bit of fresh fruit fresh fruit gets brought down at the last so the last last big airplane at least so that doesn't last terribly long time let's see stuff we do down there the station is actually quite large we've got a gymnasium although you'll find that most people don't actually get to use that too much just because the elevation is such that you spend most of your time bent over breathing or trying to a lot of books a lot of movies a lot of really interesting and talented people the guys that are in this band on the top left are all other geeks we're out of time sorry sweet cool thank you very much so yeah thank you Ian that was cool so we're starting to actually run quite low on time we have five talks left in the list and probably only time for three of them we'll see how many we can get through if Mano Finlay-Smiths can come and can come and mic up that would be fantastic but first Tim Mitchell is going to tell us about Sequelite I have nothing okay my talks actually Sequelite and Unicode who thinks this is going to be a happy story two people but Unicode just works optimists optimists check my display settings again I've had these in between the years still technology displayed at the properties displayed at the property get them also this is 60 hertz this should be fine yeah should be right should be right should we try extending instead oh my god if he's talking you display extending it all no display okay so Python does Unicode Python has database that database is Sequelite and that database supports Unicode you can create text columns you can stick Unicode objects in them you get Unicode in your database you can pull it out however you can put Unicode in you can put Unicode out but if you try and do anything with Unicode and Sequelite oh dear so if you read the Sequelite documentation and you talk read up about case collation ASCII only so if you try and select lower a case column C you are still going to get all your uppercases A till there's anything that's not your bulk standard A to Z this was a huge pain point for us because we were just merely writing software and selling to England and Australia and the US then we started selling to Spanish and the people putting rock codes and with tillers and other accents and you know our Python code said they were the same our database said they weren't so that was our pain point however you read up on Sequelite documents you can build it with Unicode support that's awesome and you look at it and this is going to be really tricky and oh Unicode support doesn't support case folding okay oh there's Unicode you can build it with that if you're on Linux but we're on Windows okay we can build it hooray you've got it working hooray and it has a different case mapping table to Python oh okay however SQLite Connect database has allows you to create your own functions and your own collations so you simply connect to SQLite go create collation no case and you pass it in a function that takes two strings efficaces them and compares them okay so it makes your queries really slow in some instances because you're calling back into Python for every comparison but you can actually make SQLite do case folding exactly the same as Python and you can avoid a lot of pain by doing so thank you that's my talk thank you very much for that so let's see to mic up next we have David Dudson I think but first we have Meno who's going to tell us about iMap client I was hoping to just flip it up on the other screen yes yeah that's not a big deal that's definitely not working right it's easier said than done totally lost the window some reason it doesn't want to go don't trust a room for programmers to whistle on impromptu don't need it we'll just skip that alright yeah go for it good luck figuring out my window setup windowing setup anyway I'm talking about iMap client which is a project I maintain everybody know don't worry about it it's really an important does everybody know what iMap is I guess just about everyone will it gets an email from an email server you've got folders and all sorts of amazing stuff it's quite an old archaic sort of protocol which makes it really fun to work with if you've ever has anyone here tried to use iMap Lib in the standard library yeah did anyone enjoy it yeah iMap Lib is pretty crafty it's very low level it doesn't try to do very much for you which means that everybody who uses it ends up doing the same horrible hacks using regexes and string splitting and all sorts of horrible things so a long long long time ago I needed to deal with iMap and for the job I was working at and I started using iMap Lib and I realized this is terrible and there's nothing better out there so I started a project which ended up being iMap Client the big big wins when you're using iMap Client is you don't have to do all that horrible trickery splitting strings I was going to show some examples but hey the project doesn't work and the other really think nasty thing about iMap Lib is it doesn't really generate many exceptions so you end up having to after everything you do with the iMap server go and check did that work which is you know not very pythonic so iMap Client fixes all those kinds of things it deals with unicode properly now finally it works from python version 2.6 right up to 3.5 skipping some of the early freeze who cares about those and yeah it just makes your life a whole lot better so if you ever need to use iMap with python don't reach for iMap Lib reach for iMap Client that's it the website is iMapClient.freshview.com that's it well thanks for that man so unfortunately this next one is the last we have time for given the the time constraints I've been given so for those of you who submitted a lightning talk but didn't get a chance to present it I'm kind of sorry about that we might have time tomorrow I'm not sure David is going to be talking to us about git python we'll just use the it doesn't really matter we'll deal with it I'll just go anyway so can I get a quick show of hands as to who does not use python for their day-to-day development who actually uses something else and can you keep your hands up if you use git still lots of people and who uses python for command line tooling oh no one good oh sorry including the people that we're just talking about okay so what is git python well there's a it's basically just a library for interacting with git at the the pythonic level and it's very simple to use and we have problems such as the ones on the screen right now that we encounter on a day-to-day basis that we shouldn't really be thinking about they should just be working this is a lot simpler than something like a printer or you know any other like sonar servers or anything like this just simple white space simple naming conventions stuff that you can do through regexes stuff that you can do just by looking at a file you know checking your copyright notices have the right year on them that sort of stuff is so stupidly simple and half the time you don't think about it and bugs well not bugs but formatting tweaks slip through because at one time you get it wrong and when do you actually catch these issues most people I should mention don't catch them on commit unless you've seen it while you've been developing code reviewers might pick it up but it's not their job their job should not be to check that your white space is correct it should be that your code works and as it was intended and your static analysis tool might also pick this stuff up but chances are you're not going to be able to do that because your static analysis tool on every commit is going to take 24 to 48 hours before you actually check it and by then you're beyond that branch you've pushed out your code and things are going you know it's there you have to add another commit to change the formatting sort of stuff so here's some random example code for a really simple problem we just create the and then we just go through the commits and call our random function which you have to find at the top just to check for problems this is where it gets a little bit complicated because we're dealing with get and get deals with blobs and diffs and this sort of stuff so what we want to do is we want to diff two things together and we want to make sure we create a patch because this will actually show us the actual code and not just numbers and hashes and things like this and well diff index is the list type and we sort of iterate through them and we have to go through whether we're looking for modifications renames, additions, deletions this sort of stuff and we can filter all that stuff out and then we roll our own function to check for problems and we can get each sort of blob of your commits and see whether or not you've added problems or removed problems or you can do crazy stuff with it so I'm not going to write anything like this for the purposes of this Lightning talk but I'm just saying it's out there and what you should really do and what I have on my dead machine is I've set it up so it checks the blobs gets line numbers gives you the exact problem with the code with a line number and it's automated to an extent where you can automatically fix up the code by knowing exactly what's wrong and what line number and what file to make the rebase and fix up process by scanning the commit history to find the introductory commit and Python and then rebase that change in without touching anything on the command line and it's all just one command and you should always just exit on finding an issue if you're doing things through rebasing because this sort of stuff allows you to merge changes with other people's work for example it's broken you're formatting or copyright notice or whatever it is and you can instantly see that because your rebase will stop you can amend it and then continue on so where do you use this hooks commit hooks push hooks everywhere like this because you're doing very small regexy type stuff oh thanks for that David so that is basically all the time we have because we need to get to dinner everybody please give a round of applause to everyone who presented the lightning talk this evening