2. Code refactoring
Code refactoring is the process of restructuring existing
computer code—changing the factoring—without changing
its external behavior. Refactoring
improves nonfunctional attributes of the software.
Advantages include improved code readability and
reduced complexity; these can improve source-
code maintainability and create a more expressive
internal architecture or object model to improve extensibility.
3. List of refactoring techniques
Abstraction is one of the key concepts of object-oriented programming (OOP)
languages. Its main goal is to handle complexity by hiding unnecessary details from
the user.
Encapsulation is one of the fundamental concepts in object-oriented programming
(OOP). It describes the idea of bundling data and methods that work on that data
within one unit
Generalization, Generalization is the process of extracting shared characteristics
from two or more classes, and combining them into a generalized superclass.
Shared characteristics can be attributes, associations, or methods.
4. 2 benefits to the activity of refactoring
Maintainability. It is easier to fix bugs because the source code is easy to read and
the intent of its author is easy to grasp. It might be achieved by moving a method
to a more appropriate class, or by removing misleading comments.
Extensibility. It is easier to extend the capabilities of the application if it uses
recognizable design patterns, and it provides some flexibility where none before
may have existed.
5. Hardware refactoring
While the term refactoring originally referred
exclusively to refactoring of software code, in
recent years code written in hardware
description languages (HDLs) has also been
refactored.