Introduction
avijeetd@yahoo.com and satyabrata_dash@yahoo.com
No process makes up for lack of talent and skill.
If you have wondered whether Extreme Programming is just another process, whether Extreme Programming is a panacea to process diseases, or what will happen to SEI CMM and RUP (Rational Unified Processes), once everybody goes extreme, then read on and find out why Extreme Programming is making waves in the developer world.
Extreme Programming (or XP) is a set of values, principles and practices for rapidly developing high-quality working software that provides the highest return on investment for the customer in the fastest way possible. XP is extreme in the sense that it takes 12 well-known software development "best practices" to their logical extremes. The key focus in XP is Customer Satisfaction and making frequent releases of working software satisfies the customer.
Traditional Processes and XP
1. Waterfall model
The Waterfall Model consists of the following steps:
- Requirement. Requirement of business functionality, expectation from system, non-functional requirements like performance requirement.
- Analysis. Determine how these requirements will be accommodated in the system. Extensive communication between the customer and the developer is essential.
- Design. Identify in detail how the system should be constructed to perform necessary tasks. System Design phase is focused on the data requirements, the software construction, and the interface construction.
- Coding. Application is developed using specific programming languages in this phase. Developers are handed out the design specification document and developers are held responsible for building the system.
- Testing. Testing is performed to ensure that system is working correctly and efficiently. Testing is generally focused on two areas: system testing and integration testing. Once these testing cycles are completed, the end user performs user acceptance testing (UAT) and accepts the system.
2. RUP (Rational Unified Process)
The major drawback with waterfall model is the visibility into project progression. Customers cannot see the application working until the entire application is completely built, tested and delivered. The time to market can be fairly high in complex projects and in dynamic business environment; the project may loose potential market opportunities.
RUP solves these problems to a far extent by introducing iterative development model. A project is divided into number of logical iterations and a project is delivered number of times to the customer and not just once, so that customer can play a valuable role in providing feedback and assessing the progress.
RUP divides the life cycle of a project into four phases.
Â
Â
Â
Â
Why another process?
If you have adopted Waterfall model, RUP (Rational Unified Process), CMM (Capability Maturity Model) and still see one of these problems, then it is indicative that your process is broken.
When it comes to delivering the software, you tell your customer that you have to postpone the date because of unavoidable reasons.
If your customer asks for a change, you become horrified, because, you think the change will break your design, make your system unstable and you might risk introducing too many risks.
Customer finds lot of defects even after system was deployed to production. You do a bug fix and customer reports two new bugs.
Team members put lots of long hours to finish the project, yet, the project doesn't get over, customers have too many complaints and therefore, team members are unhappy about everything they do.
Customer is unhappy about project slips, bad performance of the system and customer feels the system was not implemented the way it was asked for.
Functionality is built, and delivered, but never used in production.
Extreme Programming is not just another process; it is about set of software development discipline that competes with high ceremonial processes to get a smiling customer and energetic developers.
The practices are nothing new to developers. Successful developers have practiced these disciplines for long period of time. XP collates all those best practices and instills discipline and tries to get highest return on investment for the customers.
So let's find out what XP can do for everyone. Before we read on XP practices, believe in the Agile Software development manifesto.
The agile software development manifesto reads:
Â
Extreme Programming (XP)
XP believes in the philosophy that "Change is the only constant". So XP always embraces changes instead of trying to resist the change. The XP practices make this happen more easily by focusing on test driven development and refactoring.
12 XP practices
XP has set of simple rules and practices. These rules are applicable to different stages of software development like Planning, Designing, Coding and Testing.
Let's take an example and see how the 12 rules of XP are used in various stages.
Case Study:
Build an online trading portal site for iTrader inc., one of leading security brokers of the country. iTrader wants that the user should be able to login to the online system, view the stock price, and trade for a specific stock.
The application will be built on J2EE platform and deployed on Weblogic server. A team of 4 people is identified to build the solution.
Now we will explain the 12 golden rules of XP and analyze the XP way of doing things.
The 12 fundamental rules of XP are:
Â
Development team decides that the release will be made to customer every Friday. So for each week, three days are allocated for development, one day is reserved for integration and testing, and then customer demo is given on Friday morning and then planning for next week is done on Friday evening.
XP doesn't mandate the duration of release cycle. The releases can be made every one, two or three weeks depending on team velocity and complexity of the project.
The team used lot of trading metaphors such as margin trading, limit trading etc.
There is no upfront time spent in design. Design is done only for the weekly iteration. The design is kept simple and yet, all fundamental objects oriented design principles are adhered. So there is no compromise made on the quality of design, yet, design is made simple enough so that everybody can understand and implementation can be done quicker.
Refactoring heavily depends on automated unit testing. The automated unit testing gives the developer the confidence to change code and yet ensure that no other functionality was broken during the change.
iTrader development team decides to use Eclipse IDE, so that they can also use the IDE's refactoring features.
This is one of the most controversial features of XP that teams find hard to accept. But, study shows that pair programming exponentially improves the productivity of the team members.
iTrader development team paired junior and senior team members so that juniors can learn quickly from senior members of the team and there would be constant code review.
Rotating team members across modules was done in this project. Team members like it, as they feel responsible for entire project.
iTrader team uses CruiseControl open source tool to set up continuous integration.
This is possible as team measures the velocity of the members each week. If the team fails to deliver on Friday, then the plan is adjusted so that high priority tasks can be completed on time.
Delivery manager works as the customer for the development team.
iTrader development team used various open source tools to ensure that static and dynamic coding standards are being followed in the team.
Conclusion
We will discuss more on each of XP rules, practices and values in the coming articles. We will also discuss the pros, cons of using XP in large team, distributed team, fixed cost projects. We will also explain test driven design, and development with examples.
XP is not a revolutionary approach; rather it is based on set of guidelines practiced successfully in many projects. XP makes it easier to adopt, where predictability is difficult. The customer and developers work as a team to build working software. The team responds to change than following a plan.
Reference
Extreme Programming Explained by Kent Beck
Planning Extreme Programming by Kent Beck, and Martin Fowler
Extreme Programming, a gentle introduction
Agile Manifesto
CruiseControl, continuous integration toolkit
Junit, Java Unit testing framework
Â
About Authors
The authors have 6 years of experience on enterprise application system architecture, design and development. The authors can be reached at avijeetd@yahoo.com and satyabrata_dash@yahoo.com respectively.