One of the reasons why insurers struggle to keep up with digitalization is that the code quality in many of their IT systems is not as high as it should be. Ultimately, it has a direct impact on the technical debt of the company and the developers’ commitment to solving the problem. This also reflects a slow development cycle due to the amount of time and money spent on solving the problem, etc. Code quality is the health and foundation of mature enterprises. Companies that can comply with this requirement and produce quality code can be very agile and stay in the market. To be able to be agile in the market we must answer the following questions.
What is code quality? Why is this important? How to measure it? How to improve it?
Code quality is subjective and can differ from project to project, and developer to developer based on the product they are developing. For example, code developed by a Gosu developer cannot be measured on the same scale as code developed by a Data Scientist. Both have code quality metrics, but the process and measures are different. The Former develops an application, but the latter builds some Machine Learning models. But in general, if we look at the issue from a broad perspective, we can say that good code is the code that is easy to understand, easy to test, safe to reuse, and reduces technical debt. Then a follow-up question arises here. How is code quality measured?
There are different metrics in Java, Gosu static code analyzer, Python, or any other tool you can use to examine whether your code is well-written or not based on the following metrics:
6. Defect metrics
7. Complexity metrics
How can you make sure your code is trustworthy? If your code works consistently without any errors, it means that your code is highly reliable. To have reliable code, you should always maintain your code by measuring it. To ensure this, your code should be easily understandable and always ready to be tested to get constant feedback on code quality and to fix potential vulnerabilities and issues in the code. In the next stage, you should test the portability of your code by checking whether it can be run on other operating systems and environments other than the operating system on which it was developed. Since the portability of your code will be of high quality, you will be able to reuse it to build different applications thanks to the reusability of high-quality code. As for metrics, there are two types of metrics that describe different factors: Defect and Complexity metrics. Defect metrics determine how many and what kind of errors there are in the software you develop, while complexity metrics estimate how reliable and maintainable your software system is.
If you are not complying with the above-mentioned considerations, you might have a question in mind – how to improve code quality? You can find the answer to this question in many software solutions, but we want to demonstrate it in the Gosu static code analyzer, also known as GoQu.
GoQu, which stands for Gosu and Quality, is a tool for source code inspection by using predefined rules. A set of rules contains patterns of bad coding practices and weak points of the code. The following specialized static code analysis tool serves as a standalone commercial product and consists of two modules:
1. GoQu Dev
2. GoQu Hub
GoQu Dev is a local real-time browser plugin dedicated to any IDE (Integrated Developer Environment) with IntelliJ support, including Guidewire Studio. The solution includes around 150 pre-defined rules that enable real-time static code analysis of work-in-progress code being processed before it is committed. This software tool also helps to improve programming skills as it helps to get instant feedback on code quality. Programmers learn faster with detailed descriptions and examples of writing correct code written by Gosu experts.
The diagram shows the working cycle of GoQu Dev for developers and technical leaders:
Thanks to GoQu Dev, business owners get faster delivery, better software quality, reduction in software implementation costs, while developers and technical leaders can get more detailed information and feedback, monitor the quality of the delivered software, and reduce the amount of technical debt.
Whereas GoQu Hub is a SonarQube plugin for Gosu static code analysis. GoQu Hub is the first tool specifically designed to scan the code of Guidewire Centers, including customizations. It scans using a set of around 150 custom rules and provides comprehensive reports with overall statistics on the quality of the code for IT leadership. The code analysis process can also be integrated into existing CI/CD processes. Customizable reports generated in SonarQube for developers and management provide an overview of the entire Gosu codebase. The scan can be triggered by a merge request and assists the code review process.
The diagram below shows the product lifecycle from a business owner’s perspective:
We use both modules (Hub and Dev) simultaneously to get the best experience of GoQu, but they can be used independently as separate modules and all rules apply to both.
As for the advantages of the Gosu code analyzer, first of all, our tool has about 150 rules strictly dedicated to Gosu language issues. Secondly, there is a dedicated R&D team with proven experience to continuously improve the product. Therefore, new rules and functionalities are added to the product every year and continuous support for newer Guidewire versions is provided. This is much more than any other code quality tool dedicated to the Gosu language available on the market. That is why we believe our GoQu is the best available solution on the market today. Furthermore, each rule has a comprehensive detailed description and real code examples written by Gosu experts. Common scenarios and best practices make life easier for programmers who cannot keep up to date with the ever-increasing best practices of the Gosu language.
Thanks to the Gosu code highlighter, each rule has an assigned severity, so issues appear in different colors according to the severity of the unperformant code. In addition, issue descriptions have examples of compliant and non-compliant codes.
Using the Gosu static code analysis tool on SonarQube we can estimate the technical debt, which allows us to assess the amount of work that needs to be done to achieve the desired level of quality.
As a result, using GoQu you can get instant feedback on code quality, spend less time on code reviews, improve code quality, make estimates, reduce the risk of technical debt, poor design patterns and insufficient unit tests, and have a business-friendly dashboard to easily compare all projects at the company level.
If you have any questions, please contact us directly via email: [email protected]