Improving code quality

Software quality: To the rescue!

In this post we’ll show what a healthy relationship with code quality looks like. After our introductory post, software quality (‘SQ’ for friends) might seem intimidating, maybe even daunting. But fear not, SQ is here to help, let’s see how.

Code quality is your friend

In general terms, SQ can help in a daily development activity:

  • Check that you’re OK (or rather, your code)
  • Help you quickly see mistakes or oversights
  • Boost your experience by learning better practices

This translates into:

  • Write beautiful code: not too complex, enough comments, no clones, minimal risks
    • Better Reliability and Safety
  • Write better code, which can be read and understood even months later, and conform to good patterns
    • Increased Maintainability and Performance

And once you have code quality as your ally, you can use it to ask questions:

  • In the present: “Does the code I just wrote comply with the principles I chose to follow?”
  • Looking back in the past: “What errors do I keep making (not necessarily at the same location)?”
  • Anticipating the future: “My code seems to get more complex. Is it getting out of hand?”

This is all well and good, but what does it mean in practice?

Well, trusted answers come from knowledgeable and reliable sources. In our case, it means we need a way to extract knowledge from the source code, in a consistent way.

Source Code analysis should extract Code attributes in a repeatable and deterministic way
Code quality starts with a reliable analysis

You are code quality’s friend

We’ll explore soon how quality can be measured to produce attributes to work on, but for now, let’s just keep it simple:

“Benefits of SQ come with trust in its results”

And as good relationships are built on balance, SQ also needs to rely on you!

It doesn’t have to be a big commitment, we’re talking about:

  • Defining the practices and checks best suited for the project and the team
    It’s a matter of listing what you already agree on and apply when coding.
  • Tailoring SQ to focus on relevant findings
    With the previous list, SQ can help detect deviations from your practices.
  • Gently produce results
    It is frustrating and discouraging to parse 20 pages of rule violations.
    SQ can help focus on issues found on freshly written code, critical code, cloned code or a combination of these.
  • Build a habit
    As well-known checks and manageable issues lists become familiar, we incorporate them into our personal process.
    We no longer “do” quality, we “are” quality.
  • Quality by design
    As SQ has its place in our development toolbox, we can use it to keep being good, and aim at getting better.

In essence, software quality should not be a sudden act of self-awareness leading to disruptive decisions, but a smooth progression.

We are not binary creatures (despite our current subject), and usually dislike forced change. But there is one thing we can be very good at: evolution.

And so, we can indeed experience a healthy relationship with code quality, if we are given the proper messages. In the following posts, we’ll look into how SQ can translate its quantitative results into meaningful qualitative assessments.

Further readings

Share:

Share on linkedin
Share on twitter
Share on whatsapp

Leave a Comment

Related Posts

A single source of truth - source code

A single source of truth

Software projects produce lots of artifacts over time, obviously the source code, but also requirement and design docs, test cases, bug reports, CI scripts, installation

The safe & secure software factory

The Safe & Secure Software Factory (SSSF) merges the principles of DevOps, Safety Criticality, Cyber Security and Industrial Manufacturing. SSSF enables you to create a

Software quality a winning team

Software quality: Winning as a team

We have exposed a nice framework in previous posts: raw data produce metrics and indicators, and a rating model evaluates quality for each project component.

Hey there!

Subscribe and get an email every time we’ve got a new quality piece on here.