Contributing to Open Source
Tags: opensource, development, beginners, learning
Published: 2023-07-27 00:43:51

In the year ending 2022, GitHub had 52 million Open source projects which saw 413 million contributions from developers. This is a remarkable feat at the developmental and contribution level. For those of us who consider Twitter as our classroom, from time to time in this tech town square you will come across a tweet highlighting the importance of contributing to Open Source projects. These tweets often remind us that these contributions add value to our resumes as developers.Well this begs the question, what are these Open Source projects, how do I contribute and am I experienced enough to attempt such a feat?
Open Source project is a type of software whose source code is made public for viewing, use, modifying, and distribution. Unlike proprietary software, which restricts access to the underlying code, open-source projects embrace the principles of transparency, collaboration, and free distribution. this gives rise to a community of developers who are willing to collaborate on projects, share knowledge, and collectively contribute to the advancement of technology.
People just assume that open-source contribution is all about writing code. This is an uninformed take. People with no coding skills can also take part in contributions in various ways. There are numerous ways one can contribute to an open-source project:

- **Code Contributions** -  a common way to contribute is by writing code. this is done through fixing bugs, adding new features, improving existing code (writing clean code), or optimizing the codebase. This typically involves forking the project, making changes in your fork, and then submitting a pull request to the original repository.

- **Bug Reporting and Issue Triage** - Even if you're not a developer, you can contribute by reporting bugs and issues you encounter while using open-source software. Effective bug reports aid developers in identifying the issue and resolving it. By organizing and validating incoming concerns, you can also aid with issue triage.

- **Documentation** - Improving documentation is crucial for the usability and adoption of open-source projects. You can help by writing, editing, or improving documentation to make it more comprehensive and beginner-friendly.

- **Testing and Quality Assurance** - It is beneficial to test the software and provide feedback to guarantee its dependability and stability. You can run manual tests, create test cases for automated tests, or take part in beta testing.

- **Translation** - Translating the project's documentation, error messages, and user interfaces into different languages helps make the software accessible to a more diverse audience.

- **User Support and Community Engagement** - Engaging with the community by answering questions, helping other users on forums or chat channels, and participating in discussions creates a positive and inclusive atmosphere around the project.

## Key Principles of Open Source:

- **Free and Open Access** - Open source projects grant users the freedom to access, view, modify, and distribute the software's source code without any cost.

- **Transparency** - The availability of the source code enables programmers to examine how the software functions, fostering community trust and security.

- **Collaboration** - Collaboration is the lifeblood of open source. Together, programmers from all around the world contribute code, find and fix issues, and improve the functioning of the software.

- **Derivative Works** - Open source licenses often allow the creation of derivative works, allowing developers to expand on already-existing projects and spurring a chain reaction of creativity.

## Popular Open Source projects 
Day in and day out we all use open-source software sometimes without even knowing. Let's have a glimpse of the software we generally use daily

1. **Browsers** - Chrome, Firefox, Chromium

1. **Web servers** - Apache HTTP Server, Nginx, Lighttpd

1. **Databases** - PostgreSQL, MySQL, MongoDB

1. **Operating systems** - Linux, Ubuntu, Fedora Linux, Android

1. **Others** - VLC, Kubernetes, Visual Studio Code, Ansible, Bootstrap, React Native and Atom

## The Significance of Open Source Contributions
The foundation of open-source software is the idea that information should be openly shared and that teamwork speeds up development. The open-source ideology allows programmers to openly analyze, alter, and distribute software, enabling ongoing advancement and wide adoption. Contributing to open-source projects enables people to;

- **Learn and Grow** - Contributors are exposed to a variety of codebases, architectural patterns, and problem-solving approaches when working on real-world projects, which promotes ongoing learning and development.

- **Networking and Community Building** - Interacting with like-minded developers from around the world through open-source communities can lead to networking and prospective employment prospects.

- **Impact and Recognition** - No matter how tiny, contributions to open-source projects can have a significant impact on the software used by millions of people. Recognition in the community can attest to one's knowledge and commitment.

- **Quality and Security Improvement** - Due to numerous code reviews and teamwork, community-driven development frequently produces higher-quality software with stronger security.

Open source is more than just developing code; it's about being a part of a vibrant, encouraging community that works to advance the state of the software industry for everybody. So let's start this exciting adventure of contributing to open source together, whether you are an experienced developer looking for new challenges or a beginner eager to make your first contribution. Never forget that the open-source community is waiting to embrace your talents and ingenuity to build a better, more cooperative future.

## Diving into Open Source

## Finding Open Source Projects
For beginners looking to find open-source projects to contribute to, there are several platforms and resources they can use.

- Open Source Guides

- Up For Grabs

- Ovio Projects

- CodeTriage

- Hacktoberfest Projects

- Google Summer of Code 

- GitHub

**GitHub**
GitHub deserves special attention since it's where the bulk of work happens. Suppose one intends to find a project they can work with, how do they go about it?

- Explore GitHub Topics - Browse the "Explore" section on GitHub and explore different topics of interest.GitHub organizes repositories into topics, making it easier to find projects related to specific domains or technologies.

- Filter by Language - Use the "Language" filter to find projects based on your preferred programming language.      Choose a language you are familiar with or one you want to learn more about.

- Trending Repositories - Check out the "Trending" section to discover popular repositories across various categories.        These projects often attract a lot of attention and may have active communities.

- GitHub Search - Use the GitHub search bar to find projects based on keywords or topics. Refine your search by language, stars, and recent activity.

## Choosing a Project

### How does one choose the right project to contribute to?

**Step 1. Identify Your Interests, Goals, and Tech Stark**

Introspect before starting to contribute to an open-source project. This helps you to identify your interests and goals for doing all this. also, one should make a list of technologies (skills and languages) one is familiar with and then sort them according to the level of expertise. this helps you to be able to identify which kind of projects to work with best. one prerequisite technology everyone contributing is version control

**2. Consider Project Scope and Size**
Open-source projects vary widely in scope and size. Some projects may be small, single-purpose libraries, while others might be large, complex applications. As a beginner, it's often best to start with smaller projects. They offer an opportunity to make meaningful contributions without feeling overwhelmed by the project's complexity. contributing is a journey, start small then move to complex and big projects with time

**3. Evaluate Project Activity and Support**
Look for projects that are actively maintained and have a supportive community. A project with regular commits, recent updates, and active discussions on communication channels indicates a healthy and thriving community. This ensures that your contributions are more likely to be reviewed and merged, and you'll receive help when needed. also, check how frequently the project maintainers give feedback

**4. Check the Contribution Guidelines**
Every open-source project has its contribution guidelines. These guidelines explain the project's coding standards, the preferred process for submitting contributions, and other relevant information. Review these guidelines thoroughly to ensure that you understand how to contribute effectively. Check the following link to learn more about guidelines https://opensource.creativecommons.org/contributing-code/ 

**5. Explore the Issue Tracker**
Most open-source projects maintain an issue tracker or a list of tasks that need attention. Explore the issue tracker to find tasks labeled as "beginner-friendly" or "good first issue." These issues are specifically meant for newcomers and are usually less complex. They serve as an excellent starting point for your first contributions.

**6. Assess Community Culture and Values**
The open-source community values collaboration, respect, and inclusivity. Look for projects that foster a positive and welcoming atmosphere. Read through the project's communication channels and forums to gauge the community culture and how members interact with each other.

**7. Seek Projects with Documentation**
Projects with comprehensive and up-to-date documentation make it easier for newcomers to get started. Well-documented projects not only help you understand the codebase but also improve the overall project quality.

**8. Join the Community**
Before making your first contribution, join the project's community on communication platforms like mailing lists, chat rooms, or forums. Introduce yourself, express your interest in contributing, and seek guidance from experienced members. This engagement can help you build connections and find mentors within the community.

**9. Licensing**
DO NOT CONTRIBUTE TO A PROJECT WITH NO LICENSE. 

### Project licensing
It is impossible to exaggerate the significance of licensing in open-source projects. It offers legal clarity and makes certain that the code is applied, altered, and distributed in a way that is consistent with the project's goals. donating to projects that have liberal and transparent licenses has many advantages to donating to unlicensed projects, which may result in legal problems. 

Why is licensing in open-source projects important:

- Legal Clarity - The conditions under which the project's source code may be used, modified, and distributed are specified in the license. Without a license, there is no legal certainty, and contributors might not be aware of the use or distribution of their code.

- Collaboration - Open source licenses offer a structure that promotes teamwork and information sharing. They encourage an open atmosphere and empower a global contributory community.

- Contributors' Rights Protection - When licenses are properly chosen, contributors' intellectual property rights are safeguarded. This describes the rights of both the code's creators and consumers.

- Innovation - Open source licenses permit others to expand upon preexisting code, encouraging creativity and minimizing duplication. Projects can evolve and improve rapidly thanks to contributions from a diverse community.

### Checking if Projects are Licensed

- To determine if a project is licensed, look for a file named "LICENSE" or "COPYING" in the project's repository. These files contain the full text of the project's license.

- Alternatively, you can check the project's README or the repository's "About" or "Code of Conduct" section, as licenses are often mentioned there.

- Use license-checking tools like "FOSSA" or "Licensee" to automatically identify the license of a project.

- You can also check https://choosealicense.com/ for Open Source projects licenses
Contributing to non-licensed or improperly licensed projects can have serious consequences:
**Unclear Rights and Usage** - Without a license, the usage and distribution of the project's code are ambiguous, leading to potential legal disputes.
**Risk of Misuse** - Contributors may unintentionally allow others to use their code for purposes they do not support or agree with.
**Difficulty in Collaboration** - The lack of a license may discourage potential contributors from engaging with the project.
**Legal Liability** - Contributing to a project without a proper license can expose contributors to legal risks, as they may be unclear about the rights granted to others.

After choosing a project, its good to check for the following before proceeding to contribute:

- Are there open issues? If so, this can be a good sign because you'll have somewhere to start.

- Is the identified issue(s) under discussion at present?

- Are the issues being resolved regularly?

- How many active pull requests exist?

- How recently were the most recent merge requests made?

- Number of forks and stars for the project

- Do the maintainers express gratitude to contributors?

## Getting your hands dirty...

Now that you have a project identified worth contributing to, you can get down to work. Navigate to the project and follow the following steps.

**Forking the Repository**
To get started, you need to create a copy of the project's repository under your GitHub account. This is known as forking. Navigate to the project's repository on GitHub and click the "Fork" button in the top right corner. This will create a copy of the repository in your GitHub account.

**Create a Branch**
With the repository forked, it's time to create a new branch where you will make your changes. Branches allow you to work on isolated changes without affecting the main codebase.        Click the "Branch" button in the repository and enter a name for your new branch (e.g., "feature-add-new-feature").

**Making Changes**
Now that you have a branch, you can begin making your changes to the codebase. Use a code editor or an integrated development environment (IDE) to modify the necessary files.        Focus on addressing a specific task or issue to keep your changes concise and meaningful.

**Committing Changes**
After making changes to the code, you need to commit them to your branch. A commit is like a snapshot of your changes, and it includes a commit message that describes the purpose of the changes. Use descriptive commit messages, such as "Add new feature" or "Fix issue #123," to help others understand your contributions.

**Creating a Pull Request (PR)**
Once your changes are committed to the branch, you can create a pull request to propose merging your changes into the original project. On your forked repository page, click the "Pull Request" button, then choose the base repository (the original project) and the base branch (usually "main" or "master"). Select your branch with the changes as the "compare" branch and click "Create Pull Request."

**Review Process**
Now, your pull request will be visible in the original project's repository for review. Project maintainers and other contributors will review your code, checking for correctness, coding standards, and adherence to the project's guidelines.

**Addressing Feedback**
It's common to receive feedback or suggestions for improvements during the review process. Respond positively to the feedback, make necessary changes to your code, and push the changes to the same branch in your fork. In case the feedback is not what you expected, don't give up.

**Continuous Integration (CI) Checks**
Many projects use Continuous Integration (CI) pipelines to automatically run tests on pull requests. The CI system checks whether your changes pass the project's automated tests.

**Approval and Merging**
Once your pull request passes the review and CI checks, a project maintainer will review it again for final approval. If everything looks good, the maintainer will merge your changes into the main codebase.

**Closing the Pull Request**
After your changes are merged, the pull request will be closed, marking its completion.

**Continued Involvement**
Contributing to open source is an ongoing journey. Stay engaged with the community, look for new tasks to work on, and continue growing as a contributor.

## Communication and Collaboration

**Community Interaction** - Open source projects thrive on community interaction and engagement. Join the project's communication channels such as mailing lists, chat platforms, or forums to interact with other contributors.
**Introduce Yourself** - When you join a new project, introduce yourself to the community. Share your interests and the reason you chose to contribute to the project.
**Asking Questions** - Don't hesitate to ask questions if you are unsure about something.
**Seeking Help and Feedback** - If you encounter difficulties or need guidance, seek help from experienced contributors or project maintainers. Share your work and seek feedback to improve the quality of your contributions.
**Participating in Discussions** - Engage in discussions about the project, new features, bug fixes, or general development plans. Provide constructive feedback and share your ideas to contribute to the decision-making process.
**Code Reviews** - Code reviews are an integral part of the contribution process. Participate in code reviews to review other contributors' work and offer constructive feedback.
**Working in Teams** - Some open source projects have teams or subgroups dedicated to specific aspects (e.g., documentation, testing, design). Consider joining a team that aligns with your interests and expertise.
**Respecting Diversity and Inclusivity** - Embrace diversity and inclusivity within the open-source community. Be respectful of different perspectives and treat all contributors with kindness and empathy. Be sure to follow the Code of Conduct.
**Being Patient and Responsive** - Understand that contributors may be from different time zones and have varying schedules. Be patient when awaiting responses and try to be responsive to others as well.
**Beyond Code Contributions** - Remember that open-source contributions extend beyond code. You can contribute through documentation, testing, community management, design, and more.
**Adhering to Project Guidelines** - Follow the project's guidelines, coding standards, and contribution rules to ensure a smooth collaboration process.
**Contributing Regularly** - Regular contributions and involvement foster a stronger connection with the community.      Contribute to the project consistently to build trust and establish yourself as a reliable contributor.

## Best Practices and Etiquette
**Avoid Off-Topic Discussions** - Keep discussions focused on project-related matters.
**Read and Follow Contribution Guidelines** - Every open source project has contribution guidelines detailing coding standards, commit conventions, and other important information. Read and adhere to these guidelines to ensure consistency and streamline the contribution process.
**Choose Descriptive Commit Messages** - Use clear and descriptive commit messages that explain the purpose of your changes. This helps others understand the changes made without having to dig into the code.
**Keep Code Changes Focused** - Make sure each pull request addresses a single issue or feature. Avoid bundling multiple unrelated changes into one pull request to facilitate easier review.
**Document Your Code** - Provide thorough documentation for new features or significant changes you introduce. Good documentation helps other contributors and users understand the functionality.
**Be Responsive to Feedback** - Be open to feedback from other contributors and project maintainers. Respond promptly and address the feedback constructively.
**Avoid Stale Pull Requests** - If you submit a pull request, try to be responsive during the review process. Avoid letting your pull request become stale by addressing review comments and keeping the changes up to date.
**Test Your Changes** - Ensure that your code changes are thoroughly tested and do not introduce regressions. Run tests locally before submitting your contributions.
**Respect the Project Maintainers' Decisions** - Understand that project maintainers have the final say in accepting or rejecting contributions. Respect their decisions, even if your contribution is not accepted.
**Avoid Duplicate Work** - Before starting to work on a new feature or bug fix, check if someone else is already working on it. Coordination prevents duplicated effort and saves time for all contributors.
**Continuous Integration (CI) Checks** - Welcome newcomers to the community and provide guidance if they need help.
Follow Licensing and Copyright Rules - Ensure that your contributions comply with the project's licensing and copyright policies.    

## Wrap Up!

Contributing to open source offers numerous avenues for involvement, regardless of technical expertise. From coding and bug reporting to documentation, testing, and community engagement, each contribution strengthens the project and fosters a collaborative spirit. Whether through code, design, or support, every contribution helps sustain and improve open-source software, making it accessible and beneficial for a diverse global community. Embrace the opportunity to give back and grow alongside like-minded individuals in this inclusive and fulfilling ecosystem.

If you have read this far, I'm really grateful.
Do share your valuable opinion, I appreciate your honest feedback!