Sunlight Labs’ highlights from PyCon 2015


This month, a few members of Sunlight Labs continued our tradition of attending the always-exciting annual conference of North American Python developers: [PyCon 2015]( For the second year in a row, PyCon was held in the beautiful (albeit chilly!) Montreal. Huge kudos to conference chair Diana Clarke and her staff for executing seamlessly on an enormous undertaking each year.

## Not just a tech conference

This year’s conference gave us a lot to think about. Pythonistas are spoiled: This conference has fantastic speakers from diverse backgrounds who give talks about more than just writing code and building software. Like most tech-centered conferences, we get to hear about fun new libraries and tools, as well as talks on best practices and the craft of software. However, owing to the fact that Python is also becoming increasingly popular as the language of choice for researchers, scientists and teachers, we also have the opportunity to get a glimpse into fields that you might not expect to be represented.

### Civic hacking

We were excited to see Code for America’s Catherine Bracy give an [excellent keynote on the role technologists can play in 21st Century democracy]( She began with examples of waste and ineptitude in governments’ technical procurement, but quickly moved to examples of open source technical projects developed by civic hackers to address specific problems and help their communities. Many of these projects were also notable because, although they were developed with a particular city or neighborhood in mind, they were also deployed to help other communities. As Bracy said:

>None of these projects on their own are really going to revolutionize the bureaucracy we the way we need it to be revolutionized … but all these projects, knit together and over time, represent not just the capacity to fix what’s broken with government — it represents what the practice of democracy looks like in the 21st Century. It’s citizens who can use their hands and not just their voices to fix what’s broken about government, in collaboration with government, to make communities healthier to make government more responsive and to make democracy stronger.

Bracy also mentioned a read-worthy post by Philadelphia designer Lauren Ancona, entitled “[Stop Waiting For Permission](” Her story of developing [a web app to help citizens understand parking rules in their city]( starts with the sentiment that we in Sunlight Labs recognized: “Just do it yourself. Now.” Lauren didn’t wait for the Philadelphia Parking Authority’s permission to organize and visualize their parking rules. She just did it. She is now working for Philadelphia’s Office of Innovation and Technology, making use of open data (including newly released open data from said parking authority!) to further improve her city.

### OpenGov

Some more familiar faces: We spotted at least two of our friends from [18F]( at PyCon (who, we’re assured, were “speaking for themselves in their own personal capacity”). We got to hear Jackie Kazil’s thoughts on [Privacy, Identity, & User Trust](, informed by her experience working on [MyUSA]( We also had a tour of SQLAlchemy-based data tools thanks to Catherine Devlin’s [lightning talk]( Check out the [IPython notebook](, too!

### Anthropology

Gabriella Coleman gave a fascinating talk on her anthropological research of the international movement known as Anonymous. Her keynote, [Hacker, Hoaxer, Whistleblower, Spy: The Many Faces of Anonymous]( was a fascinating account of the history of the group and its evolution from a group of online trolls to an international, politically active force. This was a history she witnessed first-hand in online communities and through direct personal interaction with those members who, by choice or by infamy, became public figures. This talk shared a title with her [recently published book](, which jumped on to our reading lists right away.

### Open science

Many open science researchers have been active participants at PyCon over the past few years, but this year we were particularly impressed with the [Center For Open Science]( The group practically owned the [first round of lightning talks]( with a lot of presentations about really exciting offerings to help researchers publish and share data to help create reproducible research. We spoke excitedly with them about what this could mean for publishing open government data, and how it might encourage data sharing in the political science and policy research fields.

## Accessible and welcoming

PyCon organizers and the Python community do an awful lot to remove more barriers every year and make sure this event is open to all who want to attend. This is a large reason why the community is such a rich one. PyCon has a [code of conduct]( aimed at creating a safe space for all members of the community. It also made $200,000 in financial aid available to help encourage members of the community to attend who are from a diverse array of careers, nationalities and incomes. Both the 2014 and 2015 conferences also made child care available, which was partially subsidized by the Python Software Foundation, Facebook and Instagram to make it more affordable for parents who wished to attend.

This year, there was also a new reason to commend PyCon’s efforts around accessibility. Because “[Pythons are deaf, and so are some Pythonistas](,” PyCon — with the help of sponsor Safari — provided live captioning of all talks. Each talk had at least one projection screen reserved for displaying the speaker’s words, which were being captured onsite by transcriptionists who did a fantastic job:

## Sprints

PyCon’s sprints are an enormous, multiday hacking environment where developers can contribute to open source projects that they use every day. It’s even possible to contribute to work on Python itself.

### OpenHatch’s pre-sprint workshop

This year’s sprints benefitted greatly from an [introductory workshop]( led by the folks from [OpenHatch](, a nonprofit that matches eager contributors to open source with projects and communities that welcome their involvement. The workshop introduced sprinters to tools like IRC, Git and issue trackers. It also gave tips on what to do if you feel stuck while contributing. Finally, it gave sprint leaders a chance to speak more in-depth about the projects they would be sprinting on, and respond to questions from sprinters about how they could contribute.

As sprint leaders, we really appreciated the opportunity to introduce our project and engage personally with people who might be interested in contributing. The workshop also empowered sprinters by introducing them to the tools used by open source teams for communication and collaboration. Little surprise there: Earlier in the day, workshop coordinator Shauna Gordon-McKeon gave a great talk on being welcoming to newcomers in open source (see our favorite talks below).

### Scraping state influence data

It just wouldn’t be PyCon if Sunlight wasn’t sprinting.

The [Influence-USA]( project, a distributed scraping project that began during last year’s sprints, benefited from the [work of several dedicated developers]( who were able to make fantastic progress by adding code for scraping campaign finance data from six new states. Influence-USA is inspired by our previous distributed scraping sprints, which eventually became [Open States](

Working with new developers gave us the chance to road-test some proposed additions to the [Open Civic Data]( spec, geared toward representing influence-related public disclosures. It was also an opportunity to begin drafting some new documentation that could make it easier for new contributors to start writing scrapers of their own.

We’re tremendously thankful for everyone who participated, and hope to stay in touch until next year’s sprints!

## Our favorite talks

### Culture and community

– [The Talent Myth]( Wherein Jacob Kaplan-Moss of Django fame introduces himself as a mediocre programmer. It’s a great talk about how the myth of godlike programming skill makes tech communities intimidating and exclusionary, to their own detriment. – [Open Source for Newcomers and the People Who Want to Welcome Them]( Shauna Gordon-McKeon’s excellent talk on how to create, build and maintain an open source, collaborative community that’s easy to join and supportive of its hard-working members.

### Understanding Python

– [Beyond PEP 8]( Advice from Ray Hettinger on the right level of reverence for Python’s style guide. – [Super Considered Super!]( More from Ray, because he’s just that good. Expands on his famous blog post by the same name, discussing inheritance, linearization and the diamond diagram problem. Finally, he blows your fragile little mind with dependency injection via Python’s `super`. – [Facts and Myths about Python names and values]( Is Python call-by-reference or call-by-value? Both! Neither! Ned Batchelder explains. – [Investigating Python Wats]( Wat talks are always so fun/horrifying. Amy Hanlon’s doesn’t disappoint, and you might learn something! [Slides here](

### Software development as craft

– [Exploring is never boring: Understanding CPython Without Reading the Code]( Allison Kaptur on how to explore codebases like a scientist, hypothesis-driven exploration or code-as-nature. – [So you think you can PDB?]( Tips from Clayton Parker on using Python’s debugging tool (and some variants of it) to spot bugs more efficiently and resolve runtime mysteries. – [Techniques for Debugging Hard Problems]( Alex Gaynor on how to approach investigations into the types of bugs that are particularly hard to track down.

### Exploring the internals

– [Where in your RAM is “python”?]( How memory works, how the linux kernel keeps track of processes, and tools to introspect system memory. – [Type “python”, Press Enter: What Happens?]( Philip James and Asheesh Laroia on the Python interpreter’s relationship to the OS, including the processes involved, and the channels for input and output. – [Bytes in the Machine: Exploring the CPython Interpreter]( Allison Kaptur explains, using examples and visualizations, how the interpreter works. – [Systems Programming as a Swiss Army Knife]( Julia Evans on how to use the kernel and systems programming to spy on your own programs! Fantastic intro to system calls, and linux tools like `strace`, `ngrep`, and `dstat` for a deeper understanding of your own programs.

### Security

– [Building Secure Systems]( – [Introduction to HTTPS: A Comedy of Errors]( [slides]( – [Hash Functions and You: Partners in Freedom](

### Just plain cool

– [Building a smart A/C unit]( – [pgcli]( The gorgeous postgres command line client that will change your life forever.