DEV Community

Cover image for Open-Source contribution, a beginner's guide (in 2 minutes).
Sam
Sam

Posted on • Updated on • Originally published at blog.dotenx.com

Open-Source contribution, a beginner's guide (in 2 minutes).

Open-source is not a new concept but in recent years specially it has gained more attention from both developers and the companies in tech industry.

Successful businesses such as Gitlab, Terraform and Sentry are some of the examples of billion dollar startup unicorns which all are offering a service which is open-source at its heart.

Not only these companies have hired the main contributors in their open-source projects, but also other companies are keen to hire developers who have proved their skills and experience working on an open-source project.

In this post I give you a practical guide with the useful commands and scenarios you need to be aware of to be able to start contributing to open-source.

First of all each open-source project is stored on one or more Git repositories, meaning you need to know some basics of Git and the platform.

Repository used in the examples:
https://github.com/dotenx/dotenx

Github

The most popular platform used by absolute majority of open-source projects is Github.
So let's start with the very first things you should know about an open-source repository on Github by an example.

In this picture I've added some details about some particularly important parts of the Github panel on the landing page of a repository (dotenx).

Screen Shot 2022-04-13 at 1.20.57 pm.png

On this page we have the links to the Issues and Pull Requests pages.

Issues

Screen Shot 2022-04-13 at 1.31.19 pm.png

In this page you can see all the "Issues" of the repository.

The open issues are either reported by someone or created by the contributors to address a bug, a missing part in a feature, problem in the documentation, etc.

This is where you can search particularly for the open areas to contribute to the project. You can usually search for the issues with labels like these:

  • good-first-issue
  • easy
  • beginner

Pull Requests

Screen Shot 2022-04-13 at 2.27.16 pm.png

Changing the source code in open-source repositories happen through PRs. A Pull Request in simple terms means "These are my changes, pull them and merge them into the repository if OK".

In order to create a PR you have to follow these steps:

  • Identify an issue you want to work on
  • Fork the repository
  • Clone the forked repository: git clone <repo url>
  • Create a branch: git checkout -b <your branch name>
  • Implement your changes
  • Commit the changes: git commit -m <commit message>
  • Push the changes: git push
  • Create a PR on the original repository
  • Respond to the reviews and commit+push new changes if required

Finally, open-source is all about supporting each other. Appreciate it if you support my work by adding a star to my project:
https://github.com/dotenx/dotenx

If you're interested to see more beginner friendly, easily digestible, git and open-source articles please let me know in the comments or like this post.

Top comments (6)

Collapse
 
wjplatformer profile image
Wj

Of you are a beginner, bookmark this for a handy guide! ✅

Collapse
 
zigrazor profile image
ZigRazor

I share with you my Open Source Projects that I'm working on:

GitHub logo ZigRazor / CXXGraph

Header-Only C++ Library for Graph Representation and Algorithms

CXXGraph

DOI

DOI

codecov CodeFactor

GitHub license GitHub release

Generic badge Generic badge Generic badge

Generic badge Generic badge

Join the chat at https://gitter.im/CXXGraph-Community/community

Share on Tweet

Introduction

CXXGraph is a small library, header only, that manages the Graph and it's algorithms in C++. In other words a "Comprehensive C++ Graph Library" An alternative to Boost Graph Library (BGL).

We are Looking for...

We are looking for:

  • Site Developer for the development of the CXXGraph site ( for the moment on GitHub Page );
  • Developers and Committers, also at first experience, we will guide you step by step to the open-source world!

If you are interested, please contact us at zigrazor@gmail.com or contribute to this project. We are waiting for you!

Roadmap

Completed Description Date of Completition
✔️ First Optimization Apr 4, 2022
✔️ Add Benchmark for all algorithms Oct 5, 2022
✔️ Code Optimization Oct 5, 2022
✔️ Release 0.4.0 Oct 7, 2022
✔️ "Const" Code Review #155 Mar 23, 2023
✔️ Release 0.5.0 Mar 23, 2023
Test

GitHub logo ZigRazor / CXXMicroService

A C++ Library that give microservice framework ( Server / Client ) upon 0mq framework

CXXMicroService

A C++ Library that give microservice framework ( Server / Client )

codecov CodeFactor

GitHub license GitHub release

LGTM Alerts LGTM Grade

Generic badge Generic badge Generic badge

Generic badge Generic badge

Introduction

CXXMicroService is a C++ library, that manages MicroServices, upon different Framework ( actually only 0mq is implemented).

We are Looking for...

We are looking for:

  • Site Developer for the development of the CXXMicroService site ( for the moment on GitHub Page );
  • Developers and Committers, also at first experience, we will guide you step by step to the open-source world!

If you are interested, please contact us at zigrazor@gmail.com or contribute to this project. We are waiting for you!

Roadmap

Completed Description Date of Completition
✔️ First Commit May 2, 2022
✔️ Introduce the basic Framework May 24, 2022
📝 Introduction of more complete Examples TBD
📝 Introduction of Orchestrator TBD
📝 Introduction of Unit Test Framework TBD
✔️ Introduction of basic CI/CD Jun 6, 2022
📝 Advanced CI/CD TBD
📝 First Beta Release

GitHub logo ZigRazor / MTL

Multi Thread Library

MTL (Multi Threading Library)

MTL_Logo

Contributors Forks Stargazers Issues GPL-3.0 License

Multi Threading Library is a set of utilities, easy and ready to use for common task in multi threading environment and development.

Roadmap

  • Thread Class
  • Thread Manager
  • Thread Pool
  • Task Class
  • Ordered Task
  • Task Flow
  • Complete Documentation
  • Doxygen Integration
  • First Beta Release
  • Test Framework
  • CI/CD Pipeline
  • First Stable Release
  • Thread Monitoring
  • ...

See the open issues for a full list of proposed features (and known issues).

Getting Started

This is an example of how you may give instructions on setting up your project locally To get a local copy up and running follow these simple example steps.

Prerequisites

The following are required to get the project up and running.

Google Test

GoogleTest

git clone https://github.com/google/googletest.git  # Dowload the Google Test repository
cd googletest                                       # Main directory of the cloned repository.
mkdir -p build                                      # Create a directory to hold the build output.
cd build                                            # Move
Enter fullscreen mode Exit fullscreen mode

GitHub logo ZigRazor / PyStateMachine

Python State Machine

PyStateMachine

python Python State Machine

CodeFactor Codacy Badge

DeepSource DeepSource

Introduction

PyStateMachine is a Framework that support state machines in Python

Requirements

  • Python3

How to Run

How do we import the framework?

  1. Insure that Python3 is installed:

  2. Install the PyStateMachines framework

    • pip3 install PyStateMachines

Example

After framework is installed, import and create a small example Create xml file from sample with the State machine states.

myStateMachine.xml

<?xml version="1.0"?>
<x:States xmlns:x="pystatemachine:sm">
    <State>
        <Name>State1</Name>
        <Event>
            <Name>ToState2</Name>
            <ToState>State2</ToState>
        </Event>
    </State>
    <State>
        <Name>State2</Name>
        <Event>
            <Name>ToState3</Name>
            <ToState>State3</ToState>
        </Event>
    </State>
    <State>
        <Name>State3</Name>
        <Event>
            <Name>ToState1</Name>
            <ToState>State1</ToState>
        </Event>
    </State>
    <Initial_State>State1</Initial_State>
</x:States>

Create Python Script to run state machine pyStateMachine.py

# importing necessary packages
from StateMachine import StateMachine

"""Test StateMachine"""
sm = StateMachine("myStateMachine.xml")
sm.LoadStateMachine()

# print initial state
print(sm.get_current_state())  # current_state == State1

sm.InjectEvent("ToState2")
print(sm.get_current_state())  # current_state == State2

sm.InjectEvent("ToState3")
print(sm.get_current_state())  # current_state == State3

sm.InjectEvent("ToState1")
print(sm.get_current_state())  # current_state == State1

run Python script to execute state machine

python pyStateMachine.py

pyStateMachineUnitTest.py

## Test Suite

If you are a beginner of Open-Source Software I can give you full support to start in the best way!

See you soon

Collapse
 
relin404 profile image
Ahmad Mash'aal

Think I am a beginner. I'd like to know how and where to start. :)

Collapse
 
mohsenkamrani profile image
Sam

We all have to start from somewhere and always there is something new to learn.

Stay tuned for the next parts. I'll keep the short like this to make it easier to follow along.

Collapse
 
zigrazor profile image
ZigRazor

What language you want to use/learn on your path?
I can give you help to start.

Collapse
 
tmchuynh profile image
Tina Huynh

Love this!! Very helpful