DEV Community

Coding Fatale
Coding Fatale

Posted on

Why you should have a code of conduct on GitHub

I made the decision to add a code of conduct to my current and future repos on GitHub. Based on my personal experiences I made my choice when I asked these questions:

  • What is the purpose of a code of conduct?
  • How can I prevent negative behavior in the future?
  • What enforcement will take place for rule violations?

The purpose of writing this article is to advocate creating a safe space and a welcoming environment in the open source community. As developers we should respect one another and this includes contributing to open source projects.

A few bad apples make it bad for everyone

Any good open source project will have a detailed README.md and a CONTRIBUTING.md in the repo. It is important to create a positive environment for contributors. However, negative and toxic behavior can push contributors away from a project.

Git commits and documentation are not for harassment

Commits and proper documentation are used to document changes in a project. The purpose is not to bully or harass individuals who made a mistake. This can deter contributors to contribute for another project. Examples of a toxic open source environment was calling out people's first name in the commits, putting down contributors, taking credit and not acknowledging the work of others. I have been on the receiving end and the outcome was not pretty.

A code of conduct is needed

If you want multiple contributors to your open source project having clear guidelines for contributors is essential. Adding a code of conduct on my part was to make my projects welcome to anyone who wants to contribute. You can choose to adopt a code of conduct that reflects your community standards.

Final thoughts

Code of Conducts are meant to create an inclusive environment. Having one creates boundaries for open source projects and makes sure everyone follows the guidelines when contributing. Encouraging participation in the community and creating a harassment free environment makes contributors feel welcome. I would welcome any contributions to a project.

Resources

Adding a code of conduct in GitHub

Your Code of Conduct

Example of Code of Conduct

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay