XP and Ant, Page 2
The Core Values in XP
The heart of XP is its four core values:
Communication is critical to the success of any XP project. That means effective communication between developers, and between the development team and the customer. XP expects that the customer, or a representative of the customer, should be co-located with the development team. This encourages and increases communication and is part of the just-in-time nature of XP. Formal communication occurs between the customer and developer during the Release Planning and Iteration Planning meetings.
Communication occurs between developers during pair-programming. It also occurs between customer and developer when a developer has a question and is able to get a timely response because she can just go talk face-to-face with the customer. Getting timely answers to questions increases the overall quality and success of the project. If a developer has to wait for a document, or a message to be returned, he will probably do one of two things: Either he will guess at the answer or go on to something of lower priority. Neither action is desirable. Although an e-mail dialogue can occur, face-to-face communication is better because it's easier to convey information and to judge how well the recipient understands it.
Simplicity is often harder to achieve than complexity. It requires a commitment to achieve simplicity. In XP, this means that we don't code things that we think we might need at some point down the road. Developers code what is needed to meet the current requirements. As a development team, we strive to maintain a simple design. It also means that we have a constant focus on refactoring to eliminate redundant code. If after a piece of code is developed, a simpler approach becomes apparent, rewrite the code. Because much of the cost of software is in the maintenance, doing this will actually save time and money in the long run. Also, you won't be afraid to change parts of the system or to refactor classes because of the emphasis on continuous testing in XP.
Another aspect of simplicity is in maintaining coding standards. If code is written in a consistent style, it's much easier for anyone to pick up a piece of code and understand it. Maintain standards for naming variables, methods, and classes. Be consistent in the use of capitalization, braces, and indentation. All of this adds to reducing the complexity and the associated cost of building and maintaining software.
Feedback is achieved in XP through frequent and thorough automated testing. Testing includes unit tests and acceptance tests. XP emphasizes the need to write your unit test for a class before you write the class. You then write the class to pass the unit test. By doing this, a team builds up a large suite of unit tests very rapidly. This practice will more than pay for itself as the project progresses, by preventing catastrophic mistakes that are costly to debug and fix. This also helps to maintain the focus on how a class will be used, and guides the developer into creating only what is needed.
Consider the importance of feedback. For example, no one would open a word processor, disconnect the monitor, and then type a document. The constant feedback provided by seeing the results of our actions on the monitor helps to reduce mistakes. It doesn't eliminate them entirely, but it does help prevent us from going too far off on some tangent. The feedback provided in XP by constantly running automated unit tests each time a build occurs will also help to reduce mistakes. Running automated tests frequently will also eliminate much of the pain normally experienced during the integration and testing cycles of most projects, because problems will be detected early.
There's another reason for testing frequently. When a developer is working on an area of code, that is what is foremost in her mind. The best time to test code is right after it's been written, while the developer remembers exactly what she was doing. If testing is postponed until a week or two after the code was written, and a developer has moved on to other areas, testing and bug fixes will be more difficult. There is a certain amount of ramp-up time to remember what was done and why. Using iterative cycles of unit testing and acceptance testing reduces this problem.
If you have never used XP before, using this methodology for the first time might seem a bit daunting. It does require courage to get started. Courage in XP means that the customer is not afraid to tear up a user story card if it doesn't fit, and to rewrite it. As a developer, have the courage to refactor code even though it's working, but is unwieldy. Don't hesitate to throw away unneeded code or to rewrite an algorithm because you now see a simpler way to do it.
Courage also means being willing to ask questions when you don't understand something. Talk to the customer when you need more information about a story. Don't fear the pair-programming aspect of XP when writing production code. This is all part of the courage required to implement XP.
XP developers are highly productive. First, they are implementing user stories that have the most business value, as determined by the customer. They are doing what is important first. They are not spending time on functionality that is of questionable value. In XP, there is less chance that something just implemented will be useless because it was done months in advance, and the requirements changed after it was implemented. Second, XP developers create high-quality code because they are continuously testing and refining their code. Far less time is spent chasing after bugs whose cause is obscure.
Page 2 of 6