Kindness and open-source projects
Brett Cannon is a longtime Python core developer and member of the open-source community. He got to check off one of his bucket-list items when he gave a keynote [YouTube video] at PyCon 2018. That keynote was a rather personal look at what he sees as some problem areas in the expectations of the users of open-source software with respect to those who produce it. While there is lots to be happy for in the open-source world, there are some sharp edges (and worse) that need filing down.
He started with his background as a way to show that he has the experience to give this talk. He is the development lead on the Python extension for Visual Studio Code, which is Microsoft's cross-platform open-source code editor. He noted that the two qualifiers for the editor are probably shocking to some. It was originally a community open-source project; Microsoft hired the developer behind it and it is now "corporate open source", Cannon said. That means there is a company backstopping the project; if the community fell away, the project would continue.
He has been a Python core developer since April 2003; he got the commit bit shortly after attending the first PyCon (and he has attended every PyCon since as well). In contrast, Python is community open source; if the community disappeared, the project "would probably collapse within a month". He has contributed to over 80 open-source projects along the way; many of those were simply typo fixes of various sorts, but it has given him exposure to a lot of different development processes. "I've been lucky enough to have a broad range of exposure to open source overall."
What and why
An open-source community comes about once there is an outside contribution to a project; one-person projects aren't really a community. Once you have that, one question is what the purpose of that community is. Collaborating on the maintenance of the project is clearly part of it, but that needs to be balanced with having some fun. If there is no fun involved, people are likely to leave; if there is too much fun, not much will actually get done and the project will suffer.
There is also a balancing act around sustaining an open-source community; the project must attract new people while still retaining (most of) the current people. Python has been around for 28 years ("thanks to Guido"), for example, but there has been a natural level of attrition over that time; people have children, get bored, burn out, die, and so on. Attracting new people can be tricky, especially in an older project, because the processes that the project has built up over the years do not fit with the new ways of doing things. On the other hand, the longtime contributors have lots of valuable knowledge and experience that the project doesn't want to lose; once again, a balance must be struck between attracting new developers and retaining the existing ones.
![Brett Cannon [Brett Cannon]](https://static.lwn.net/images/2018/pycon-cannon-sm.jpg)
In his mind, the goal should be to work together to come up with reasonable expectations for participants in the open-source ecosystem so that it works for everyone. Participants in open-source projects are generally either volunteers or being paid to work on it by someone "other than you", so we need to work together to bring about a symbiotic relationship that makes open-source projects that are "sustainable and usable and workable by everybody".
But that's where things are breaking down to some extent, he said; "we are
not exactly succeeding at this goal all of the time". He put up a tweet from
Cory Benfield that said: "I think working in OSS has made me more
bitter and short-tempered
". Benfield is a major contributor to
various networking pieces for Python (urllib3, HTTP/2 support, and
the Requests library). Cannon said that the tweet showed that Benfield had
been put into a terrible place.
If Benfield's partner noticed his bitterness and its relationship to
his work on open-source software, they might ask him to choose between
them. Hopefully, Benfield would choose his partner, but it is truly sad
that it could come to that. It is also sad that Cannon has to worry that
Benfield (and others) might be put in that position.
This has actually happened to him, Cannon said. He warned at the outset that some parts of the talk would be fairly emotional for him; recounting this was clearly one of those areas. In October 2016, he had to take a month off to "detox from open source" due to three consecutive months of "bad interactions from the community". It was a tough time for him, but since then he has thought a lot about what happened. That is where the talk has come from. Basically, how do we insure that people are not put into the position where their partners have to talk to them about participating in open-source projects? While 2016 was a particularly bad year for burnout in the open-source world, this problem existed before that and still exists today. He makes sure to not work on open source for one day of every weekend so that his whole weekend cannot be ruined by one bad interaction.
These things happen, he said, because "people tend to forget two key things" when interacting with open source. The first is that open source has a cost; we like to tout that it is "free as in beer" and "libre", but there is still time, effort, and emotional output in it. When he works on a project, he is taking time away from his family, friends, wife, and cat. When someone sends him a bug report or a pull request, they are asking him to spend some of his time away from those other things. This has led him to think that open source should be "a series of unsolicited kindnesses"—like people giving you gifts you didn't ask for. If we view open-source interaction that way, it would go a long way toward making sure that people don't feel "abused or used or just misunderstood". It would lead to "much better interaction across the board".
Scenarios
He went through some typical scenarios to show who is doing a kindness, but also describing where it can go wrong. He used himself ("Brett") as a maintainer and "Stuart" as contributor to illustrate the ideas. Brett provides some project that Stuart uses, so Brett is providing a kindness to Stuart. But in some cases, releasing an open-source project can be like leaving a pamphlet espousing an offensive position in a public place. He said that he always had trouble finding an example for this point until a recent controversy about a "joke" in some documentation for a large open-source project.
The next step in open-source interaction is providing feedback, which is a kindness bestowed on Brett by Stuart—except when it isn't. The example he gave is a thread he read on Hacker News that pointed to blog post that had some complaints about Python. Those kinds of posts are actually often useful; Cannon has filed bug reports and gotten things fixed based on some of them. The one in question, though, started by saying the author liked Python, but then said things like: "this is stupid", "that is dumb", and "what the hell were they thinking?". As he read it, he could pin many of those decisions on himself and other friends of his in the Python development community. While the author may have believed they were talking strictly about the features in question, it was received as calling Cannon and the rest of the team stupid.
The internet is not written in pencil, he said, it is written in pen. That blog post will be around forever. He is not saying that you can't criticize, but that you should find another way to do so. Or perhaps come to the python-dev mailing list to ask why things were done a certain way; in many cases it is for backward compatibility reasons going back to the dawn of Python (which is older than Unicode, he noted). There's always a way to phrase criticism so that you can still have a reasonable conversation about the topic—without being mean about it.
Next up is submitting a contribution, which can sometimes be likened to someone giving you a puppy you don't want. It may seem like a cute bundle of fur to you, but to the recipient it may seem like ten or more years of feeding, walking, and cleaning up. If he accepts a pull request and merges the code, he is responsible for that code for ten years or more. He needs to consider a lot of things before accepting a patch, such as whether it will break existing code or obsolete books printed on dead trees; "it's really mind-blowing when you start thinking about the ramifications".
Another way this process can go wrong is when someone submits a patch that says "this is really broken" or "I'm fixing your mess". Those statements include negativity that isn't needed. It would be better to say something like "I think I can help improve this". Things can be phrased in a positive light, without being outwardly negative toward anyone, he said.
Feedback on a contribution is a gift as well, but one that can be mishandled or misunderstood. Instead of something like "you're doing it wrong", a simple thanks is a good place to start. He once submitted a half-dozen typo fixes for a project using the GitHub interface, which made it easy to create a pull request (PR) for each fix. That was met with: "don't you know you can send one PR?" Rather than trying to shame him for his (perceived) lack of knowledge—he did know that, but the GitHub interface makes it much easier and faster to file typos as you find them—a "thank you" and a suggestion for future PRs, or to ignore the PRs entirely, would have been better.
When a maintainer decides to turn down a contribution, that can be misunderstood as being personal, Cannon said, but it is not meant that way. Part of what caused his need for an "open-source detox" was a statement from a contributor: "I'm mad at you because you are preventing me from contributing." That person has subsequently apologized, but Cannon was not trying to block anyone; he was simply keeping his obligations to the project in mind.
In some sense, maintainers are giving a gift to Guido van Rossum (and the other maintainers) by doing what they do, but there is plenty of room for disagreements and misunderstandings there as well. Cannon said he has come close to tears arguing with another core developer in email; things can get heated because everyone cares a lot about Python and its future. But what's really needed is for everyone to take a step back before replying; assume good faith and that the poster did not mean it in the negative way you are interpreting it. It's hard to do, he knows, but it can really help. "The point is that we all need to improve."
If his talk has seemed biased toward maintainers, that's because it is, he said. Because of scale factors, maintainers get a lot more abuse than contributors do. By way of a show of hands, he demonstrated that of the 1500 (maybe even 2000 or more) attendees at the keynote, less than 10 of them were Python maintainers (i.e. core developers). So it's easy for 0.1% or even 0.01% of the community to be negative and to still have a huge impact on the maintainers. He does not know whether the saying "it takes 10 kindnesses to undo one negative action" has been tested in psychological research, but it feels about right to him.
Giving kindness
In his opinion, everyone should act like any kindness they do does not require anything in return. When someone sends him a PR, he wants them to realize that he might have to reject it; they should just view it as an attempt to do him and the community a kindness. It goes the other way as well, of course. If he asks for changes to the PR before he can accept it, he is doing that as a kindness; if the contributor does not have time or interest in making those changes, so be it. It is not a bargain that is being made; doing a kindness for someone does not obligate them to do anything in return.
The flip side is for those who receive a kindness to treat it as such. But people have different styles of communication and English may not be their first language, so they may not necessarily come across as kind in their email. Give people the benefit of the doubt, Cannon said; it is also perfectly reasonable to let people know that they aren't coming across as being kind. A gentle prod in the direction of kindness is often all that is needed to get the conversation back on the right track.
The proper way to act toward each other is to be open, considerate, and respectful; it is no coincidence that these are the attributes listed in the Python Community Code of Conduct. This makes for a "kind of three-way handshake of kindness", he said. As with the three-way handshake to establish a TCP/IP connection, the kindness handshake can break down at any of the three steps. One could not be open to someone's contribution, for example, not considerate of a maintainer or contributor when giving feedback, or not respectful of the other party's responsibilities or constraints. "I know that seems shockingly difficult sometimes, but that's all it takes for this whole endeavor of open source to function reasonably."
We all have bad days at times, but we can all step away from our email client or the GitHub issue tracker for an hour to get a clear head before responding. We can also scrutinize our messages before sending them to make them work better. He suggested three criteria to consider: assume you are asking for a favor from the recipient, assume that your boss will read what you say, and assume that your family will see your message. If you keep those things in mind, it will hopefully make you stop and think about how you are phrasing that message.
In a nutshell, he is trying to suggest that people "pay for open source with kindness". If that doesn't happen, those who participate in open source may start to regret it. That can lead to burnout. We also don't want to put people in a position where their partners have to ask them to reduce their open-source work because it is making them a worse person.
He noted that the Python community as a whole is a friendly and welcoming place. Some other communities are not that way and people that he has talked to about his presentation have made it clear that there are communities where it is "so much worse". If he can feel mistreated in "this awesome amazing community", he is really concerned for the open-source community as a whole.
He concluded by asking that the next time folks were providing feedback, writing a blog post, submitting or reviewing a PR, or composing a tweet, that they think about being kind; "we're all just trying to make this work".
The Python community tends to be somewhat more introspective than others, which makes a keynote like this possible—welcomed, actually. There are certainly communities where it is far more difficult to find kindness or sometimes even civility. There are many reasons why the Python community is more welcoming than others, but being willing to take a hard look at where it does go wrong at times, as Cannon did here, is surely part of what makes it work.
[I would like to thank LWN's travel sponsor, the Linux Foundation, for
assistance in traveling to Cleveland for PyCon.]
Index entries for this article | |
---|---|
Conference | PyCon/2018 |
Python | Community |
Posted Jun 29, 2018 19:57 UTC (Fri)
by SLi (subscriber, #53131)
[Link] (12 responses)
This made me think. I often file bug reports when I observe things I believe to be bugs, but where I do not really very much personally care if it gets fixed or not. I have thought I'm doing a service. Should I stop? It would be less work for me too.
Posted Jun 29, 2018 22:51 UTC (Fri)
by k8to (guest, #15413)
[Link] (8 responses)
Maybe it's possible to make dealing with these bugs less onerous?
In practice it's often quite difficult to figure out the processes of a given open source project and meet their expectations on the first attempt though. Python, for example, rejected a one liner fix to the HttpServer because of some nitpick. I didn't pursue it. I'd provided a complete problem description, a way to test, and a one line patch. If someone wanted to implement it another way or not fix the bug, then I wasn't interested in the outcome.
I tend to expect developers to be jerks, and deny problems instead of trying to understand them. This isn't really special to open source. It probably influences me to include fewer kindnesses in interactions.
Posted Jul 2, 2018 7:54 UTC (Mon)
by mjthayer (guest, #39183)
[Link] (7 responses)
Posted Jul 2, 2018 22:18 UTC (Mon)
by xtifr (guest, #143)
[Link] (5 responses)
Chain of credit/blame can also be a factor, of course.
Posted Jul 4, 2018 7:33 UTC (Wed)
by osma (subscriber, #6912)
[Link] (4 responses)
If, as a maintainer, I receive a pull request which is mostly OK, I try to ask the contributor to rework it instead of fixing it on my own, even though it might be more work. This way, the author gets the credit, and maybe will come back with another PR later - who knows. But if it's obvious that the contributor is not interested in reworking the patch, I will try to add my changes on top and merge both at the same time, if that's possible.
As a contributor, I like it when my patch gets incorporated upstream. It's frustrating when the maintainer puts in his/her own fix instead of taking mine.
Posted Jul 4, 2018 7:48 UTC (Wed)
by mjthayer (guest, #39183)
[Link] (3 responses)
We tend to credit the submitter even when we rework the patch quite substantially. Of course, in Subversion there is no direct patch-to-commit conversion like in Git, so the bar to reworking is probably lower.
Posted Jul 4, 2018 13:29 UTC (Wed)
by gioele (subscriber, #61675)
[Link] (2 responses)
> We tend to credit the submitter even when we rework the patch quite substantially. Of course, in Subversion there is no direct patch-to-commit conversion like in Git, so the bar to reworking is probably lower.
At the same time, putting somebody else's name on something they haven't authored may be perilous. What if that commit ends up introducing a subtle bug in the reworked part?
I personally see only three acceptable choices (after a bit of back and forth with the original contributor):
1. if the commit is OK, let's just merge it;
Posted Jul 5, 2018 13:19 UTC (Thu)
by ecree (guest, #95790)
[Link]
The kernel solution for the "almost OK" case is to put a square-bracketed note in between SOB lines, to indicate a sign-off under option (b) of the DCoO instead of option (c). Something like (example from SubmittingPatches):
Meanwhile, for your case (2) I think Suggested-By: is more appropriate than Reported-By: if your patch really is a rework of the contribution rather than just a new patch to fix the same bug.
Posted Jul 5, 2018 19:21 UTC (Thu)
by xtifr (guest, #143)
[Link]
If you give them *exclusive* credit when the work isn't exclusively theirs, sure. But there shouldn't be a problem with giving *all* the authors credit if it's a collaborative work. In fact, that's so clearly the right thing to do that I'm surprised there's any question about it.
When someone sends me a patch and I end up reworking it, I have never considered *not* saying (at the very least): "based on work by so-and-so." Whether they end up on blame lists may depend on a variety of factors, depending on how much reworking was needed, but at the very least, I make sure the name ends up in commit messages and changelogs.
(Aside: I also don't care whether upstream takes my patches directly or rewrites them. The important thing to me is that the problem is fixed. I do, of course, like getting some appropriate amount of credit for my help, but unless it's a project where I have plans to get more involved, I don't necessarily *want* to have to jump through the hoops of learning all the project's coding standards.)
Posted Jul 4, 2018 8:53 UTC (Wed)
by karkhaz (subscriber, #99844)
[Link]
For me, this depends on how closely I associate with the project in question. If I'm making a drive-by contribution, I honestly don't care if somebody takes my patch and runs off with it; as long as the bug gets fixed, it's all good. But if I'm making regular contributions to a project, I appreciate having one of the maintainers walk me though what the project's norms and guidelines are and helping me to rework it, so that I can submit a patch more smoothly in the future, and also get recognition within the project.
For drive-by contributions, I appreciate that it's a waste of the maintainer's time to explain the unwritten rules to everybody time after time, because the effort is wasted on somebody who won't be contributing much in the future. OTOH, I do realise that a lot of folks will start with a drive-by to "test the waters" and see how welcoming and responsive a project is, before committing to sending more substantial patches...
I now wonder whether it would be productive for some projects to officially have drive-bys as a category in-between feature requests and pull requests.
- Feature request: I ask nicely for a feature, hoping that somebody else will implement it
- Drive-by: I ask nicely for a feature, implementing an initial patch to get the ball rolling. But I don't have the time or resources to follow through, so anybody should feel free to write the patch properly and claim authorship, or just apply the patch if it is already good enough.
- Pull request: I ask nicely for a feature, write a patch, and commit to working with the maintainers to rework and polish the patch until it gets merged in.
Posted Jun 30, 2018 5:27 UTC (Sat)
by raven667 (subscriber, #5198)
[Link]
Posted Jul 2, 2018 7:11 UTC (Mon)
by daenzer (subscriber, #7050)
[Link]
Posted Jul 5, 2018 12:24 UTC (Thu)
by azz (subscriber, #371)
[Link]
Posted Jul 12, 2018 9:39 UTC (Thu)
by oldtomas (guest, #72579)
[Link] (1 responses)
Quoth the article: and then: Very subtle indeed. But I see what you did there! Hanlon's razor? Perhaps. But there are contexts where I'm downright unwilling to apply that, based on 2.5 decades of experience.
Posted Jul 12, 2018 14:27 UTC (Thu)
by cpitrat (subscriber, #116459)
[Link]
When someone sends him a bug report or a pull request, they are asking him to spend some of his time away from those other things.
Kindness and open-source projects
Kindness and open-source projects
Kindness and open-source projects
Kindness and open-source projects
Kindness and open-source projects
Kindness and open-source projects
Kindness and open-source projects
2. if the commit is not OK, I will rework it and add a Reported-By tag;
3. if the commit is _almost_ OK, I will merge the commit in another branch, do what needs to be done in another commit in that branch and finally merge that branch.
Kindness and open-source projects
Signed-off-by: Random J Developer <random@developer.example.org>
[lucky@maintainer.example.org: struct foo moved from foo.c to foo.h]
Signed-off-by: Lucky K Maintainer <lucky@maintainer.example.org>
which is explicitly described as being to avoid "mak[ing] him endorse your bugs". It doesn't come up very often, though, since most issues get resolved fine by patch ping-pong.Kindness and open-source projects
Kindness and open-source projects
Kindness and open-source projects
Kindness and open-source projects
Kindness and open-source projects
Kindness and open-source projects
Visual Studio Code [which] is Microsoft's cross-platform open-source code editor [...]
That means there is a company backstopping the [Visual Studio Code] project; if the community fell away, the project would continue.
Python is community open source; if the community disappeared, the project "would probably collapse within a month".
Kindness and open-source projects