14.7.22
Development
Clean Code

Software quality: criteria for “good” software products and the role of clean code

Software quality - if you ask the average consumer what this means, the most common answers are likely to be: "The software does what it is supposed to do", "It is easy to use" or "The interfaces look nice". And rightly so. After all, it is the users who end up using the software solution. But that is only one side of the coin. The purpose of this article is to explain which software quality features and criteria are important from a technical and economic point of view, and how clean code development can help to maximise software quality.


  1. What does good software quality actually mean?
    1.1 External software quality
    1.2 Internal software quality
  2. Why software quality is so important for profitability
  3. Characteristics of good (internal) software quality
    3.1 Readability
    3.2 Traceability
    3.3 Testability
    3.4 Reusability
    3.5 Evolvability
  4. How clean code development can optimize internal software quality

1. What does good software quality actually mean?

What constitutes good software quality ultimately depends on who you ask. For example, users evaluate functionality and usability, solution architects evaluate the structure of the entities, software developers evaluate the quality of the source code, administrators evaluate the supportability, product managers evaluate the range of functions, and so on. For a better classification, it is therefore worth dividing the term software quality into external and internal software quality.

1.1 External software quality

External software quality describes the external view of the software. How stable and reliable is the application? How fast does the software respond? How intuitive and easy to use are the interfaces? What functionalities are covered? How secure is the system? The most important features are therefore: functionality, usability, reliability, robustness, performance and security: More qualitative features, such as usability, can also be validated.

Our Head of UX Design, Uwe Betzin, explains how UX design can be objectively tested here: (UX) design must work

External software quality: the user's perspective

1.2 Internal software quality

Internal software quality describes the internal perspective - i.e. the architecture, design and quality of the source code. How easy is it to read and understand the code? How easy is it to rewrite, modify and extend the code? What are the dependencies? What is the test coverage? The most important features are: readability, traceability, testability, reusability and evolvability.

Internal software quality: the perspective of software developers

2. Why software quality is so important for profitability

Of course, external quality features such as the right range of functions, reliability or ease of use are important criteria when it comes to the profitability of a solution. After all, the output of the software product, such as efficiency improvements, must exceed the development costs incurred over a certain period of time to ensure a positive ROI. However, this calculation should not ignore the product's lifecycle and therefore the future. As processes, technologies and even business models change, so do software requirements.

Conversely, this means: The solution must also be able to be further developed, adapted or changed in a cost-effective manner. This is where internal quality features come into play. If internal software quality is neglected, technical errors will occur during development. And these defects grow with every change.

As a result, the effort required to change the source code increases - not linearly, but exponentially. In many cases, this is the inevitable end: The software solution can no longer be developed further and must be rewritten from scratch. To avoid this, and to develop software solutions that will be in use for a long time, the internal software quality must also be at a high level. Right from the start.

3. Characteristics of good (internal) software quality

3.1 Readability

Source code is much more often read than written. Syntactic norms and conventions have been established that need to be followed. You could compare it to standard German spelling according to the Duden. We are used to reading it and can therefore type it quickly. Phonetic spelling, on the other hand, conveys the same meaning, but because we are not used to reading it, it takes much longer to decipher it. The same goes for source code: If you write it all in the same form and syntax, you will find your way around much faster.

3.2 Traceability

However, semantics are almost more important than syntax. Software developers spend 70-90% of their time reading and understanding source code. Only 10 to 30% of that time is actually spent productively. To optimise this ratio, it is essential that the code is semantically understandable. This means being able to see what the code is doing and why it is doing it - which also means linking customer requirements to the code.

Syntactic readability and semantic traceability are elementary features of internal software quality

3.3 Testability

However, just as important as readability and traceability is the functional correctness of the code. A high level of test coverage is essential not only to ensure this, but also to be able to guarantee and prove it. Automated tests must be used to verify the smallest parts of the source code, e.g. through unit testing, as well as in its entirety, e.g. through integration testing. This is the only way to ensure that changes do not lead to regressions.

3.4 Reusability

Software components should be implemented in such a way that they can be reused. This has several advantages: On the one hand, it reduces code duplication, making the source code leaner and more efficient. On the other hand, reusing the same code components reduces potential sources of error, which can significantly reduce maintenance costs.

3.5 Evolvability

The term evolve is derived from the word evolution and describes the ability of a living being to adapt to new environmental factors through genetic changes. In software, evolvability means that the source code is designed to be flexible. For example, a new feature can be implemented at a later stage in the development project with less effort than if it had been included from the start.

Evolvability: The ability to adapt to changes by modifying (the DNA/ the source code)

4. How Clean Code Development can optimize internal software quality

Clean code development is a normative value system for software developers. About values and virtues Clean Code Development teaches a work philosophy that is perfectly tailored to software development, which is based on agility, consistent interdisciplinary exchange, a high level of quality awareness and the urge for continuous optimization. In addition, there are very practical recommendations for actual coding. In five degrees subdivided practices and principles which, if taken from the outset, not only lead to high internal software quality, but also make it measurable and verifiable.


Quality feature CCD principles CCD practices
Readability Source Code Convention: Use of syntactic conventions that support quick reading and understanding of the code Statical Code Analysis: Automated tests that check the source code for formal errors

Code reviews: Source code should always be reviewed by a second software developer
Traceability Single Level of Abstraction: Only one level of abstraction should be used in a method

Principle of Least Astonishment: Software components should always be implemented exactly as you would expect them to be implemented

Keep It Simple Stupid: If a simple solution (also) works, this should always be chosen
Version Control System: A version control system should be used

Issue Tracking: "Customer requests" must be systematically recorded, prioritized, processed and tracked
Testability Integration Operation Separation Principle: Either a method only contains logic (operation) or no logic at all and only calls other methods (integration) Test First: First, tests are written for a specific interface and only then is it implemented

Test Automation: Whether unit or integration testing: tests must be automated in order to consistently offer added value
Reusability Don't Repeat Yourself: Code components must not be duplicated - copy/paste is prohibited

Single Responsible Principle: A class should only ever have one task/responsibility
Component Orientation: Components can be implemented independently of each other and fulfill a common contract so that they can be integrated later as desired
Evolvability Open Closed Principle: A class must be open for extensions, but closed for modifications

Dependency Inversion Principle: Classes must not be dependent on each other, but only on interfaces
Refactorings: Methods, patterns and tools to clean up source code in accordance with the CCD principles

Inversion of Control Container: The container resolves the dependencies and has control over the life cycle of the objects
Autor
Dominik Schaufelberger
Softwareentwickler | Clean Code Ambassador
Autor
Florian Kinn
Softwareentwickler | Clean Code Ambassador

Weitere Artikel

UX/UI
19.1.22

(UX) design must work

How can you actually test UX design objectively? Code Testing vs. Design Testing: A Comparison

Clean Code
Development
Digitization
30.11.22

Sustainable software development: What is meant by it and how to develop sustainably

How to develop software that can be flexibly and adapted to new market and customer requirements in the long term

How can we advise you?
telephone
Online consultation
Contact request
telephone
We are looking forward to your call
+49 (0) 721-619096-0
+49 (0) 721-619096-19
Available for you from
Monday to Friday 8:00 a.m. to 4:00 p.m.
Online consultation
Book an appointment that's right for you online
We are looking forward to your message
If you would like to know which data we process and how long we store it, you can find further information in our Privacy statement.
Thank you so much! We have received your contact request!
Oh no! Something went wrong. Please try again!
contact