| < Day Day Up > |
|
The symptoms of a CAP Epidemic are:
Bugs that keep reappearing in different code locations.
The heavy use of search and replace for editing code.
Nonsensical comments and names due to a change in context of the copied code.
Strange bugs caused by forgetting small changes to copied code.
Complex procedures required for updating a single piece of information.
Duplicate occurrences of any human-editable information.
To prevent a CAP Epidemic:
Know what project code is available for reuse.
Know what external libraries are available for use in place of implementing the functionality internally.
Use high-level languages and their features such as functions, objects, templates, preprocessors, generic programming techniques, and aspect-oriented programming techniques.
Automate any unavoidable information duplication using scripting and other automation tools.
Code to avoid the need for asset duplication.
Keep up to date on new programming technologies such as Intentional Programming and Generative Programming.
To cure the effects of a CAP Epidemic:
Use refactoring to parameterize duplicate code and subsequently move it to a single location.
Take advantage of refactoring tools.
Keep up to date on the advancements in automating refactoring.
Test often to ensure that the refactoring does not change the behavior.
| < Day Day Up > |
|