what is refactoring of code

1 year ago 33
Nature

Code refactoring is the process of restructuring existing computer code without changing its external behavior. The goal of refactoring is to improve the design, structure, and implementation of software by making many small changes without altering the codes external behavior. Refactoring can be performed after a product has been deployed, before adding updates and new features to existing code, or as a part of day-to-day programming. Refactoring can help software developers find bugs or vulnerabilities hidden in their software by simplifying the underlying logic and eliminating unnecessary levels of complexity. Refactoring can also help developers better understand code and design decisions. The process of refactoring usually comprises applying a series of standardized, basic actions, sometimes known as micro-refactorings. These changes in existing source code preserve the software’s behavior and functionality because the changes are so tiny that they are unlikely to create or introduce any new errors. Refactoring can turn dirty code into clean code, which reduces a project’s overall technical debt. Code smells are indicators of problems that can be addressed during refactoring. Refactoring techniques describe actual refactoring steps.