A-Z Popular Blog Coding Search »
Coding
 Advertisements
Related Guides

What is Code Refactoring?

 , updated on January 27, 2017
Code refactoring is the process of improving the structural design of code without changing its functionality. It is typically done to improve the stability and quality of code. Code refactoring can potentially repair undiscovered bugs and improve the speed of future development by making code structurally sound and comprehensible.

Example

A bank system has been operational for 10 years and has been updated by hundreds of developers over that time period. The code is duplicative with several variations in structural design for similar products. Some of its classes have a large number of instance variables and methods. Methods are often long and exhibit an adhoc structure that is difficult to understand. In recent years, it has become more common for changes to have unintended side effects that have caused regression tests to fail and production issues to occur.
The lead developer approaches management and proposes a code refactoring as a way to reduce risk and improve the turnaround time for change requests. She restructures the code to reduce duplication and to make classes and methods a reasonable size. She also structures the code with the aim of making it easier to add and update products as this is the most common type of change to the system. A simple product can now be added to the system with a few lines of code.
Overview: Code Refactoring
TypeSoftware Design
Coding
DefinitionThe process of improving the design of code without changing its functionality.
Related ConceptsSeparation of Concerns
Software Design
Code Smell
Coding Principles

Software Design

This is the complete list of articles we have written about software design.
Bootstrapping
Bulkhead
Code Refactoring
Complexity Hiding
Design Abstraction
Design For Scale
Future-Proofing
Microservices
Modular Design
Overengineering
Push Technology
Service Architecture
Soft Computing
Software Architecture
Software Components
Systems Analysis
Systems Design
More ...
If you enjoyed this page, please consider bookmarking Simplicable.
 

Software Design

A list of software design terms.

Separation Of Concerns

A definition of separation of concerns.

Backward vs Forward Compatibility

The difference between backward and forward compatibility.

Push Technology

A definition of push technology with examples.

Systems Design

The common elements of a systems design.

Software Design vs Software Architecture

The difference between software design and software architecture explained.

Software Bloat

The common types of software bloat.

Future-Proofing

A definition of future-proofing with examples.

Systems Analysis

The common types of systems analysis.

Bit Rot

The basic types of bit rot.

Coding

A list of coding considerations and techniques.

Emergence vs Big Design Up Front

The difference between emergence and big-design-up-front.

Deep Magic

An overview of deep magic, a technology term.

Principle Of Least Astonishment

An overview of the Principle Of Least Astonishment.

Pull vs Push

The difference between pull and push technology.

Binary vs Hexadecimal

A comparison of binary and hexadecimal.

End-User Computing

An overview of end-user computing.

Library vs API

The difference between a library and API explained.

Code Reuse

The common types of code reuse.

Code Freeze

The common types of code freeze.
The most popular articles on Simplicable in the past day.

New Articles

Recent posts or updates on Simplicable.
Site Map