Open Up Your Open Source Module – Part 3: CODE_OF_CONDUCT File

This is Part 3 of a 5 part series.  Links to other parts (as they become available) are below.

We’ve previously talked about adding the CONTRIBUTING and TODO files, so now we’ll get to the post I’ve been dreading: the CODE_OF_CONDUCT file. I believe strongly in the value of codes of conduct, and think every project should have one.

So, why would I dread it?

My reason is simple: Like most people, I don’t enjoy abuse – and people who promote codes of conduct get a lot of that. I simply want to know that projects I contribute to want my contribution – and will not let non-technical concerns derail that. Depending on who you are – your gender, your race, your sexual orientation, your religion, your age, you may have encountered abuse in online and offline technical communities, and, before you spend time and energy on a project you might want to know if you’re going to be abused in that project’s communities. This is what a code of conduct is for.

I’m going to try to avoid a lot of the standard arguments about the Code of Conduct, and instead simply suggest you include one – even if you disagree with me that the Contributor Covenant is a great one, simply include what you think is good in yours. At least then your potential contributors can see where you stand and make their own decision.

It turns out that it is really simple to include the Contributor Covenant if you are creating Perl 5 modules using Dist::Zilla and the ContributorCovenant plugin. Just add the following to your dist.ini file:

[ContributorCovenant]

[CopyFilesFromBuild]
copy = CODE_OF_CONDUCT.md

Once you do this, any releases you build with dzil release will include the Code of Conduct (named CODE_OF_CONDUCT.md). I also place a copy in my source code’s root directory, so it’s visible on Github (or wherever I’m hosting my repo) – that’s what the third and fourth lines do. You can, of course, leave those out if you don’t want to do that.

If you are interested in what might make a good code of conduct, I’d suggest looking at what Coraline Ada Ehmke put together with the Contributor Covenant. I’d also suggest that you try to find a code that is well-recognized in the open source world. Much as custom open source licensing has fallen out of favor, so that people can quickly determine the rights they might have through the use of standardized licenses, I believe it is a good idea to use a recognized code of conduct. When I see the use of the Contributor Covenant, for instance, I immediately know where the project stands.

Finally, I’m not telling you that you are an evil person or that your project stinks if it doesn’t include a code, or if it doesn’t include a code I like.  Obviously, you are welcome to include or not include whatever code you want.  The presence or absence of such a code does communicate some of your values, but they are your values to communicate.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s