DjangoCon Europe 2019: The 750,000-line long pull request: crafting a more resilient open source community
Writeup of the DjangoCon Europe 2019 talk »The 750,000-line long pull request: crafting a more resilient open source community« by Anna-Livia Gomart
Anna-Livia Gomart: Anna-Livia is a developper who believes that through elegant interaction design we can enhance decision making. In her spare time, she collects office supplies and makes motivational posters for her D&D character.
What happens when Tech meets Community?
What is OpenFisca?
OpenFisca is an international, contributive, open source project. The idea is to turn law into code. The concept is to take any fiscal or benefit text or law and you turn it into Python.
First off, you use a country template, and then you can use related tools to explore it. For example, Leximpact explores how social and fiscal reforms impact citizens, or mes-aides, which tells you which social benefits you are entitled to under French law.
OpenFisca is like a game console. The OpenFisca Core is the engine, and then you have local or country packages to use with the core.
It's used by economical experts to run simulations, and understand the law, and by tech experts, who provide good code and tools to formalize this issue. More econ experts mean better and up to date models and better use cases, and more tech experts mean better and more maintainable code.
Interpersonal conflicts in open source lead to forks, occasionally. The problem with forking is that after a while you can't bring the projects together anymore, which can be a huge loss in time and effort for the community.
The OpenFisca community made a lot of effort by introducing new rituals like a bi-weekly newsletter listing current PRs, monthly afterwork events, co-working sessions, and roadmapping workshops. All of these rituals help make the work put into the project visible, and help people to feel that they can be part of the project. Al of a big effort payed off, when a fork decided to re-join the community, opening a PR with about 700k lines of a diff (over the course of ~150 commits).
An unexpected Pull Request
Huge PRs are tricky, but do not panic. The first step should be to understand the context in which this PR happened. Talk to that person. For example, in this instance, the PR came from a place of perfectionism, and wanting to provide a PR only when the work was done and perfect.
You can't easily say no without leaving a huge area of damage in the community and the code. You can't easily merge this PR, either, though!
After removing some auto generated work, the diff was down to 215k lines. After meeting for half a day and talking things over, they settled on 15 smaller, different PRs, including which style guidelines should apply. Merging this still took 65 days and a lot of effort, but: it created social capital.
Building bridges between experts
Social capital is the quality and the momentum of the relationships that a community has with a variety of stakeholders. If you want to create social capital, you'll build energy and enthusiasm (e.g. at events), ease problems in cooperation, and build trust and reciprocity.
Once you have social capital, you have bridging (establishing external ties) and bonding (strengthening internal ties).
A good example is OpenStreetMap. They had to draw the polygons for the 36680 French city limits, which took about 6 years. What helped tremendously ways having contributor events and community meetings.
We need to focus on building bridges for different kinds of people. Create tools and paths for different types of contributors, because it will pay off in the end.