Easy to Learn Java: Programming Articles, Examples and Tips

Start with Java in a few days with Java Lessons or Lectures

Home

Code Examples

Java Tools

More Java Tools!

Java Forum

All Java Tips

Books

Submit News
Search the site here...
Search...
 
Search the JavaFAQ.nu
1000 Java Tips ebook

1000 Java Tips - Click here for the high resolution copy!1000 Java Tips - Click here for the high resolution copy!

Java Screensaver, take it here

Free "1000 Java Tips" eBook is here! It is huge collection of big and small Java programming articles and tips. Please take your copy here.

Take your copy of free "Java Technology Screensaver"!.

Iterative/Incremental Development -II

JavaFAQ Home » Java Notes by Fred Swartz Go to all tips in Java Notes by Fred Swartz


Bookmark and Share

Advantages of waterfall development

Not everything is bad about this approach.
  • By writing the entire program first, you are become aware of problem areas, and take corrective action.
  • It may simply suit your personality better.
  • 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.

Iterative and Incremental DevelopmentWaterfall steps

  • Start with a very small version of the program. So small that maybe it doesn't too much besides show some part of the graphical user interface, but doesn't do anything. Test it to make sure it runs ok.
  • Analysis. Decide which improvement should be made next. Make a small change.
  • Design how you will will code the change.
  • Code it and compile to make sure your coding is correct. Often I type only a couple of lines of code before recompiling. Some IDEs, such as NetBeans, does continuous compilation which shows your errors without the need for an explicit compilation request.
  • Testing. Run the program, using test data if necessary. If it doesn't run, the program must be debugged and either the coding or design should be changed. Because the last change should have been small, it's usually easy to identify the source of the problem.
  • Continue around this loop until the program is finished, or you've run out of resources (time). Using the iterative appoach means that there's a running program at the end of each iteration. It doesn't to everything, but it is something you can turn in. For a company this means that it may be able to use the program for some work and get value out of it before it is finished. It also means that the project can be terminated as soon as the program is "good enuf".

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 even compile yet.
  • It helps identify the source of the last error (compilation or execution), because you know it's in the code you just added in this iteration. This makes finding bugs much faster.
  • 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.

Disadvantages of iterative development

  • The iterative approach tempts you to start coding too early. You should have a good idea of what the final program should look like before starting. Unless you're clear on what you want, it's likely that many extra iterations will be required.

 Printer Friendly Page  Printer Friendly Page
 Send to a Friend  Send to a Friend

.. Bookmark and Share

Search here again if you need more info!
Custom Search



Home Code Examples Java Forum All Java Tips Books Submit News, Code... Search... Offshore Software Tech Doodling

RSS feed Java FAQ RSS feed Java FAQ News     

    RSS feed Java Forums RSS feed Java Forums

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest 1999-2006 by Java FAQs Daily Tips.

Interactive software released under GNU GPL, Code Credits, Privacy Policy