DEV Community

Cover image for Tools to Improve Code Quality
Alex Omeyer
Alex Omeyer

Posted on • Updated on

Tools to Improve Code Quality

Maintaining a healthy codebase is extremely important for any team that wants to ship quality products at a high pace.

If you want to improve your codebase health and look for the right tooling, this article will give you some ideas on where to start.

Automatic scans vs User reporting

Let's first look at the difference between static code analysis tools and user-input-based tools.

Static code analysis or source code analysis tools help dev teams analyse the code to detect defects and vulnerabilities. These tools run an automatic analysis of your legacy code or raise issues during the development process.

Some of these tools include CodeScene, SonarQube, and CodeClimate, and each of them has different functionalities. If you’re looking for an automatic code analysis tool, have a look at this overview.

The user-input based tool, such as Stepsize, is designed to fill the gaps left unaddressed by automatic code analysis tools.

I believe that the best way to learn about technical debt and other code issues is to make them visible for your team.

Automatic code quality tools, such as SonarqQube, are great at catching small pieces of debt related to code quality standards.

Automatic git analysis tools, such as CodeScene, are good at spotting indicators of tech debt in git data.

Stepsize is the best for codebase issues neither of these tools can catch. For example, the code that has high risk of breaking, poor codebase standards, and all other tech debt that goes beyond code quality standards and git patterns.

Other popular tools teams use to track maintenance issues are:

  • Project management tools, like Jira
  • List tracking apps, like Trello
  • Excel spreadsheet

Each of them has their own advantages and you can find a more detailed comparison of these tools here. But the main disadvantage of these tools is that it makes Engineers leave their workflow and switch context which leads to productivity loss.

What is the right tool for my team?

You might be thinking: great, now I know about a huge variety of tools that help with the codebase health and they all seem very helpful—but how to choose the right tools for my team?

Answer these 3 questions to decide whether you need to adopt a new tool:

  • What is the stage of our product?

Teams who are building the pre-market fit products usually focus on shipping new features as fast as possible.

But once you find the market fit, you need to take care of your codebase to have a long-term plan and maximise velocity.

If you’re not sure about adopting a new tool, start tracking technical debt in a spreadsheet. Here’s a free template you can use to start documenting technical issues.

This activity will give you an idea of how much time and effort you need to spend on technical issues and if it makes sense for you to adopt a new tool such as Stepsize to speed up the process.

  • How many people work on the project?

If you’re the only person working on your project, you probably know most of your codebase and don’t need a special tool to start fixing your debt.

But if you have a team and you often onboard new members, the best thing you can do is to give context to your code.

The Stepsize VSCode, Visual Studio and JetBrains extensions will help you add relevant comments and collaborate with your team on the maintenance issues without having to leave your workflow.

  • Do we have small, medium, or large technical debt?

Small: the type of tech debt that can be addressed as soon as the engineer spots it in the code and it’s within the scope of the ticket they're working on.

Tip: You don’t need any specific tools to fix this debt but rather an engineering culture that supports the idea of boy/girl-scout rule and clean code.

Medium: the type of debt that can be addressed within a sprint. It should go through the same sprint planning process as any feature work and be considered just as rigorously.

Tip: To build a habit of spending 10-20% of your sprint on code maintenance, make technical debt visible and track your progress. Stepsize is the best tool for it because it helps you easily track, prioritise and fix technical issues.

Large: the tech debt that cannot be addressed immediately or even in one sprint.

Tip: if your team is drowning in tech debt, start by bringing up this issue with your PM and other managers. The best engineering teams we’ve spoken to have quarterly technical planning sessions in which all engineering leaders participate.

If your codebase is old and most of the Engineers who contributed to this code are not around, you might need to use both automatic and user input tools to reduce technical debt.

  • Run the automatic analysis to identify hotspots in the codebase likely to have technical debt. Chances are high that automatic code analysis tools will show you a lot of tech debt, and you’d report it to decide whether the debt is worth fixing.
  • Use the Stepsize extension which will help you make codebase issues visible and address them without leaving your workflow.

What are some other methods that your team uses to improve codebase health? Share in the comments!

Top comments (0)