Summary

 < Day Day Up > 



Premature Optimization symptoms are:

  • Most optimizations performed before the final stages of development.

  • Poor readability and maintainability caused by optimized code.

  • Unnecessary constraints imposed early in development.

  • Poor optimizations performed early without the necessary knowledge of the complete application.

  • The caching of data for optimization purposes too early in development.

To prevent Premature Optimization:

  • Do not optimize until later in development.

  • Keep code simple as long as possible.

  • Use high-level languages.

  • Use encapsulation and abstraction to prepare for later optimization, providing needed reassurance that optimization can be done later.

  • Take advantage of editor tools to avoid source code that is hard to read.

To cure Premature Optimization and perform proper optimizations when they are called for:

  • Do not be afraid to remove optimizations by refactoring to improve readability and maintainability.

  • Profile often when optimizing.

  • Test often when optimizing and refactoring.



 < 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