What Are The Characteristics of Quality Code?
Tags: codequality, beginners, codenewbie, watercooler
Published: 2020-09-17 11:03:03

Nowadays, we heavily rely on software running all sorts of applications, from banking solutions to browsing through our social media. And, let's be honest, that last one is the most important of all these days. Because we are so dependent on software, companies have to make sure that the code runs smoothly at all times. For that, we need quality code. But what are the characteristics of quality code?

_Cover Photo by [Chris Ried](https://unsplash.com/@cdr6934?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText) on [Unsplash](https://unsplash.com/@cdr6934?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText)_

I have been [reading](https://www.rosafiore.eu/category/operating-system/write-great-code/) the book series "Write Great Code" by Randall Hyde. The very first book of the series, [Understanding the Machine](https://www.amazon.com/Write-Great-Code-2nd-Understanding-dp-171850036X/dp/171850036X/ref=mt_other?_encoding=UTF8&me=&qid=), starts with defining what great code actually is. Of course, Hyde's opinion strongly influences the definition of great code in this book. However, it has prompted me to take a deeper dive in the subject and see what other opinions are out there.

## System Quality Attributes
When googling with search terms like "code quality" and "characteristics of quality code" the result vary a lot. The primary reason: each piece of software has different requirements. The definition of quality code depends on the requirements for the software. Say, you have an application that has to be super quick, then high speed is the characteristic of quality code. In that case, it might not be an issue that the portability of the software is practically non-existent.

There is no clear set of characteristic for quality code in place. However, you'll see that there is a set that many people in the software engineering industry agree upon.

![What are the characteristics of quality code?](https://dev-to-uploads.s3.amazonaws.com/i/uw5nefxqa2rmj9ljdjmy.png)

These are just some of the common software quality attributes that students get taught during many software engineering courses. However, in the end, it all boils down to what the application requires. Since there are so many different quality attributes, you can always pick the ones that apply most for you. [This Wikipedia page](https://en.wikipedia.org/wiki/List_of_system_quality_attributes) offers a list of system quality attributes that you can choose from for your next project.

## In Short
> Great code is software written using a consistent and prioritised set of good software characteristics. In particular, great code follows a set of rules that guide the decision a programmer makes when implementing an algorithm as source code.
 - Randall Hyde; Understanding the Machine

Hyde gives this quote in his first book, in the very first chapter. This quote perfectly summarises what quality code should be. So, what are the characteristics of quality code? That depends on your requirements and what you want out of your system.