Related Illnesses

 < Day Day Up > 



One of the common excuses used to motivate hardcoding is optimization, but this really represents a manifestation of the Premature Optimization major illness. Even when optimization is a concern, which it should be only at the end of development after profiling carefully, most languages still offer several mechanisms for naming and sharing these values rather than placing them directly at the end location. Regardless, this is only the case in a few select instances. The rest of the time, concern should be given to development speed over optimization.

At this point, some programmers might claim that organizing and sharing the values takes time and therefore costs development speed. This is an unfortunate symptom of Myopia, which causes the programmer to only think in the short term. These hardcoded values will cost on average more time later in development; therefore, the long-term view supports removing the hardcoded values.



 < 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