Summary

 < 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 > 



Preventative Programming Techniques. Avoid and Correct Common Mistakes
Preventative Programming Techniques: Avoid and Correct Common Mistakes (Charles River Media Programming)
ISBN: 1584502576
EAN: 2147483647
Year: 2002
Pages: 121
Authors: Brian Hawkins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net