Skip to main content

Adopt a Code of Conduct

Published: Sep 15th, 2020

This is part of Joyful Rails, a list of recommendations to make developing your Rails app more productive and joyful.

In this article, we are talking about adopting a code of conduct.

When

If your project is open source or otherwise welcomes contributions and participation from from other people, it is helpful to add a code of conduct.

Why

There are many people who, through ignorance, maliciousness, or a combination thereof, engage in behavior that makes projects and spaces unwelcoming or hostile to marginalized people.

A code of conduct can help you be explicit about your intention to make your project and community welcoming, diverse, inclusive, and equitable. It can codify behaviors that are contrary to that and thus will not be allowed.

How

Consider adopting the Contributor Covenant.

Place your adopted code of conduct in a file called CODE_OF_CONDUCT.md.

Alternatives

There are a lot of standardized codes of conduct to choose from.

You should be very wary of writing your own code of conduct for two reasons.

First, adopting a well-known code of conduct makes it easy for potential participants to determine that the project and community will be a safe place for them.

Secondly, developing policies that effectively ensure a project and community is welcoming, diverse, inclusive, and equitable requires a lot of expertise. Take advantage of the work people have done for you to make sure your code of conduct is effective.