Book a demo
Code Health Metrics in CodeScene

Technical Debt is a hot topic these days. Companies in different industries struggle with walls of technical debt to somehow overcome. 


Technical debt can have devastating outcomes for organizations, as we recently have seen. But it doesn't have to be like that. It doesn't have to cripple or affect your company. 



How do you find and reduce technical debt? 


First of all, you need to know where to look. Watch our video and you'll quickly understand that all technical debt is not bad. In code with low development activity, you can allow certain amount of technical debt that you can tolerate and don't need to focus on. But you do need to identify and prioritize technical based on impact. This is where CodeScene comes in.




What you need to remember:


  • You don't have to fix all technical debt. Watch our video to understand why, and find out where you need to focus. 
  • Most of your code is going to be in the long tail. This is low-interest debt. 
  • Code Quality issues in a hotspot are expensive. This is high-interest debt. You can analyze your code in seconds and find out where you have your hotspots. 
  • Hotspots only make up 2-4% of the total codebase, but attract 20-70% of all development activity! 




What is a hotspot?


Hotspots are the workhorse of software analyses and our recommended starting point as you explore a codebase.

As we already mentioned in the video, most development activity tends to be located in relatively few modules. A Hotspot analysis helps you identify those modules where you spend most of your development time.




Hotspots let you visualize large codebases by combining a code health perspective with temporal and organizational data.




Filter Hotspots interactively by Team



It’s common to have multiple development teams committing to the same mono-repo codebase. The interactive hotspot map lets you filter the view by team or authors. That way, you can limit the information to what’s relevant to your team, as seen above.




Code Health Metrics


Combined with CodeScene's Code Health perspective, you can quickly prioritize technical debt or other code quality issues.



No alt text provided for this image
The high-level concept for Code Health, an aggregated metric predicting risks and waste.

Code Health is an aggregated metric based on 25+ factors scanned from the source code. The code health factors correlate with increased maintenance costs and an increased risk for defects.


  • A healthy codebase enables a fast time-to-market with, on average, 124% faster development time.
  • Healthy code also contains 15 times fewer defects than unhealthy code. There’s also a statistically significant correlation between software vulnerabilities and several of the code health factors; red code is more vulnerable. For further details on the business impact of code health, see the Code Red whitepaper.


The Code Health trends can be automatically supervised in your CI/CD pipeline and/or Pull Requests. You can integrate CodeScene with Pull Requests.


Read more about how you can get a continuous feedback loop for engineering decisions based on data.




Where do you start?


Hotspots are an excellent starting point if you want to find your productivity bottlenecks in code. With an interactive hotspot map, you can explore any codebase. This is our recommended starting point, and helps the team build a shared mental model of what the code looks like, and where the weak and strong parts are.


  • Low code health in a development hotspots is expensive. Prioritize improvements here.
  • Low code health in stable parts of the codebase, i.e. non-hotspots, has lower priority.




Analyze your own code - where do you need to focus?


Use hotspots to prioritize technical debt and maintenance problems


Developers use hotspots to identify technical debt and maintenance problems. Complicated code that we have to work with often is no fun. Use the hotspot information to prioritize re-designs and strategic refactorings.



Technical leaders use hotspots for risk management


Making a change to a Hotspot or extending its functionality with new features might come with increased high risk. A Hotspot analysis lets you identify those areas so that you can schedule additional time or allocate extra testing efforts.



Hotspots points to code review candidates


At CodeScene we’re big fans of code reviews. Code reviews are also an expensive and manual process so we want to make sure it’s time well invested. In this case, use the hotspots map to identify your code review candidates.



Hotspots are input to exploratory tests


A Hotspot Map is an excellent way for a skilled tester to identify parts of the codebase that seem unstable with lots of development activity. Use that information to select your starting points and focus areas for exploratory tests.




Remember, the average organization wastes 23- 42% of their development time due to technical debt. By managing technical debt based on data, every organization can increase development capacity by at least 25%.


This means faster feature delivery efficiency and better quality. Don't forget to read Business Impact of Technical Debt.

New visual identity
New website
new product interface
CodeScene just got a new look!

The new identity revolves around our vision to “give code an intelligent voice” and reflects our forward-looking culture. The new logo reinforces the idea of artificial intelligence and CodeScene being there as an extra team member, guiding you toward better software and teams.

The new website presents relevant content in a clean, minimalistic and modern way with an aim to give visitors easy access to solutions and information.

We are proud to share this new identity with our community and hope that it will inspire all of us to write better code, build happier teams and future proof our software.