Almost every expert in Object-Oriented Development stresses the importance of iterative development. As you proceed with the iterative development, you need to add function to the existing code base.
If you are really lucky that code base is structured just right to support the new function while still preserving its design integrity. Of course most of the time we are not lucky, the code does not quite fit what we want to do. You could just add the function on top of the code base. But soon this leads to applying patch upon patch making your system more complex than it needs to be.
This complexity leads to bugs, and cripples your productivity. Refactoring is all about how you can avoid these problems by modifying your code in a controlled manner.
Done well you can make far reaching changes to an existing system quickly, and without introducing new bugs. You can even take a procedural body of code and refactor it into an effective object-oriented design. With refactoring as part of your development process you can keep your design clean, make it hard for bugs to breed and keeping your productivity high.
In this tutorial I\'ll show you an example of how a lump of poorly designed code can be put into good shape. In the process we\'ll see how refactoring works, demonstrate a handful of example refactorings, and discuss the key things you need to do to succeed.'