Related Illnesses

 < Day Day Up > 



Even in well meaning programmers who started out providing proper documentation, Docuphobia can occur after too much contact with poor documentation. One of the causes of poor documentation is lack of maintenance associated with the CAP Epidemic. As code is cut-and-pasted, programmers often forget to update the comments to match the new context. This results in incorrect documentation that can mislead other programmers and cause subtle errors to occur. Nevertheless, the solution is not to avoid the documentation, but to learn how to write and maintain it properly. Avoiding cut-and-paste when possible is one of the steps toward this goal.

A more direct relationship is shared between Docuphobia and i. Proper naming skills and conventions lead to self-documenting code. This reduces the need for comments and therefore reduces the duplication that must occur if a comment is needed to explain a poor name. Proper naming is an important step toward proper documentation and, as was the case with avoiding cut-and-paste, helps avoid poor documentation that can lead to Docuphobia.

Finally, we come to the illness that is the cause of so many other illnesses. Skipping documentation appears to save time, but this is only an illusion suffered from Myopia. The time spent fixing miscommunications and relearning the purpose of each piece of code will easily dwarf the minor savings of skipping documentation. Thus, the long-term savings is achieved by proper documentation.



 < 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