Key Points

 < Free Open Study > 

  • Production code should handle errors in a more sophisticated way than "garbage in, garbage out."

  • Defensive-programming techniques make errors easier to find, easier to fix, and less damaging to production code.

  • Assertions can help detect errors early, especially in large systems, high-reliability systems, and fast-changing code bases.

  • The decision about how to handle bad inputs is a key error-handling decision and a key high-level design decision.

  • Exceptions provide a means of handling errors that operates in a different dimension from the normal flow of the code. They are a valuable addition to the programmer's intellectual toolbox when used with care, and they should be weighed against other error-processing techniques.

  • Constraints that apply to the production system do not necessarily apply to the development version. You can use that to your advantage, adding code to the development version that helps to flush out errors quickly.

 < Free Open Study > 


Code Complete
Code Complete: A Practical Handbook of Software Construction, Second Edition
ISBN: 0735619670
EAN: 2147483647
Year: 2003
Pages: 334

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