As was emphasized in the last chapter, nobody’s perfect, including software developers. In Chapter 13 we talked about different things to look for when you know there are errors in your code. Now we’re going to talk about how to find those errors. Of the three types of errors in your code, the compiler will find the syntax errors and the occasional semantic error. In some language environments, the run-time system will find others (to your users chagrin). The rest of the errors are found in two different ways - testing, and code reviews and inspections. In this chapter, we’ll discuss testing, when to do it, what it is, how to do it, what your tests should cover, and the limitations of testing. In the next chapter we’ll talk about code reviews and inspections.


Unit Testing Phone Contact Conditional Expression Instance Variable Code Coverage 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. Kernighan, B. W. and R. Pike. The Practice of Programming. (Boston, MA: Addison-Wesley, 1999.)Google Scholar
  2. Martin, R. C. Clean Code: A Handbook of Agile Software Craftsmanship. (Upper Saddle River, NJ: Prentice-Hall, 2009.)Google Scholar
  3. McConnell, S. Code Complete 2: A Practical Handbook of Software Construction. (Redmond, WA: Microsoft Press, 2004.)Google Scholar
  4. Newkirk, J. and R. C. Martin. Extreme Programming in Practice. (Boston, MA, Addison-Wesley, 2001.)Google Scholar

Copyright information

© John Dooley 2011

Authors and Affiliations

  • John Dooley

There are no affiliations available

Personalised recommendations