Software Engineering for Students A Programming Approach

Software Engineering for Students A Programming Approach Software Engineering for Students A Programming Approach

web.firat.edu.tr
from web.firat.edu.tr More from this publisher
21.08.2013 Views

26.3 Extreme programming 333 developed. Initially, of course, the tests fail, but as development proceeds they will be passed one by one, and eventually the implementation is complete. This approach is termed test-driven development. SELF-TEST QUESTION 26.1 Write an acceptance test for a boiling kettle. The client has a third role. In XP, development takes place incrementally. At any time, only a subset of use cases are selected for implementation. Because the use cases are small, it is possible to estimate with some confidence how long they will take. But usually it is not possible to implement all the use cases at once. It is the client who decides which are implemented next, and which are postponed until later. Usually, the client selects those use cases that meet the most immediate business need. At the outset of each phase of development (termed a release in XP), the project team (including the client) meet to decide what to do next. It is the client who decides what shall be undertaken next. The information available is: ■ the list of use cases, together with estimates of their development times ■ the number of developers available. Ideally a client would like everything done as soon as possible. But the client who is a member of an XP team knows that software cannot be delivered to an acceptable standard in less time than the estimate. SELF-TEST QUESTION 26.2 What roles does the client take in XP? XP values Extreme programming is based on four clearly articulated values: 1. communication 2. simplicity 3. feedback 4. courage. Maximizing communication between the members of the development team and between the clients and the team is clearly vital in any project. But instead of regarding communication as a problem, XP exploits it, both as a principle and in practice.

334 Chapter 26 ■ Agile methods and extreme programming Software that has a simple structure (and does the required job) is better than a complex structure. However, XP realizes that achieving simplicity is not easy. Feedback is about obtaining frequent reliable information about the state of the software as it is being developed, so that any problems can be accommodated. It also describes a relationship between the developers and the client in which the client is immediately aware of the consequences of their requests. Finally, the most surprising value is courage, which is not a concept that you expect to see in the context of software development. What it means is that the developers must have the courage to throw away code, or even re-design large parts of the architecture, if the need arises. This is dramatically different from the common approach, which attempts to patch up software when it demonstrates faults, minor or serious. Techniques Extreme programming uses a combination of 12 techniques (called, in the terminology of XP, practices). The 12 techniques are: 1. replan frequently – quickly determine the scope of the next release by resolving business priorities and technical estimates. As reality overtakes the plan, update the plan. 2. small releases – put a simple system into production quickly, and then release new versions on a very short cycle 3. metaphor – guide all development with a simple shared story of how the whole system works 4. maintain a simple design – the system should be designed as simply as possible at any given moment. Extra complexity is removed as soon as it is discovered. 5. testing – programmers continually write unit tests, which must run flawlessly for development to continue. Customers write tests demonstrating that features are finished. 6. refactoring – programmers restructure the system without changing its behavior to remove duplication, improve communication, simplify or add flexibility. 7. pair programming – all production code is written with two programmers at one machine. 8. collective ownership – anyone can change any code anywhere in the system at any time. 9. continuous integration – integrate and build the system many times a day, and every time a task is completed 10. avoid overwork – work no more than 40 hours a week as a rule. Never work overtime a second week in a row. 11. involve the client – include a real, live user on the team, available full-time to answer questions 12. coding standards – programmers write all code in accordance with rules, emphasizing communication through the code.

26.3 Extreme programming 333<br />

developed. Initially, of course, the tests fail, but as development proceeds they will be<br />

passed one by one, and eventually the implementation is complete. This approach is<br />

termed test-driven development.<br />

SELF-TEST QUESTION<br />

26.1 Write an acceptance test <strong>for</strong> a boiling kettle.<br />

The client has a third role. In XP, development takes place incrementally. At any<br />

time, only a subset of use cases are selected <strong>for</strong> implementation. Because the use cases<br />

are small, it is possible to estimate with some confidence how long they will take. But<br />

usually it is not possible to implement all the use cases at once. It is the client who<br />

decides which are implemented next, and which are postponed until later. Usually, the<br />

client selects those use cases that meet the most immediate business need.<br />

At the outset of each phase of development (termed a release in XP), the project<br />

team (including the client) meet to decide what to do next. It is the client who decides<br />

what shall be undertaken next. The in<strong>for</strong>mation available is:<br />

■ the list of use cases, together with estimates of their development times<br />

■ the number of developers available.<br />

Ideally a client would like everything done as soon as possible. But the client who is<br />

a member of an XP team knows that software cannot be delivered to an acceptable standard<br />

in less time than the estimate.<br />

SELF-TEST QUESTION<br />

26.2 What roles does the client take in XP?<br />

XP values<br />

Extreme programming is based on four clearly articulated values:<br />

1. communication<br />

2. simplicity<br />

3. feedback<br />

4. courage.<br />

Maximizing communication between the members of the development team and<br />

between the clients and the team is clearly vital in any project. But instead of regarding<br />

communication as a problem, XP exploits it, both as a principle and in practice.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!