Java Notes
Iterative/Incremental Development
There are many ways to divide the Software Development Life Cycle. I've choosen some common terms, but don't be surprised to see other terms. Here's a brief explanation of the what each means.
- Analysis - Also called requirements analysis. This is the process of figuring out what the customer wants or needs.
- Design - This is the process of deciding how to structure the program. For large projects this is often divided into two stages: architectural design and detailed design.
- Testing - This is the process of trying to detect errors in the program. For large programs this is typically divided into two parts: unit testing tests individual modules and integration testing sees if the total program works when all the modules are run together.
Waterfall technique -- traditional, but risky
![]() |
When you understand a problem and its solution very well,
it's possible write a program by following the steps at the left.
But problems are rarely understood as well at initially thought, and
this "waterfall" approach has turned out to be responsible for an
extraordinarily high number of software project failures.
There are several reasons for this.
|
Disadvantages compared to iterative method
- The cycle of getting rid of compilation errors can be unnecessarily long.
- The output may not be what you want, but when debugging an entire program, it's harder to identify the source of the error.
Advantages of waterfall devlopment
Although it is probably responsible for more failures than successes, not everything is bad about this approach.
- By writing the entire program first, you are become aware of problem areas, and take corrective action.
- If the problem is very well understood, this may be the most efficient solution. However, experience has shown that it is frequently inferior to iterative programming.
- It may simply suit your personality better. is this a good reason to use it?
Iterative and Incremental Development
![]() |
|
It's often hard for students to restrict themselves to small changes, and they write many, many lines of code. Or to think of it another way, many bugs. The more simultaneous bugs a program has, the harder it is to debug, so keep the number of new bugs to a minimum.
Making very small changes, compiling and testing means that you are much less likely to be faced with a long list of error messages with no idea how to find the problem. A single missing left brace can produce many error messages. If you've only entered a few lines of code before recompiling, you know the error is in those few lines of code and it's much easier to track it down.
Advantages of iterative development
- You always have a running version of the program, eg, if you run out of time, you can deliver the last iteration, which may not have all functionality, but it does something. This is usually worth more to your instructor than a program which doesn't compile or run.
- Errors are easier to find because they are most likely in that last little bit of code that you added.
- It's psychologically more satisfying to get positive feedback on your work, ie, a running program.
- Corrections early in development generally take less time than later in the development process.
A good technique for all programs is to develop them iteratively or incrementally. These are the common programming terms that mean to do them in little steps, where each you compile and run after making each small step.
This is the recommended technique for all programs, from very large to very small. It has several advantages over trying to write the program as one lump.
Disadvantages of iterative development
A disadvantage of iterative programming is that it tempts you to start coding before you have a clear idea of what you want to do. Think about the problem a little bit before you start. This design process becomes more important as programs become larger.