💻 Need training or mentoring on software engineering practices? Contact NimbleProsCheck it out »Hide

DevIQ

Refactoring

Refactoring

Refactoring can be used as a verb or a noun. As a verb, refactoring means to improve the design of a code without changing what it does. As a noun, it refers to an individual modification to a program that improves its design, without changing what the code does.

Refactoring is often compared to editing a written document. The goal of editing is not to change the overall intent of the written material, but to improve it. Likewise, refactoring code should improve the code's clarity, its simplicity, and its maintainability, but it shouldn't change its purpose or even its behavior. Thus, refactoring should ideally be performed when code is covered by a suite of automated tests, so that after the refactoring process is complete, the tests can be run to ensure the code's behavior remains unchanged.

Refactoring is an important process that should be applied continually to software source code as the design and the context in which the software executes drift. Failure to refactor software to improve the fitness of its design results in technical debt, which negatively impacts productivity and often is a source of defects.

References

Edit this page on GitHub

On this page

Sponsored by NimblePros
Sponsored