CHAPTER 10 : Programming Usage
PART 4 : USAGE
CHAPTER 10 : Programming Usage
10.1 Elegant programming
10.2 Performance programming
10.3 Defensive programming
10.4 Error handling
10.5 Diagnostics
10.6 Integrity and Recovery
10.7 Testability
10.8 Portability
10.9 Localization
10.10 Usability
10.11 Summary
<--Prev page | Next page -->
10.11 Summary
- Before you start, understand the user, his needs and the overall
problem.
- Use a design methodology and design models which are appropriate
to the problem.
- Make sure interface definitions are clear.
- Design for minimum coupling.
- Make process and data clear and cooperative.
- Design for performance - don't hack it in later.
- Performance traps in code include deep loops, heavy layering,
complex interfaces and inappropriate algorithms.
- Beware of run-time parameters shifting the sands of performance.
- Decide on your required level of defensiveness, then be consistent
in defense.
- Defend against system, program and user errors.
- Defend the defenses too!
- Decide on a consistent error handling scheme.
- Enable the user and the maintainer to find sufficient information
to adequately understand an error.
- Ensure an appropriate and consistent level of integrity and
recoverability.
- Make code more testable by reducing complexity.
- Be clear about the required portability, between different systems
and different compilers.
- If localization is ever going to be an issue, Utilize a standard
library system.
- Pat attention to all aspects of usability, including installation,
configuration, administration and documentation.
<--Prev page | Next page -->
|