Conclusion This chapter has introduced you to test-driven development, which is without a doubt one of the most important practices of XP. These tests underpin many of the practices in XP, such as refactoring, short releases, continuous integration, pair programming, and collective ownership.The tests were intended to increase your confidence in the code you are writing. If you follow the test-driven development methodology and are a member of a team of developers who are all writing tests, you will have more confidence in their code, and they will have more confidence in your code. The outcome of this is that you can now move forward more quickly and tackle problems more aggressively.You should now see the reason this practice is called test-driven development. The tests are driving the development process. By writing the tests first, you should find your focus on the code you are writing changes substantially. Your goal now is to define how the class will be used with a test method and then to get the tests to pass. You will learn about more testing techniques later in the book.This chapter simplified the code in several places. The next chapter explores the practice of refactoring. Refactoring provides techniques for simplifying code. Gladwell, Malcolm. The Tipping Point. Boston, Massachusetts: Back Bay Books, 2002. "Turning the volume up" means taking something that works well and making it work even better. Copy and paste is often referred to as editor inheritance by parts of the developer community. A code smell is a term used in XP to define code that has something amiss. XP teams will call code smelly when it can be improved. |