5.3: Program Quality
-
- Last updated
- Save as PDF
Overview
Program quality describes fundamental properties of the program’s source code and executable code, including reliability, robustness, usability, portability, maintainability, efficiency, and readability.
Discussion
Whatever the approach to development may be, the final program must satisfy some fundamental properties. The following properties are among the most important:
- Reliability : how often the results of a program are correct. This depends on the conceptual correctness of algorithms, and minimization of programming mistakes, such as mistakes in resource management (e.g., buffer overflows and race conditions) and logic errors (such as division by zero or off-by-one errors).
- Robustness : how well a program anticipates problems due to errors (not bugs). This includes situations such as incorrect, inappropriate or corrupt data, unavailability of needed resources such as memory, operating system services and network connections, user error, and unexpected power outages.
- Usability : the ergonomics of a program: the ease with which a person can use the program for its intended purpose or in some cases even unanticipated purposes. Such issues can make or break its success even regardless of other issues. This involves a wide range of textual, graphical and sometimes hardware elements that improve the clarity, intuitiveness, cohesiveness, and completeness of a program’s user interface.
- Portability : the range of computer hardware and operating system platforms on which the source code of a program can be compiled/interpreted and run. This depends on differences in the programming facilities provided by the different platforms, including hardware and operating system resources, expected behavior of the hardware and operating system, and availability of platform specific compilers (and sometimes libraries) for the language of the source code.
- Maintainability : the ease with which a program can be modified by its present or future developers in order to make improvements or customizations, fix bugs and security holes, or adapt it to new environments. Good practices during initial development make the difference in this regard. This quality may not be directly apparent to the end user but it can significantly affect the fate of a program over the long term.
- Efficiency /performance: the measure of system resources a program consumes (processor time, memory space, slow devices such as disks, network bandwidth and to some extent even user interaction): the less, the better. This also includes careful management of resources, for example cleaning up temporary files and eliminating memory leaks.
- Readability : the ease with which a human reader can comprehend the purpose, control flow , and operation of source code. It affects the aspects of quality above, including portability, usability and most importantly maintainability. Readability is important because programmers spend the majority of their time reading, trying to understand and modifying existing source code, rather than writing new source code. Unreadable code often leads to bugs, inefficiencies, and duplicated code .
Key Terms
- efficiency
- The measure of system resources a program consumes.
- maintainability
- The ease with which a program can be modified by its present or future developers.
- portability
- The range of computer hardware and operating system platforms on which the source code of a program can be compiled/interpreted and run.
- readability
- The ease with which a human reader can comprehend the purpose, control flow, and operation of source code.
- reliability
- How often the results of a program are correct.
- robustness
- How well a program anticipates problems due to errors.
- usability
- The ease with which a person can use the program.