A path paved by serendipity
The kindness of another Ansible engineer made it possible for me to attend PyCon2016. He couldn’t make it, and graciously he offered me his ticket. I wasn’t sure if I’d be allowed to go until mere days before the conference began. I received clearance, booked my flight, and packed a bag in a span so short that I thought it must be a dream sequence. The randomness of life usually doesn’t muster so neatly, right?
First, I need to say that PyCon2016 is the best conference I’ve ever attended.
PyCon was unlike any conference I worked while in the video games industry (PAX, ECGC, GDC). In the past, I’ve been one small person in a throng of 70,000+. At ~3,200 attendees, PyCon felt warm and familial. I asked everyone I met “how do you know each other?” and received responses that mapped across many years and shared projects.
At booths in the games industry, I hustled: try the demo, register for an account, tell a friend! At Ansible’s PyCon booth, I listened. In three days, users described to me elaborate menageries of systems managed by Ansible automation. I was floored by the enthusiasm of most engineers I talked to. The fresh adopters were most ecstatic: so many were pleasantly surprised that their problem took hours, not days, to solve to their satisfaction.
I attended about half a dozen talks in three days, and queued up more for the plane ride home. I spent a lot of time furiously Googling. Stream of consciousness reactions and tangential research below.
Machete-mode debugging - Ned Batchelder
- Embrace ephemeral code. Don’t be afraid to write jank to isolate a problem and extract information about it.
- You probably don’t need to append to sys.path.
- importing a Python module will also execute it
inspectis a nifty module in the Python standard lib that I hadn’t used before. The talk cited an example where
inspect.stackwas used to a inspect a call stack find the source of a double-imported module.
depthis the contextual level passed to
- Monkey patch via
site-packages/*.pthto ensure patch is applied before the function is called
pdb.set_trace()can be used inside of a trace function. Ned’s example and one of my experiments below:
- Followup talk: How C trace functions really work
Networking without an OS - Josh Triplett
I attended this one because I have a pet interest in projects that run Python on bare metal. I started building small programs to run on a WiPy, which is a microcontroller running a port of MicroPython. Although I can write code and execute it on a WiPy, I don’t have a strong fundamental understanding of how MicroPython works, especially because each port seems specific to the given board’s architecture.
About 95% of this talk went way over my head. But here are my entry-level info bullets:
- BITS runs on 32-bit BIOS or 64-bit EFI
- Underpinning tech: possible to run Python 2.7 in GRUB 2 by adding Python’s source files into GRUB’s build system.
pyconfig.hto declare which features are available (exclude all requiring an OS)
- Parsing overhead reduced by using Python bytecode
- Interface to EFI provided via libffi. The “extensible” in “EFI” means you can create protocols using native C.
libffiis packaged with
Small Batch Artisanal Bots: Let’s Make Friends - Elizabeth Uselton
Using microprojects to stitch together fundamental concepts, with a quick/fun outcome. These Twitter bots are freakin’ adorable.
- @stealthmountain - alerts tweeters when they’ve typed “sneak peak” instead of “sneak peek”
- @viralhulk - retweets BuzzFeed articles in HULK SMASH speak
- @FBIbot - tweets random pages from Freedom of Information Act releases
A Beginner’s Guide to Deep Learning - Irene Chen
I’ve been working through the problem sets in Machine Learning in Action for about six weeks, but that’s the extent of my exposure to machine learning (let alone deep learning networks).
This was the most accessible talk on deep learning that I’ve ever heard. Irene started very high-level (on the subject of avocados), and within five minutes transitioned her audience into examples of forward and backward propagation.
New libraries and toolkits to check out:
Move Things From One Computer to Another, Safely - Brian Warner
My favorite talk! I wrote a long-form response to this one on the plane home, where I write about using Magic Wormhole to fasicilate multisignature Bitcoin trasactions. Read more: PyCon2016 - Down the Magic Wormhole
Revitalizing Python Game Development: Packaging, Performance, and Platforms - Jacob Kovac
Kivy is a library close to my heart.
I don’t have any formal education or background in computer science. I slung lattes and perspired through the first pilot of edx.org’s MITx 6.00 series. While working through that MOOC, I gravitated towards was Kivy - this library made me realize I possessed the knowledge and tools to begin building my own games. In a month, I coded a helper app for my favorite party game, Mafia.
Kivy provides cross-platform interfaces to common mobile features, like multi-touch, gestures, cameras, accelerometers. When I was a new programmer, Kivy obscured just enough complexity to allow me to cobble together high-level logic to drive a Mafia game.
I squee’d aloud when I heard Kivy now supports Python 3 (if you don’t package for iOS). Expect my next blog post to be a writeup describing a 2D game engine, like a Die2Nite clone or an online implementation of card-based game like Arboretum or Mottainai.
I strongly believe that game development space in Python is perfect for engaging with new programmers. Kivy’s toolchain and API are a triumph in simple usage, which is an area larger engines like Unity/Unreal/Crytek/Gamemaker etc struggle with. Having spent time in the games industry, I know that onboarding a gameplay designer to one of these engines takes months and months. I transitioned to brewing double espressos to brewing my own game in under thirty days, which is remarkable, and made entirely possible by Kivy.
So, I closed my PyCon experience with a nod back to the library that originally inspired me to create cool things and pursue work as engineer. The feedback loop goes ever on and on~