SlideShare une entreprise Scribd logo
1  sur  8
Refactoring Workshop
Consider a Simple Switch ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Consider a More Complex Switch ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Switch Replaced with Polymorphism ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Is This a Problem? ,[object Object],[object Object]
What about this? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Do You See the Difference? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Complex Conditional

Contenu connexe

Similaire à Refactoring workshop

Bad test, good test
Bad test, good testBad test, good test
Bad test, good testSeb Rose
 
Are statecharts the next big UI paradigm?
Are statecharts the next big UI paradigm? Are statecharts the next big UI paradigm?
Are statecharts the next big UI paradigm? Luca Matteis
 
Wix Automation - Test State Pattern - 11.9.16
Wix Automation - Test State Pattern - 11.9.16Wix Automation - Test State Pattern - 11.9.16
Wix Automation - Test State Pattern - 11.9.16Efrat Attas
 
From typing the test to testing the type
From typing the test to testing the typeFrom typing the test to testing the type
From typing the test to testing the typeWim Godden
 
Railway Oriented Programming
Railway Oriented ProgrammingRailway Oriented Programming
Railway Oriented ProgrammingScott Wlaschin
 
11-ScriptsAndConditionals.ppt
11-ScriptsAndConditionals.ppt11-ScriptsAndConditionals.ppt
11-ScriptsAndConditionals.pptAnjali127411
 
Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Aaron Gustafson
 
Using of TDD practices for Magento
Using of TDD practices for MagentoUsing of TDD practices for Magento
Using of TDD practices for MagentoIvan Chepurnyi
 
Arduino section programming slides
Arduino section programming slidesArduino section programming slides
Arduino section programming slidesvivek k
 
Immutability
ImmutabilityImmutability
Immutabilitybyanjati
 
Php Chapter 1 Training
Php Chapter 1 TrainingPhp Chapter 1 Training
Php Chapter 1 TrainingChris Chubb
 

Similaire à Refactoring workshop (17)

M C6java5
M C6java5M C6java5
M C6java5
 
Bad test, good test
Bad test, good testBad test, good test
Bad test, good test
 
Are statecharts the next big UI paradigm?
Are statecharts the next big UI paradigm? Are statecharts the next big UI paradigm?
Are statecharts the next big UI paradigm?
 
SOLID Principles
SOLID PrinciplesSOLID Principles
SOLID Principles
 
Func up your code
Func up your codeFunc up your code
Func up your code
 
Wix Automation - Test State Pattern - 11.9.16
Wix Automation - Test State Pattern - 11.9.16Wix Automation - Test State Pattern - 11.9.16
Wix Automation - Test State Pattern - 11.9.16
 
Best practices unit testing
Best practices unit testing Best practices unit testing
Best practices unit testing
 
From typing the test to testing the type
From typing the test to testing the typeFrom typing the test to testing the type
From typing the test to testing the type
 
Controle de estado
Controle de estadoControle de estado
Controle de estado
 
Railway Oriented Programming
Railway Oriented ProgrammingRailway Oriented Programming
Railway Oriented Programming
 
11-ScriptsAndConditionals.ppt
11-ScriptsAndConditionals.ppt11-ScriptsAndConditionals.ppt
11-ScriptsAndConditionals.ppt
 
Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]
 
Using of TDD practices for Magento
Using of TDD practices for MagentoUsing of TDD practices for Magento
Using of TDD practices for Magento
 
Tdd.eng.ver
Tdd.eng.verTdd.eng.ver
Tdd.eng.ver
 
Arduino section programming slides
Arduino section programming slidesArduino section programming slides
Arduino section programming slides
 
Immutability
ImmutabilityImmutability
Immutability
 
Php Chapter 1 Training
Php Chapter 1 TrainingPhp Chapter 1 Training
Php Chapter 1 Training
 

Refactoring workshop