Quality
Quality is a permanent and implicit requirement!
Yes, this pragmatic seems quite too obvious to be worth talking about. We all
know that everyone wants high quality. So, why mention it in first place?
The reason is that creating high quality software is not easy at all. Plenty
of source code (including most software I have written), is not of high quality.
Two main reasons are:
- writing high quality software requires a lot of knowledge, experience and
discipline, especially if there is no or little support integrated in the
used programming language and tools
- writing high quality software seems to reduce productivity, because
the benefits only become visible much later
Let's take a very typical example. We have to add a new functionality to an
existing program. After examining the source code, which may have been written
by someone else, we see that it is of bad quality and/or it is not prepared
to add the new functionality in an appropriate way. Or, worse, it contains programming
errors. In this case we have two possibilities:
- first we refactor the existing code (this takes time), and then we add the
new functionality in a well designed, properly implemented way.
- we accept the existing code (after all, it works and our client is impatient),
and quickly change the code in a mediocre way.
It is a fact that programmers frequently choose solution 2, because they may
feel themselves not responsible for the bad code, because it is often a frustrating
task to change existing code, and also because it may take a lot of time (days,
weeks or even months). But, as software often has to be changed in the real
world (about 70% of a programmer's time is spent on maintenance), the consequence
of repeatedly doing changes in such a way will undoubtedly end up in a disaster:
unstable, unmaintainable spaghetti code.
Hence, we constantly have to resist against writing low quality, unmaintainable
code.
Moreover, we should always keep in mind that:
high quality code always reduces total software development
costs
even if at some points much more time must be invested.
But: What exactly is high quality code? Typically, when speaking about quality
of software, we think of the following properties:
- correctness (accuracy)
the ability of the software to execute the tasks exactly as defined in the
specifications, without any faults
examples:
- the total amount of an invoice is the exact sum of the items' quantities
multiplied by their unit price.
- the quantity in stock displayed on screen is correct; we can absolutely
rely on the data.
- the balance sheet is always balanced (sum of all debits = the sum of
all credits)
- reliability (robustness, stability, integrity)
the ability to perform the tasks under normal conditions and to react
appropriately under any abnormal conditions.
examples:
- any data entry is checked for validity and refused in the case of error.
- the system doesn't crash and loose data, but reacts appropriately in
the case of an unavailable resource (e.g. a file open error)
- data integrity is guaranteed in the case of power failure.
- ease-of-use
the ability of the users (end-users, administrators and developers) to
quickly learn, understand and use the software
- flexibility (adaptability, extendibility, compatibility, portability)
the ability of the software to be adapted easily to new or modified specifications
and requirements of the users
- reusability
the ability of a piece of software to be reused in the same or another
domain (application) and/or to be extended for new functionalities, without
having to re-implement its existing functionalities.
- efficiency (speed)
the absence of any waiting times for users as well as the ability to use
as few resources as possible.
- maintainability (readability, testability)
the easiness for administrators and developers to detect and correct errors
and to quickly understand and adapt the software to changes in requirements.
- security
the ability of the software to protect data against unauthorized access
as well as the possibility to trace actions to any desired precision.
Obviously, there are a lot of requirements to be fulfilled by high quality
software. Each of the following pragmatics concerns quality and contributes
to one or more of the above properties.