Contributing to Open Source projects is one of the best platforms to gain experience in the software engineering space. It also makes a prospective employer see how diligent an applicant is as an aspiring or experienced Software Engineer and makes the applicant standout in the recruitment stages of a job opportunity.
In this article, we would be looking at how to contribute to Apache AGE by creating a function. Unlike adding or editing a README, this gives you an edge.
Steps to Contribution
Creating a function in Open source projects like AGE is quite daunting for a newbie and that's why I suggest you follow the steps below for an easy process.
Check for Functions not implemented that would be a great addition - This particular step is the foundation for any contribution. You sure do not want to add a function that already exists because that makes you seem lazy and a copy, so do a deep research of the project.
Look at similar functions and the syntax - This will give you and idea on how to implement your supposed function.
For example, if there's a function in the project that returns the max of 2 numbers and there's no min function present, then the syntax of the max function should be a reference for the min() function you are to create. This step also is important for contributing to other Open Source projects.
Write code in associated files - Still citing the max() function for the min() function to be created, You should also take note of the files in which the max() function was implemented and follow suit for the min() function.
Test the function - This is the most important step because you don't want to push an erroneous code to an open source codebase (it's a red flag). Test the code on your local system and ensure it works properly. If the function gives an error, debug and test again till it gives no errors.
Make a PR - This is equivalent to submitting a solution and expecting feedback for the solution. Do not feel bad if your PR does not get merged as there might be many reasons such as:
a. The solution might not in the current scope of projects.
b. It might not be according to their contribution standards. Hence, you should always align your PRs accordingly.
Optional: Add more cases to the function. If the max() function takes only int values, you can add more functionalities in the min() function to consider float values.
This is an ideal template to start contributing to Open Source projects. In the next blog post, we would make practical examples on how to contribute to Apache AGE.