Skip to content
Published at September 08, 2017
Product Features

Early Warnings for Future Maintenance Problems

CodeScene's early warning feature helps detect future maintenance problems before they become problems.

A codebase under active development evolves at a rapid pace, and as soon as the organization scales beyond 10-12 people it’s virtually impossible for a single individual to maintain a holistic picture of the system. 

 

The roots of future maintenance problems are often introduced in change bursts, perhaps by shoehorning a new feature into an existing design, and from there they only grow worse over time. Wouldn’t it be great if you could get an early warning when that happens so that you can take appropriate counter measures and save your code from decay?

 

 

What’s an Early Warning?

 

The CodeScene tool offers the ability to detect potential maintenance problems and early warnings in your codebase. The earlier you react to those findings, the better, so let’s look at a few examples.

 

The following figure shows an example on three different warnings auto-detected by CodeScene in Google's TensorFlow codebase. TensorFlow is a library for machine learning, and the warnings are highlighted using yellow tiles:

 

dashboard (1)

CodeScene detects early warnings in your codebase.

 

These early warnings point your attention to different aspects of the system:

 

  • Detects Code before it becomes a Hotspot: This warning highlights code that isn’t a hotspot yet, but climbs rapidly on the hotspot ranking (check out Predict Maintenance Problems In Large Codebases for an introduction to hotspots). You use this information as a driver to refactor those Hotspots into more cohesive units, if appropriate.
  • Identifies Steep Increases In Complexity: Since CodeScene knows how your code typically evolves, the tool can detect parts of the code that suddenly increases in complexity as shown in the next figure. This doesn’t mean it’s a problem, rather the warning is CodeScene’s way of drawing your attention to an area of the code. Use this information to focus code reviews and additional testing.

 

ComplexityTrend (3)

Early warnings are delivered for code that accumulate complexity rapidly.

 

  • Predict Delivery Risk: CodeScene calculates a risk profile for your codebase, which is based on how the system has evolved and what a typical change looks like. That is, the algorithm focuses more at how a commit looks than the changed code itself and combines its technical metrics with social data such as developer experience. This is information that you use to prioritize code reviews and to reason about delivery risks of individual features.

 

HighRisk

The detailed view of high risk commits

 

 

 

Context Matters

 

The advantage of social code analyses – like these early warnings – is that they take your context into account. This is important because different organizations have different quality goals; In some codebases large, monolithic files are the norm, while others prefer a more modular design with small and cohesive units.

CodeScene solves that by making the warnings relative to the rest of your code, which means that false positives are kept at a minimum and the presented results are directly relevant in your context.

 

Finally, there’s the option of integrating the early warning detection into your continuous integration pipeline as demonstrated here.

 

CodeScene is free for open source, so give it a try at codescene.io.

Adam Tornhil

Elements Image

Subscribe to our newsletter

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Semper neque enim rhoncus vestibulum at maecenas. Ut sociis dignissim.

Latest Articles

Sneak-Peek: IDE Integration for CodeScene!

Sneak-Peek: IDE Integration for CodeScene!

At CodeScene we are proud to announce that we're launching an IDE integration, offering Code Health feedback in real-time. You'll get recom...

Visualize team-code alignment: reverse engineer your organization from version-control

Visualize team-code alignment: reverse engineer your organization from...

Visualize team-code alignment: reverse engineer your organization from version-control

CodeScene On-Prem Release Announcement Dec 2021

CodeScene On-Prem Release Announcement Dec 2021

As 2021 draws to a close, we would like to share with you some of the latest features ready and waiting for you in CodeScene. Read more!