SlideShare a Scribd company logo
1 of 15
Download to read offline
C a m p u s P a r t y 2 0 1 4
REFACTORING WORKSHOP
Carla Suárez @carlast22
María Gómez @mariascandella
!
REFACTORING
!
▫︎Method to change the code.
▫︎The internal structure of a module get
changed while the external one keeps
unaltered.
▫︎Used for cleaner and better structured
code.
2
SKILLS NEEDED FOR DEVELOPMENT
▫︎Use of good practices
(SOLID principle)
▫︎Work on a incremental
fashion
▫︎TDD (test driven
development)
▫︎Well designed test cases
▫︎Pair programming
3
SOLID
▫︎Single Responsibility Principle
▫︎Open/Closed Principle
▫︎Liskov Substitution Principle
▫︎Interface Segregation Principle
▫︎Dependency Inversion Principle
4
SOLID
▫︎Single Responsibility Principle
5
“A class or module should have one one reason to change”
SOLID
▫︎Open/Closed Principle
6
“Software entities should be open for extension, but close for
modification”
SOLID
▫︎Liskov Substitution Principle
7
“Objects in a program should be replaceable with instances of
their subtypes without altering the correctness of that
program”
SOLID
▫︎Interface Segregation Principle
8
“No client should be force to depend on method it does not
use”
SOLID
▫︎Dependency Inversion Principle
9
“Modules should depend upon abstractions, no upon
concretions.”
WORKING INCREMENTALLY
10
Initial
Planning
Planning
Requirements Analysis  &  Design
Implementation
Deployment
Testing
Evaluation
http://en.wikipedia.org/wiki/Iterative_and_incremental_development
UNIT TESTS
▫︎A way to test the
correctness of a piece of
code.
▫︎They ensure that a
module works correctly
in an independent way.
11
UNIT TEST EXAMPLE
12
TDD (TEST DRIVEN DEVELOPMENT)
13
RED
GREENREFACTOR
PAIR PROGRAMMING
▫︎Two developer working on the same code in the same
computer.
▫︎Benefits:
▫︎Higher quality.
▫︎More productivity
▫︎Less prone to errors
▫︎Ping-pong model
14
LET’S CODE!
▫︎http://tinyurl.com/cpq4TW
15

More Related Content

Viewers also liked (6)

Responsive Environments - MoodMixer Presentation
Responsive Environments - MoodMixer PresentationResponsive Environments - MoodMixer Presentation
Responsive Environments - MoodMixer Presentation
 
Splitting the Monolith
Splitting the MonolithSplitting the Monolith
Splitting the Monolith
 
Scio
ScioScio
Scio
 
Bringing iot data to life, IoT Israel 2014
Bringing iot data to life, IoT Israel 2014Bringing iot data to life, IoT Israel 2014
Bringing iot data to life, IoT Israel 2014
 
Scio
ScioScio
Scio
 
Molecular Sensor from SCIO
Molecular Sensor from SCIOMolecular Sensor from SCIO
Molecular Sensor from SCIO
 

Similar to Refactoring workshop (Campus Party Quito 2014)

OO design principle
OO design principleOO design principle
OO design principle
Li-Wei Cheng
 

Similar to Refactoring workshop (Campus Party Quito 2014) (20)

Becoming a better developer by using the SOLID design principles
Becoming a better developer by using the SOLID design principlesBecoming a better developer by using the SOLID design principles
Becoming a better developer by using the SOLID design principles
 
Clean code: SOLID
Clean code: SOLIDClean code: SOLID
Clean code: SOLID
 
Clean code: SOLID (iOS)
Clean code: SOLID (iOS)Clean code: SOLID (iOS)
Clean code: SOLID (iOS)
 
From Good to SOLID: How to become a better PHP developer
From Good to SOLID: How to become a better PHP developerFrom Good to SOLID: How to become a better PHP developer
From Good to SOLID: How to become a better PHP developer
 
Design patterns 101
Design patterns 101Design patterns 101
Design patterns 101
 
Solid principles
Solid principlesSolid principles
Solid principles
 
Soild principles
Soild principlesSoild principles
Soild principles
 
SOLID Principles
SOLID PrinciplesSOLID Principles
SOLID Principles
 
Oop principles
Oop principlesOop principles
Oop principles
 
SOLID Software Principles with C#
SOLID Software Principles with C#SOLID Software Principles with C#
SOLID Software Principles with C#
 
Evgeniy Khyst - why does software design matter and how to keep it in good shape
Evgeniy Khyst - why does software design matter and how to keep it in good shapeEvgeniy Khyst - why does software design matter and how to keep it in good shape
Evgeniy Khyst - why does software design matter and how to keep it in good shape
 
OO design principle
OO design principleOO design principle
OO design principle
 
Use Design Principle to Improve code quality
Use Design Principle to Improve code qualityUse Design Principle to Improve code quality
Use Design Principle to Improve code quality
 
The Open-Closed Principle - the Original Version and the Contemporary Version
The Open-Closed Principle - the Original Version and the Contemporary VersionThe Open-Closed Principle - the Original Version and the Contemporary Version
The Open-Closed Principle - the Original Version and the Contemporary Version
 
Design for Testability
Design for Testability Design for Testability
Design for Testability
 
From good to solid: How to become a better developer
From good to solid: How to become a better developerFrom good to solid: How to become a better developer
From good to solid: How to become a better developer
 
Software Design Principles (SOLID)
Software Design Principles (SOLID)Software Design Principles (SOLID)
Software Design Principles (SOLID)
 
The Solid Principles
The Solid PrinciplesThe Solid Principles
The Solid Principles
 
Apply SOLID Design principles to javascript code with immediate function invo...
Apply SOLID Design principles to javascript code with immediate function invo...Apply SOLID Design principles to javascript code with immediate function invo...
Apply SOLID Design principles to javascript code with immediate function invo...
 
Mvc
MvcMvc
Mvc
 

More from Maria Gomez

Project Management - Report
Project Management - ReportProject Management - Report
Project Management - Report
Maria Gomez
 
Principles of New Media - Essay
Principles of New Media - EssayPrinciples of New Media - Essay
Principles of New Media - Essay
Maria Gomez
 
Responsive Environments - Critical report
Responsive Environments - Critical reportResponsive Environments - Critical report
Responsive Environments - Critical report
Maria Gomez
 

More from Maria Gomez (14)

From Monolith to Observable Microservices using DDD
From Monolith to Observable Microservices using DDDFrom Monolith to Observable Microservices using DDD
From Monolith to Observable Microservices using DDD
 
CQRS and Event Sourcing: A DevOps perspective
CQRS and Event Sourcing: A DevOps perspectiveCQRS and Event Sourcing: A DevOps perspective
CQRS and Event Sourcing: A DevOps perspective
 
Splitting the monolith using Domain Driven Design
Splitting the monolith using Domain Driven Design Splitting the monolith using Domain Driven Design
Splitting the monolith using Domain Driven Design
 
Observable Microservices (O'Reilly SACon London 2018)
Observable Microservices (O'Reilly SACon London 2018)Observable Microservices (O'Reilly SACon London 2018)
Observable Microservices (O'Reilly SACon London 2018)
 
Effective team onboarding
Effective team onboardingEffective team onboarding
Effective team onboarding
 
Observable microservices (O'Reilly SACon NY 2018)
Observable microservices (O'Reilly SACon NY 2018)Observable microservices (O'Reilly SACon NY 2018)
Observable microservices (O'Reilly SACon NY 2018)
 
Security in agile teams
Security in agile teamsSecurity in agile teams
Security in agile teams
 
Security in agile teams
Security in agile teamsSecurity in agile teams
Security in agile teams
 
Project Management - Report
Project Management - ReportProject Management - Report
Project Management - Report
 
Principles of New Media - Essay
Principles of New Media - EssayPrinciples of New Media - Essay
Principles of New Media - Essay
 
Project Management - Risk management
Project Management - Risk managementProject Management - Risk management
Project Management - Risk management
 
Responsive Environments - Critical report
Responsive Environments - Critical reportResponsive Environments - Critical report
Responsive Environments - Critical report
 
New Media Management - Project plan
New Media Management - Project planNew Media Management - Project plan
New Media Management - Project plan
 
New Media Management - Report
New Media Management - ReportNew Media Management - Report
New Media Management - Report
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

Refactoring workshop (Campus Party Quito 2014)