SlideShare a Scribd company logo
1 of 5
Code Refactoring
SE- 02 Neha Ijaz
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.
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.
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.
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.

More Related Content

What's hot

4+1view architecture
4+1view architecture4+1view architecture
4+1view architecture
drewz lin
 
Design concepts and principles
Design concepts and principlesDesign concepts and principles
Design concepts and principles
saurabhshertukde
 

What's hot (16)

software engineering
software engineeringsoftware engineering
software engineering
 
Software Design 1: Coupling & cohesion
Software Design 1: Coupling & cohesionSoftware Design 1: Coupling & cohesion
Software Design 1: Coupling & cohesion
 
Hld lld
Hld lldHld lld
Hld lld
 
Ch09
Ch09Ch09
Ch09
 
4+1view architecture
4+1view architecture4+1view architecture
4+1view architecture
 
software design
software designsoftware design
software design
 
Program design data manipulation2
Program design data manipulation2Program design data manipulation2
Program design data manipulation2
 
unit 3 Design 1
unit 3 Design 1unit 3 Design 1
unit 3 Design 1
 
Hld and lld
Hld and lldHld and lld
Hld and lld
 
software engineering
software engineeringsoftware engineering
software engineering
 
A Comparative Study of Forward and Reverse Engineering
A Comparative Study of Forward and Reverse EngineeringA Comparative Study of Forward and Reverse Engineering
A Comparative Study of Forward and Reverse Engineering
 
Software design
Software designSoftware design
Software design
 
DDD
DDDDDD
DDD
 
Design concepts and principles
Design concepts and principlesDesign concepts and principles
Design concepts and principles
 
Arnab Kumar Chakraborty
Arnab Kumar ChakrabortyArnab Kumar Chakraborty
Arnab Kumar Chakraborty
 
Software Design and Modularity
Software Design and ModularitySoftware Design and Modularity
Software Design and Modularity
 

Similar to Code refactoring

Software engineering Questions and Answers
Software engineering Questions and AnswersSoftware engineering Questions and Answers
Software engineering Questions and Answers
Bala Ganesh
 
PROPERTIES OF A FEATURE IN CODE-ASSETS: AN EXPLORATORY STUDY
PROPERTIES OF A FEATURE IN CODE-ASSETS: AN EXPLORATORY STUDYPROPERTIES OF A FEATURE IN CODE-ASSETS: AN EXPLORATORY STUDY
PROPERTIES OF A FEATURE IN CODE-ASSETS: AN EXPLORATORY STUDY
ijseajournal
 
Coupling based structural metrics for measuring the quality of a software (sy...
Coupling based structural metrics for measuring the quality of a software (sy...Coupling based structural metrics for measuring the quality of a software (sy...
Coupling based structural metrics for measuring the quality of a software (sy...
Mumbai Academisc
 
Principlesinrefactoring 090906230021-phpapp01
Principlesinrefactoring 090906230021-phpapp01Principlesinrefactoring 090906230021-phpapp01
Principlesinrefactoring 090906230021-phpapp01
Sopheak Sem
 

Similar to Code refactoring (20)

A FRAMEWORK STUDIO FOR COMPONENT REUSABILITY
A FRAMEWORK STUDIO FOR COMPONENT REUSABILITYA FRAMEWORK STUDIO FOR COMPONENT REUSABILITY
A FRAMEWORK STUDIO FOR COMPONENT REUSABILITY
 
Introduction to Object Oriented Programming.pdf
Introduction to Object Oriented Programming.pdfIntroduction to Object Oriented Programming.pdf
Introduction to Object Oriented Programming.pdf
 
Code Refactoring in Software Development
Code Refactoring in Software DevelopmentCode Refactoring in Software Development
Code Refactoring in Software Development
 
Code Craftsmanship Checklist
Code Craftsmanship ChecklistCode Craftsmanship Checklist
Code Craftsmanship Checklist
 
Introduction to problem solving in C
Introduction to problem solving in CIntroduction to problem solving in C
Introduction to problem solving in C
 
2 Object Oriented Programming
2 Object Oriented Programming2 Object Oriented Programming
2 Object Oriented Programming
 
Diving into OOPs_ Key Concepts and Principles (1).pdf
Diving into OOPs_ Key Concepts and Principles (1).pdfDiving into OOPs_ Key Concepts and Principles (1).pdf
Diving into OOPs_ Key Concepts and Principles (1).pdf
 
Software engineering Questions and Answers
Software engineering Questions and AnswersSoftware engineering Questions and Answers
Software engineering Questions and Answers
 
Software_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptxSoftware_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptx
 
PROPERTIES OF A FEATURE IN CODE-ASSETS: AN EXPLORATORY STUDY
PROPERTIES OF A FEATURE IN CODE-ASSETS: AN EXPLORATORY STUDYPROPERTIES OF A FEATURE IN CODE-ASSETS: AN EXPLORATORY STUDY
PROPERTIES OF A FEATURE IN CODE-ASSETS: AN EXPLORATORY STUDY
 
Simple Obfuscation Tool for Software Protection
Simple Obfuscation Tool for Software ProtectionSimple Obfuscation Tool for Software Protection
Simple Obfuscation Tool for Software Protection
 
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
 
Coupling based structural metrics for measuring the quality of a software (sy...
Coupling based structural metrics for measuring the quality of a software (sy...Coupling based structural metrics for measuring the quality of a software (sy...
Coupling based structural metrics for measuring the quality of a software (sy...
 
Dependency Injection, Design Principles and Patterns
Dependency Injection, Design Principles and PatternsDependency Injection, Design Principles and Patterns
Dependency Injection, Design Principles and Patterns
 
OOP ppt.pdf
OOP ppt.pdfOOP ppt.pdf
OOP ppt.pdf
 
X-2E Modernize
X-2E ModernizeX-2E Modernize
X-2E Modernize
 
Lecture # 8 software design and architecture (SDA).ppt
Lecture # 8 software design and architecture (SDA).pptLecture # 8 software design and architecture (SDA).ppt
Lecture # 8 software design and architecture (SDA).ppt
 
Principlesinrefactoring 090906230021-phpapp01
Principlesinrefactoring 090906230021-phpapp01Principlesinrefactoring 090906230021-phpapp01
Principlesinrefactoring 090906230021-phpapp01
 
Fluent Interfaces
Fluent InterfacesFluent Interfaces
Fluent Interfaces
 
SWE-401 - 5. Software Design Basics
SWE-401 - 5. Software Design BasicsSWE-401 - 5. Software Design Basics
SWE-401 - 5. Software Design Basics
 

More from Noor Ul Hameed (10)

Pipelining Stages and Process
Pipelining Stages and ProcessPipelining Stages and Process
Pipelining Stages and Process
 
Ring topology
Ring topologyRing topology
Ring topology
 
Network topology
Network topologyNetwork topology
Network topology
 
Fetch in operating system
Fetch in operating systemFetch in operating system
Fetch in operating system
 
Issues in Pakistan
Issues in PakistanIssues in Pakistan
Issues in Pakistan
 
Digital logic design Multiplexer
Digital logic design MultiplexerDigital logic design Multiplexer
Digital logic design Multiplexer
 
Cinema booking system
Cinema booking systemCinema booking system
Cinema booking system
 
What is marketing research
What is marketing researchWhat is marketing research
What is marketing research
 
The Circle by Dave Eggers
The Circle by Dave EggersThe Circle by Dave Eggers
The Circle by Dave Eggers
 
Lean Agile Method
Lean Agile MethodLean Agile Method
Lean Agile Method
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 

Code refactoring

  • 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.