Send
Close Add comments:
(status displays here)
Got it! This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
Copy-update problem
1. Copy-update problem
2. Copy-update problem
Question: What is the copy-update problem?
The copy-update problem is that when a copy is made of an original, and the copy (or original) is modified, and the original (or copy) is not updated, but should be, then copy-update problems result.
That is, a copy that needs an update creates redundancy that, if not computer-checked, can cause problems.
Let us look at this problem in more detail.
3. Redundancy
Question: What is redundancy?
Redundancy is repetition.
This sentence is overly redundant.
Note that the above sentence is self-referential in that it refers to itself.
4. Redundancy
We are interested in two types of redundancy.
noncomputer-checked redundancy
computer-checked redundancy
Question: What is noncomputer-checked redundancy?
Noncomputer-checked redundancy is redundancy that is not checked by a computer.
Question: What are some examples of noncomputer-checked redundancy?
Some examples of noncomputer-checked redundancy include the following.
photocopies and original
databases (not in normal form, or distributed)
phone list
Is noncomputer-checked redundancy good or bad?
5. Noncomputer-checked redundancy
In general, noncomputer-checked redundancy is bad. Avoid if possible/practical.
Programming examples:
repetition within program code
There are many abstraction techniques to deal with noncomputer-checked redundancy. What are some of these?
Here are some abstraction mechanisms that are used to deal with noncomputer-checked redundancy.
constants
procedures and functions with parameters
modules
classes and objects
... and many more ...
6. Program code goal
Goal: Ideally, every (important) aspect of your program/system should be changeable in one and only one place.
This goal has a huge impact on how one writes code.
7. Computer-checked redundancy
Question: What is computer-checked redundancy?
Computer-checked redundancy is redundancy that is checked by a computer.
Question: What are some examples of computer-checked redundancy?
Some examples of computer-checked redundancy include the following.
Error detection and correction
Automated backup systems
Disaster recovery
Spelling checkers
Memory parity checks
Communication-line protocols
Type rules and checks in programming languages
Is computer-checked redundancy good or bad?
8. Computer-checked redundancy
Computer-checked redundancy is good.
Goal: Work computer-checked redundancy into programs/systems to detect possible errors and other issues.
9. Spelling checker
What does a spelling checker do?
Where is the redundancy?
What are the limitations of a spelling checker?
10. Backup system
What does a backup system do?
Where is the redundancy?
What happens if the backup system is not automated?
11. Functional specification
Where is the redundancy in the following functional definition?
let f = (x+1)*(x+1)*(x+1)
where
x = 2
end
Let
y = x+1 to get the following.
let f = y*y*y
where
y = x+1
x = 2
end
12. Abstraction
13. Programming
Abstraction is looking at
similarities and ignoring
differences.
In programming terms, for code and data that contain noncomputer-checked redundancy, identify the similarities and differences.
A constant is a named literal.
A procedure contains similar code with formal parameters acting as placeholders for actual parameters (the differences) to be supplied later.
14. Laws of redundancy
The
laws of redundancy can be summarized as follows.
Avoid noncomputer-checked redundancy to avoid problems and issues.
Use computer-checked redundancy to detect problems and issues.
15. Difficulty
Identifying copy-update problems is easy.
Handling copy-update problems can be done.
The payoff is significant.
The payoff is easy to measure.
16. End of page
17. Multiple choice questions for this page
4 questions omitted (login required)