Improving algorithms with refactoring
Chapter 2, The Software Engineering Life Cycle, covered the maintenance phase of the software engineering life cycle, where improvements in the code are made. During this phase, a software team may revisit code that could use some performance improvements or have better maintainability. This technique, known as refactoring, involves changes made to the code in a software program that don’t change its behavior. The maintenance phase of the software engineering life cycle includes fixing bugs that arise in the code, which is not the same as refactoring. Both techniques require code changes, but bugs are unexpected behavior in code that needs to be fixed, while refactoring changes the structure of the code. The code may work and look different after a refactor but will behave the same way.
Refactoring is a common practice in a software team, and there are various reasons for doing a refactor. As you have learned in this chapter, there are...