Kiwi PyCon 2016, Pt I
Written by Barry Warsaw in technology on Mon 19 September 2016. Tags: python, travel,
In early September 2016 I traveled to New Zealand to give a keynote speech for Kiwi PyCon 2016. I was very honored to be invited, and glad that after 4 years of valiant resistance, I finally gave in to my thankfully diligent colleague Thomi Richards. My wife Jane and I made the 25+ hour journey, and had a wonderful little vacation after the conference.
Here in part I, I'll talk a bit about the conference and my keynote. Later in part II, I'll talk about the vacation part of the trip. I might sprinkle little impressions of New Zealand throughout both articles.
Getting there
In some ways, it's a good thing that New Zealand is so far from the USA, with an additional transcontinental trip away from the east coast. During our summer, it's their winter and they are 16 hours ahead of UTC-4. Meaning that at noon New York time, it's 4am the next day in New Zealand. Or, to put it another way, 8am New Zealand time is 4pm New York time the previous day. I never got tired of the joke with family back home that we were living in the future over there.
So it's definitely a commitment to get there, which makes it all the more breathtaking I think. In a way, New Zealand feels exotic because the first thing that most Americans probably think of when they hear "New Zealand" is the "Lord of the Rings" movies. But New Zealand is a high-tech country, with a low population (under 5 million people in total) concentrated in four major cities (Auckland, Christchurch, Dunedin, and Wellington), lots of sheep and some of the nicest people you'll meet in the English speaking world. They have a real sense of stewardship for their land and environment, as getting through biosecurity was in some ways more arduous than getting through customs.
On the outbound leg we flew to Los Angeles, then LAX to Auckland, then Auckland to Dunedin on the south island, where the conference was being held. We didn't really have enough time to to see the north island, or even get as far as Christchurch, so we mostly hung out in Dunedin and Central Otago which was plenty stunning to us, though more about that in part II.
The conference organizers put us up in the Wains Hotel for the duration of the conference. It was just a 10 minute walk to the venue and nice enough that we booked a room there for our last night in New Zealand. Plus, it was right across the street from a fabulous coffee shop/breakfast spot that had good wifi.
Despite our lack of sleep, we arrived in Dunedin around 9am, where Thomi picked us up and took us into the city. After checking in and picking up the rental car, we actually staved off jetlag and had a moderately normal day. Pretty much for the duration of the trip, we were waking up at 4 or 5 in the morning and were exhausted by 8 at night. Of course, we didn't fully adjust to NZ time until we were on the plane heading back across the ocean.
The conference
Kiwi PyCon 2016 ran from 9-September to 11-September with around 200 people in attendance. In many ways, this brought back for me the wonderfully smaller, less corporate-y, more volunteer-y, more intimate vibe of the early IPCs. With 200 people, you have a reasonable chance of bumping into everyone (literally and figuratively!) and having a nice "hello" or longer hallway chat without the intimidation that the vast numbers of US PyCon attendees bring. I really loved that part of it. And that's with giving full props to Thomi and the other organizers for putting on a professional, smoothly run, inclusive, and downright fun conference on (what to US PyCon organizers must surely consider) a shoestring budget.
The smaller numbers certainly made me less nervous about giving my keynote!
I had two full days to enjoy the conference before my talk on the third day, ironically in New Zealand, the 15th anniversary of 9/11.
As with every PyCon, regardless of size, you just can't make it to every talk. Fortunately all the talks and keynotes for Kiwi PyCon 2016 are available on YouTube.
Day 1
After opening statements and welcomes, the first keynote was given by Lucy Bain, a transplanted American living in Australia and working for Atlassian. She gave an inspiring talk about what it's like to move to to a city where she didn't know anybody, and how she found ways to connect socially through volunteering. By stepping up, getting involved, and really engaging with the communities that interested her, she made a difference and made great friends.
My morning schedule began with a talk on asyncio, the new (in Python 3.4) framework for writing single threaded i/o-bound concurrent programs. I'd used asyncio when we ported Python's standard library SMTP server, releasing it as the aiosmtpd package [1]. Lee gave a great introduction to using the new asynchronous features in Python 3, stepping through the process of turning a simple, synchronous kitten downloading service, into an efficient and faster asynchronous program. For tasks where you're doing a lot of parallel processing on data you're waiting on from i/o-bound reads, you should find asyncio an eye-opener, and Lee's talk is a good place to get a sense of the power of the library. Plus, kittens!
My morning was rounded out by a talk from Clinton Roy on testing with Hypothesis, a very cool package for in a sense, fuzz testing your Python code. I'd seen a talk on Hypothesis at US PyCon 2016 and even played around with it a bit, though I wasn't really able to integrate it into any of my test suites. The basic idea is that you can write "property based" tests, such as "this argument takes a list of integers", and Hypothesis will generate all kinds of interesting corner cases, such as zero length lists and lists of integers with crazy, unexpected values. When it finds a failure in the data set, it can then go on to narrow the failure down to a small, more easily reproducible test set, giving you valuable information about how your code handles unexpected input. The downside is that it's a lot more work to craft these property based tests, and in my own dabblings I wasn't really able to justify the extra effort. On the other hand, if you really need to bullet-proof some mission critical code, it's worth a look.
After lunch, one of the originally scheduled talks was canceled due to a speaker's illness, but the the slot was filled by a really fantastic talk by Graham Dumpleton. Anybody who's used the Python 3 library unittest.mock is probably familiar with the term "monkey patching". Due to Python's dynamic nature, monkey patching is a technique for dynamically modify existing classes, modules, and functions at run-time. Monkey patching can be used for Good and Evil, but it's definitely a technique that's tricky to get right in all its dimensions. The functools library provides a couple of helpers (e.g. functools.update_wrapper() and functools.wraps()) to make this a little easier, but as Graham points out, these too have problems. This is exactly the kind of Python technical talk I love, because it builds the story up from the basics, leading to the problems with the naive approach, and introducing a more thorough solution to the problem. In this case, it's Graham's wrapt package, which is a general solution for object proxying, along with specific tools for common problems like monkey patching. wrapt has definitely made my list of Packages To Investigate.
The rest of my lunch-to-tea slot was filled with the always interesting Random Hallway Track talk. Sorry, I didn't take notes. :)
The last cool talk of the day, was on Rust for Pythonistas. This was the first of two talks by Language Interlopers (the other by a Go enthusiast later in the conference), but this rabble rouser was none other than Rob Collins, another highly respected Pythonista, and a former Canonical colleague of mine. Rust is an interesting language roughly in the C lineage, but providing a much safer run time environment, where object lifetimes are clearly specified, type inferencing is available, and memory operations are safe. Unlike Go however, Rust has an efficient way to interface with existing C bindings, and provides a C-like ABI (application binary interface) making it a perfectly natural choice for C Python extension modules. There are lots of other interesting features of Rust, so Rob's talk and the language web site are definitely worth checking out.
Lightning talks are always fun. Watch Friday's session.
Day 2
Another day, another great slate of talks!
Saturday started out with a keynote by Janet Toland tracing the ethics and politics of four early computing professionals.
The first session of the morning was about SSL and Let's Encrypt by Markus Holtermann, a Django developer. JFDI, meaning, the talk has shamed me into hopefully, finally, getting SSL certificates for my sites (including this one!).
For the second session, I attended the talk on Making sense of setup.py. But while I sometimes enjoy going to beginner talks to see how Python, its ecosystem, and its features are being introduced to new developers, in this case I wish I had gone to Katie McLaughlin's emoji-filled talk on Unicode.
After lunch, I attended a talk by Yuriy Ackermann on universal second factor authentication, kind of the next generation of 2FA protocols. As I'm sure with many of you, I use 2FA in a variety of settings, such as logging into Launchpad, GitHub, my registrar. Even Google, Microsoft, and Apple have jumped on the 2FA bandwagon. PayPal also supports 2FA, but oddly enough, not too many US banks do for their online banking. As the talk describes, there are a wide range of 2FA mechanisms, such as SMS, hardware keys (Yubikeys), and dedicated apps such as Google Authenticator, but all of them have various problems, and potential vulnerabilities. Universal second factor authentication attempts to address these problems, providing the next generation of more secure online logins. It was an interesting talk but nothing that I found to be of immediate utility.
Next we come to probably my favorite talk of the conference. What's not to love about a pile of Python code generating random guitar effects that don't suck (or suck in the best way)? Steve Baker described how he hacked the MIDI to configure a Boss GT-100 guitar effects processor. He'd randomly choose various parameters, and automated sending a small clip of his guitar playing through the signal chain, recording the results for later playback. As you can imagine, this could produce a wide range of heinous, boring, wonderfully ugly, and unexpectedly awesome effects combinations. Music, Python, hacking... yeah, great talk that hit all the check boxes for me!
I rounded out the day with another talk by Graham Dumpleton on his warpdrive project for making Python web application deployment easier. This was followed by a fascinating plenary talk by Lilly Ryan, where she looked at the "first hack in history" involving rivals in early (and I mean early 1900s!) wireless technology. Finally, another lightning talk session ended the day.
Day 3
I know there was something earth shattering happening on the third day of the conference, but I can't remember what it wa... oh, right!
A little background on my keynote. When I accepted the invitation to come to Kiwi PyCon, I asked Thomi what I should talk about. "Whatever you want" was his consistent answer. That's like looking at a blank canvas (or new Cubase project) and being overwhelmed by the infinite possibilities. Constraints are good in cases like this, and of course there are always boundaries, real or imaginary. The edges of the canvas, the genre of music, the intersection of attendee interests and your own. I knew I wanted to talk about Python in some way, but I felt very strongly that I did not want to give a technical talk. When I go to conferences, I really like hearing a keynote that comes from the speaker's heart, something that they've been working through, or thinking about, or care deeply about. Something more than just some cool Python hack. Something with wider implications or applicability. Jacob Kaplan-Moss (of Django fame) gave an absolutely fantastic talk at the North American PyCon in 2015. That's what I was aiming for.
Of course, my other passions are music and tai chi, and in planning my talk I explored ways to tie all three interests together. Having studied tai chi for almost 15 years, Python for over twenty, and music almost all my life, I see so many parallels and connections. Tai chi changed the way I play Music, and Music changes the way I interact with the world. As I thought more about it, I recognized synchronicities in the tai chi principles, and what we as programmers do every day. That's what I wanted to talk about.
But as I started to outline these ideas I realized there was no way I could fit everything into the one hour slot I was given. In fact, I was narrowing my talk down and deleting slides right up until the night before I gave it. My first run through came in at 90 minutes, and until I was standing in front of 200 Pythonistas, I never gave my talk in under 70 minutes. In fact, I never gave my talk in front of anybody until I gave it live, but I did run through it dozens of times. Ultimately I feel like I gave the talk I wanted to give. I'd love to know what you think.
I'll bet I'm the only person to give a talk at a Python conference in bare feet and wielding a sword! :)
Well, with the pressure relieved, and street clothes changed into, I was able to relax for the rest of the third day. I substituted the rest of the morning sessions with some really wonderful, inspiring, and mind blowing hallway track discussion, and ducked out for a lunch with my wife.
I really enjoyed the rest of the talks for the day, including Christopher Neugebauer's talk on change and continuity in open source communities, Dana and Garifullina's talk on Golang for Python developers. I really wanted to attend Tom Eastman's talk on safely handling user-uploaded files but more hallway track discussions consumed me, and besides, all the videos from all the talks are available on line.
The sprints
After the conference was over, a few dozen hangers-on gather for the tradition post-PyCon sprint. A sprint is like a working session where you write code. While it might sound like the most boring way to spend your free time, it's actually some of the most fun you can have at a conference. There's nothing better than sitting in a room with other great developers, most of whom you don't know or have only interacted with through impersonal mediums like email and IRC. At Kiwi Pycon, myself and the aforementioned Rob Collins, helped initiate the rest of the attendees on the workflow and process for finding and fixing bugs in Python. Both Rob and I are Python core developers, so it was a natural fit. Unfortunately, Jane and I only had a few more days in New Zealand and we were determined to do some sightseeing, so I ducked out early on the first day of the sprint, braved the wrong-side-of-the-road traffic, and headed out to the next part of our adventure.
Footnotes
[1] | Note that as of this writing, aiosmtpd is compatible with Python 3.4 and newer, so it doesn't use the new in Python 3.5 async and await keywords. Using these does make the code read more nicely by allowing you to use them instead of lots of yield from statements, so we may drop Python 3.4 support at some point to take advantage of those keywords. |