NashTech

The value of code reviews

The value of code reviews

nashtech-code-review

As software development transitions away from waterfall workflows to more Agile and iterative practices, there is a growing perception that artifact (document and code) review is not as critical – we’re responding to change instead of following a plan!

When it comes to software quality, we all think we know the difference between good and bad code. Customers often ask us to perform one-off code reviews, typically when taking on a code base or when a new CTO arrives!

Whilst one-off code review is useful, the real value of regular code reviews is in maintaining the long-term quality of the code base. Here, we outline how we define code quality, how we go about reviewing and measuring it, and lastly, how this links through to technical debt management.

What is software quality?

In the context of software engineering, software quality can be split into two distinct areas: 

  • Software functional quality reflects how well it complies with or conforms to a given design, based on functional requirements or specifications. That attribute can also be described as the fitness for purpose of a piece of software. Functional quality is typically enforced and measured through software testing. 
  • Software structural quality refers to how it meets non-functional requirements that support the delivery of the functional requirements, such as robustness or maintainability, the degree to which the software was produced correctly. Structural quality is evaluated through the analysis of the software structure, its source code, libraries, architectural standards and design patterns employed. This article is focused on software structural quality. 

The importance of code reviews

Whilst one-off code review can take a snapshot of code quality, an effective code review process aligned with the software development or maintenance approach is key to ensuring the long-term quality of the code base. Shift left is a practice intended to find and prevent defects early in the software development process. Like testing, code reviews are of paramount importance in ensuring good code and providing a way to locate problems as early as possible as well as ensuring the consistency and reliability of the software. The earlier you find errors, the faster, easier, and cheaper they are to resolve. 

SmartBear Software conducted a global online survey in 2020. The respondents rated code reviews as the best way to boost code quality. 

Additionally, more than 80% of developers surveyed said satisfaction with code review processes is directly linked to confidence in the overall quality of software released. 

Code reviews can be conducted in a variety of ways, including manual reviews, pair programming, mentoring and the use of shared documents for easy review. Whilst all these methods are effective, they can be very time consuming – this is where tools come in.

Using tools to review code quality

Code review tools provide a way to automate the process, and like test automation support more frequent and earlier reviews. The tool we most use is SonarQube. 

Code quality and security are similar in that both types of issues can be identified with static analysis. Static Application Security Testing (SAST) tools are designed to analyse source code or compiled versions of code to help find; bugs, vulnerabilities and code smells. 

Such tools enable our software engineers to discover security vulnerabilities (using OWASP Top Ten) early and often in real time as they write code. These tools are now integrated into the development environments (IDE) we use, such as, Visual Studio.  

Static code review tools also help developers to understand structural quality and to follow coding standards. Using Continuous Integration tools allows for automatic triggering of checking against coding standards and code smells. This can give developers immediate feedback, decreasing the chance of errors and bugs getting into production.  

Managing technical debt

One of the advantages of producing quality code from the first iteration is that it reduces technical debt. High quality code may take longer initially to produce but will result in less bug fixing and refactoring and can reduce or remove the long-term pain of technical debt. High quality code makes long-term development and maintainability easier and (critically for customers) cheaper. 

Our approach to increasing code quality is to continuously track and prioritise technical debt so that we can make the business case to refactor the most important parts of the client’s code base.

Ready to know more?

Learn more about the  NashTech approach or arrange a call to discuss how we can help, email  info@nashtechglobal.com.  

Suggested articles

From rising above adversity to riding the wave of digital transformation in the education sector

Explore how NashTech help Trinity College London ride the wave of digital transformation in the education sector

Migrating and modernising the virtual learning environment to AWS for an enhanced experience

The migrated and modernised Moodle infrastructure means that The Open University can now take advantage of cloud benefits.

A glimpse into a year-long RPA journey with a leading digital advertising service

A glimpse into a year-long RPA journey with a leading digital advertising services and solutions provider and how NashTech helped them.

We help you understand your technology journey, navigate the complex world of data, digitise business process or provide a seamless user experience

Scroll to Top
SAMPLE TITLE
sample short
sample heading lorem isump
FREE WHITEPAPER
Unlock the power of knowledge with our new whitepaper
“Elevating User Experience for Product Owners”
FREE WHITEPAPER
Unlock the power of knowledge with our new whitepaper
“Elevating User Experience for Product Owners”