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

What is Code Refactoring?

 , updated on
Code refactoring is the process of improving the structural design of code without changing its functionality. This 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
Type
Definition
The process of improving the design of code without changing its functionality.
Related Concepts

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
Overengineering
Push Technology
Service Architecture
Soft Computing
Software Architecture
Software Components
Systems Analysis
Systems Design
Worse Is Better
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