Join Jesse Freeman for an in-depth discussion in this video What is refactoring?, part of C# Refactoring Tips and Tricks.
- [Instructor] So what is refactoring? Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code, yet improves its internal structure. Refactoring is an important process throughout the development cycle. Some of the reasons why you'd want to refactor is that it allows you to clean up the underlying code so that it's easier to maintain. Refactoring also allows you to remove code that is deprecated or no longer needed. And finally, refactoring allows you to optimize the underlying code without breaking the existing API.
This third point is probably the most critical and important one. Whenever you're refactoring or cleaning up a code base, it's important to note that refactoring is not about adding new functionality, but instead, it focuses on cleaning up existing code. The goal of refactoring is to make sure that you don't break other systems while creating clean, reusable, and scalable code that will last you throughout the life of the project.
- Creating a baseline
- Removing unused code
- Refactoring in branches
- Using refactoring tools
- Optimizing code
- Creating clean code