Outsourcing of application development or maintenance promises cost savings and focusing on higher-value activities unique to your business. However, assuring the quality of outsourced software code seems to be a great fear of many top executives, particularly when they intend to use offshore outsourcing services.
What if outsourcers approach offshore product development with clear quality objectives, working closely with their offshore team to track those goals through code review and using tools to monitor code quality?
That approach seems simple, but in reality it was almost impossible to make it happen, because there are many reasons code review often takes the back seat in software development projects, especially when it comes to offshore.
What Methods Can Be Used to Monitor Code Quality?
First, let’s get back to basics. Before thinking about monitoring code quality, it is crucial to train your development team for the code quality level you want them to achieve. Regardless of outsourcing or building it in-house, whenever a new person joins the team that will create source code, that person must be trained to produce the same quality of code as other team members.
The training process occurs in four steps:
- Training on coding convention, coding practices, and processes
- Training on architecture of the code base
- Training on hands-on coding tasks
- Closely monitor and review of all source codes the new person created (usually in the first month of performing real coding tasks)
The process above will ensure the person is trained and is coding the way all team members are expected to.
Next, there are three key actions to monitor code quality through a project’s duration:
- Regular code review to make sure every member is keeping up the applied practices
- Continuously scan source code (by using code analyzing tools) to find coding issues
- Encourage unit tests and monitor the test coverage
Suggested Tools For Reviewing Code
Code review does take time and may inhibit the team’s quick project timeline, but as more project members are added, it becomes necessary. The main reason some developers are still unwilling to do code reviews is that they feel the benefit of improved code quality against the pain and time conducting it just isn’t worth it. Imagine how long it takes to extract another team member’s code from source control, print them out, highlight the issues, and then bring them to a meeting for discussion with other people.
Using code review tools can help facilitate and manage the process, while speeding up the time for doing so. There are now software tools for peer code review that solve above issues of collaboration and source control system integration.
Here are three recommended tools:
- Code review tool: Crucible
- Static code analyzers: Checkstyle or Sonar
- Unit test coverage: Sonar
How Can You Maintain Code Quality With Offshore Teams?
At the beginning of your outsource engagement, provide the coding convention your team is trained on to the offshore team. From day one, have your team do code reviews of every line of code written by the offshore team for the first month of the project. Often, this is enough time to get the team trained to produce the quality you expect
Once you feel confident that your offshore team is well trained in your coding convention, the code review task can easily be passed to an offshore team lead. That person should be charged with training new members of the team and periodically reviewing code to ensure that quality is maintained.
In engagements with our clients, Checkstyle is often configured in each developer’s IDE and it can report any non-conformed code. Sonar is installed both offshore and onshore to scan source code for potential problems, to run and report unit test execution and coverage.
Additionally, all team members are encouraged to raise issues they find in the code, or to refactor areas that they work on to improve the quality. We still assign a software architect from our clients to do random code reviews to make sure the team continues to maintain the high quality of their code.
By applying the practices above, you can be certain that both your onshore and offshore teams are writing code that is consistent in quality. Putting in place systems now allows you to expand your team as the project grows, and achieve better end results in your product.