What is the Refactoring?
Code refactoring is the process of restructuring existing computer code (…) without changing its external behavior. Refactoring improves nonfunctional attributes of the software.
Is it complicated? Okay. Here’s the simple version:
Refactoring makes existing code better to work with – easier to read, debug, maintain and extend with new features.
Types of Refactoring
>User Interface Refactoring
Code Smell is any symptom in the source code of a program that possibly indicates a deeper problem. Common symptoms which lead to refactoring are duplicate codes, longer methods/functions, too many parameters, non-intuitive variable names, code placement etc. These problems leads to poor readability, longer debugging time and difficult to maintain in the long term.
Refactoring benefits your software to:
- Makes code more readable.
- Cleanup code and makes it tidier.
- Removes redundant, unused code and comments.
- Improves performance.
- Keeps code DRY ( Don’t Repeat Yourself)
- Create re-usable code.
- Better class and function cohesion.