From the course: Agile Software Development: Dealing with Legacy Code and Technical Debt

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Practice refactoring

Practice refactoring

- [Instructor] When you've inherited a project, you'll find yourself surrounded by things you want to change, designs that you feel could be implemented more concisely, algorithms which you feel could be more efficient, chunks of code which should be made more easier to understand. These are just some of the valid reasons that you might have for wanting to make changes to the project without actually changing its behavior, a practice that's more commonly referred to as refactoring. The most important thing to remember when refactoring is that the goal is to leave the behavior exactly the same as you found it. It can be very tempting to start making structure and design changes at the same time that you are introducing new behavior, but these two practices should not be mixed. Instead, either add the new behavior and then refactor or refactor and then add the new behavior. Do not attempt to do both at the same time because,…

Contents