The Psychology of Quality and More |
CHAPTER 10 : Programming Usage
10.6 Integrity and RecoveryOne of the most annoying things to happen to a user of a program is for data to be corrupted or lost, possibly where a large amount of effort has been invested. In strong data-oriented and safety-critical applications it is essential to be able to guarantee data and system integrity. It is also good style to be aware of, and handle appropriately, the integrity in less critical applications. The basic principle of integrity is that the information within a system must always be correct. You should never end up with a situation where the system has become corrupt, even in a minor way, and where the program is unaware of this. To ensure integrity, the program will typically check the state of the data at regular intervals and also at key points during processing. Particular care needs to be taken with intermediate data states and when changing the data. Integrity may be checked either by ensuring data is within valid bounds, or by using redundant information which may allow a recovery routine to attempt to repair the damage. For example, walking a doubly-linked chain from either end will allow a single broken link to be found and fixed. The ultimate in recovery is power-fail restoration, where the program can be turned off at any time, and then carry on where it left off on power-up. If there is no hardware assistance for this, then the program must regularly save its entire context (being aware of possible power failure during this too!). Where full recovery is not possible, partial recovery is better than none, and appropriate diagnostics should be used.
|
Site Menu |
Quality: | Quality Toolbook | Tools of the Trade | Improvement Encyclopedia | Quality Articles | Being Creative | Being Persuasive | |
And: | C Style (Book) | Stories | Articles | Bookstore | My Photos | About | Contact | |
Settings: | Computer layout | Mobile layout | Small font | Medium font | Large font | Translate | |
You can buy books here |
And the big |