Being a growing organization, we regularly add, update and check our processes that are followed in the organization. So recently in ColoredCow, we decided to do the same and check for any of the process that is not being followed, any area where a new process needs to be set up, or any challenge that is being faced due to any of the process.
After some inspection, we figure out that in some of the projects we don’t have a well-defined process and necessary checks for coding standards setup, which results in poor code quality and longer review cycles.
One such project is Employee Portal which is an Open Source project that we use as a playground for freshers and interns. This way we provide them learning by contributing as a team to a real-life project which is used by the organization. When asked by the team helps in this training we got to learn about many problems that they were facing in the code reviews like:
1. Lack of details in Issues and Pull Request descriptions
2. Feedbacks on writing cleaner code
3. Multiple iterations of reviews
Though we have a defined process and guidelines for all these things it was really necessary to make everyone implement them.
In ColoredCow, enforcing a process is the last option we choose instead we try to make everyone understand the need of that process and how it will help everyone if we all follow it. Every member should feel responsible to follow the process as we all share the same organizational goal and works really hard as a team to achieve it.
So to make it easy for everyone to follow the process, we came to a solution of implementing the CI checks in the projects and making GitHub issues and PR templates. This helps in providing a structured framework for the code review cycle and also reduces the time and frustration of the reviewer and the developer.
Now, implementing these checks and templates in any existing project is a time-consuming task as we need to do a full project cleanup and if required we also need to communicate with the clients about it. Fortunately, in most of our projects, these CI checks are already applied. Only a few projects were there where we need to correct the process. So we started implementing these checks in the project so that all the projects should be in sync regarding the process.
But implementing these processes in the exiting projects is not a permanent solution. After discussing this problem and solution we came to a conclusion that we need to correct it at the initial phase i.e while a project is being set up. For this, we decided to make a boilerplate for frameworks that we usually use in our projects and provide all necessary coding standard checks, and template inbuilt in it. This way we will not enforce everyone to follow the process but the process will automatically be followed once everyone knows the purpose of these boilerplates and will use them for new projects.
We decide to create a boilerplate for all the frameworks that we use, starting with Laravel as it is one of the frameworks that we are using for a long time. So we launched an open-source boilerplate for Laravel projects a few weeks ago and are using it for all of our new projects. It comes with some inbuilt feature that helps in automated code analysis before the review cycle
As we talk about the boilerplate, we are getting a lot of ideas of how we can make it more effective, some of the possible areas are: