Thursday, April 17, 2008

Waterfall is perfect (with some assumptions)

I took "Software development life cycle" course in my school long time ago. It was an interesting course as it was the only course that explained software development process from one level up compare to other programming courses. As a part of the course, I learnt about Waterfall process and different phases in waterfall process. At that time, I felt that Waterfall process is so simple and perfect. 

  1. We gather ALL requirements
  2. We design the ENTIRE system to attributes and behaviors level in classes
  3. We code those designs
  4. Test the system
  5. Ship or release it.
I felt waterfall is the way to go. It is amazing yet simple. It has less steps than making chicken soup.  Waterfall process can never fail, but there is a catch. Waterfall process has many assumptions and some of them are,
  • Requirements never change
  • Design is perfect
  • Coders can easily implement those designs
  • Defect fix will not have much impact in the design as it is perfect.
These assumptions can never be true. In waterfall process, we never consider these assumptions can be wrong. We do not consider them as risks. I think this is the biggest flaw in waterfall process.

Now lets look at some assumptions made for agile process.
  • Requirements will change
  • Design will evolve and change as we gather more knowledge
As you can see assumptions made in Waterfall process and Agile is totally different. It is these assumptions that make such a difference between agile and waterfall. It is not the phases. In both agile and waterfall we will have requirement , design , coding and testing phase. 
In agile because of its assumptions, these phases are done quite differently from waterfall process. 

Requirement Analysis:
In agile we embrace change and expect requirements to change unlike Waterfall process. So expecting change in requirements, we do not do too much analysis. We do analysis only when it is needed. The advantage is as you wait till the last moment, you can use new knowledge that you have gathered about the system. 

Design and Coding:
In agile, design and coding phase happens in quick sessions that it looks like a single phase. As developers expect the requirements and designs to change they make sure they have good test coverage as a safety net. As they have good test coverage, they are not afraid to change their design or code. They do not spend too much time designing for future (which will be different anyway). They get things done with the information they have at that time.

Testing:
Defects found at this stage would not have much impact in the system as all other phases are expecting things to change. So there is no surprise. 

Workflow:
As analysis is done only when needed, there is less features for developers to design and code. As  only few features are implemented, there is less features for testers to test. So all these phases are done in a very fast rate. Mostly within a week or two. They keep doing them again and again till the customer is satisfied.

As you can see, some simple assumptions can change the whole software development process. So more than anything else, your assumptions will determine whether you project will be waterfally or agilely.

No comments: