Monday, February 21, 2011

Extreme Programming Installed Ch 13-15


Summary

Chapter 13 - Unit Tests – This chapter is about the importance of having automated tests for everything. The best way to write tests is to do it at the beginning – test a little, code a little. After you have design a test that encompasses the entirety of the code you are testing you can release the tests and the code. As the code, the tests will become a permanent part of the system and they need to run at 100 percent all the time. This will ensure an easy incorporation of new code into the system by facilitating the catching of errors promptly. The chapter ends by summarizing the testing steps and answering some testing questions.

Chapter 14 – Test First, by Intention – In this chapter they go through an example in order to illustrate two main points. First, we should write new code only when we have a test that doesn’t work (test-first programming). Second, we should not think about how to do a thing, we should think about what we have to do (programming by intention.)

Chapter 15 – Releasing Changes – This chapter explains the process of releasing code to other programmers in your team. There is essentially three phases for the code in an XP project. First, the local phase, where you and your partner just started working. Second, the release candidate phase, where you have finished your task and are ready to release it. Third, the release to the repository phase, were the code is submitted and is guaranteed to work.  There are two common problems with releasing changes: slow mergers and lost changes. In order to avoid these problems, try to release your changes more frequently, and always back up your source code. 

Discussion 

As with a lot of other chapter in this book I think the material makes a lot of sense but is probably very hard to implement. Having tests for everything is an ideal goal, but a hard one to achieve, especially in a large project. I try to relate everything in this book to our specific senior design project and I have problems doing it especially because our team is super small (just a pair.) However, in general the chapters make a lot of sense and are simple to follow and understand.

No comments:

Post a Comment