SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
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

Más contenido relacionado

Destacado (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 a Refactoring workshop (Campus Party Quito 2014)

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

Similar a 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
 

Más de 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
 

Más de 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
 

Último

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

Último (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
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...
 
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
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
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
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Refactoring workshop (Campus Party Quito 2014)