Refactoring vs redesign
Refactoring is a recurrent part of day-to-day programming. It is a process where we simplify code in order to make the addition of new changes a smoother experience.
Serious flaws in a design, however, cannot be solved by merely refactoring. Design flaws require a redesign. Redesigns are costly and should be prevented by spending ample time designing the solution well in the first place.
Proactive design
It is a common misconception that there’s no room for planning or up-front design in agile development methods. That’s deranged.
Time must be allocated as needed to consider the design of the solutions being implemented. By the time we start coding we should have a good idea of what we’re doing and how it will fit into the existing code base.
Brainstorm ideas with your team. Draw sketches on paper. Create wire frames. Think things through before you start coding.
This doesn’t mean that we have to go back to doing waterfall-style-projects, what it does mean is that design has to be seriously considered throughout the project.