refactoring, 2nd ed. a love story - jug saxony day 2020 · like the original, this edition explains...
TRANSCRIPT
![Page 1: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/1.jpg)
Refactoring, 2nd Ed.A love story
Michael Hunger
![Page 2: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/2.jpg)
Michael Hunger
Open Sourcerer
Neo4j
@mesirii
![Page 3: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/3.jpg)
It crashed at 940!
![Page 4: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/4.jpg)
I know what you're here for!
Covers By: dev.to/rly
![Page 5: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/5.jpg)
Which Refactoring do you like most?
Extract Method
Delete Unused Code
Ok, you won :)
![Page 6: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/6.jpg)
![Page 7: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/7.jpg)
List of SoundbitesStolen from the 1st Ed.
![Page 8: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/8.jpg)
Questions?!
1. Who has seen the Refactoring book?
2. Who has read it?
3. Who thought that it's just common sense?
4. Who refactors code on a daily basis?
5. Who mentors new developers?
![Page 9: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/9.jpg)
“Any fool can write code that a computer can understand. Good programmers write code that
humans can understand.”
M. Fowler (1999)
![Page 10: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/10.jpg)
![Page 11: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/11.jpg)
![Page 12: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/12.jpg)
My Refactoring Story
Started 18 years ago
![Page 13: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/13.jpg)
Martin Fowler
Foreword by Erich GammaContributions by Kent Beck,William Opdyke, Don Roberts
28. Juni 1999
![Page 14: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/14.jpg)
![Page 15: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/15.jpg)
"A must-read"
![Page 16: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/16.jpg)
I really liked that book too!
![Page 17: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/17.jpg)
As did others ...
… e.g. authors!
![Page 18: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/18.jpg)
![Page 19: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/19.jpg)
![Page 20: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/20.jpg)
![Page 21: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/21.jpg)
![Page 22: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/22.jpg)
My Student thesis atTU Dresden
![Page 23: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/23.jpg)
Student thesis atTU Dresden
""
bit.ly/refactoring-thesis
![Page 24: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/24.jpg)
![Page 25: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/25.jpg)
Refactoring Tools for Java
in 2000!
![Page 26: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/26.jpg)
![Page 27: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/27.jpg)
![Page 28: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/28.jpg)
![Page 29: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/29.jpg)
Fast Forward 18 years
![Page 30: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/30.jpg)
A nice surprise
![Page 31: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/31.jpg)
Michael,
I'm Martin Fowler's editor at Addison-Wesley. We are working on a revision of his Refactoring book. Martin suggested that I reach out to you about reviewing the manuscript. He was very impressed with feedback you've provided on other projects.
Thanks,
Greg
-- Gregory DoenchExecutive EditorPearson Technology Group
![Page 32: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/32.jpg)
Several Weeks and 435 Pages later
![Page 33: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/33.jpg)
28. November 2018
Latest Memo: Most people will be disappointed by the second edition
martinfowler.com/articles/refactoring-2nd-ed.html
![Page 34: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/34.jpg)
Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs refactoring; and how to actually do it successfully, no matter what language you use.
● Understand the process and general principles of refactoring● Quickly apply useful refactorings to make a program easier to
comprehend and change● Recognize “bad smells” in code that signal opportunities to refactor● Explore the refactorings, each with explanations, motivation, mechanics,
and simple examples● Build solid tests for your refactorings● Recognize tradeoffs and obstacles to refactoring
![Page 35: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/35.jpg)
Why a new book?
![Page 36: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/36.jpg)
Refactoring is as important as ever
Educate a new generation!
![Page 37: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/37.jpg)
What changed?
martinfowler.com/articles/refactoring-2nd-changes.html
![Page 38: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/38.jpg)
No one knows anymorewhat video rentals are!
![Page 39: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/39.jpg)
Javascript !?!?!
![Page 40: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/40.jpg)
Javascript !?!?!
![Page 41: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/41.jpg)
Book Structure (Basically the same)
1. Opening Narrative ExampleTheatre Invoicing
2. Principles3. Code Smells4. Testing5. Catalogue
a. most important ones firstb. other refactorings
6. Dropped tangential topics and big refactorings
![Page 42: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/42.jpg)
Refactoring Changes
"Split Temporary Variable" => "Split Variable"
"Extract Method" => "Extract Function"
Add Parameter, Remove Parameter, Rename Method
=> Change Function Declaration
![Page 43: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/43.jpg)
Extract Function
Inline Function
Extract Variable
Inline Variable
Rename Variable
Encapsulate Variable
Highlighted: Most important Refactorings
Migrate Function Declaration
Change Function Declaration
Introduce Parameter Object
Combine Functions into Class
Combine Functions into Transform
![Page 44: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/44.jpg)
![Page 45: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/45.jpg)
New Refactorings
All about Functions andPipelines
![Page 46: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/46.jpg)
Combine Functions into Class
Combine Functions into Transform
Move Statements into Function
Move Statements to Callers
Remove Dead Code
Rename Field
Rename Variable
Replace Command with Function
New Refactorings
Replace Derived Variable with Query
Replace Inline Code with Function Call
Replace Loop with Pipeline
Replace Query with Parameter
Replace Subclass with Delegate
Return Modified Value
Split Phase
![Page 47: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/47.jpg)
![Page 48: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/48.jpg)
![Page 49: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/49.jpg)
![Page 50: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/50.jpg)
![Page 51: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/51.jpg)
Web-BookAvailableon Safari
![Page 52: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/52.jpg)
My take on the new book
![Page 53: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/53.jpg)
Back to the essence
![Page 54: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/54.jpg)
Student thesis atTU Dresden
""
![Page 55: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/55.jpg)
Topics
1. What, When, How
2. Benefits
3. Costs / Issues
4. History
5. Catalogue
6. Tools
7. Example
![Page 56: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/56.jpg)
What?
![Page 57: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/57.jpg)
Refactoring (noun): a change made to the internal structure of software to make it
easier to understand and cheaper to modify
without changing the observable behavior of the software.
![Page 58: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/58.jpg)
Refactor (verb): to restructure software by applying a series of refactorings
without changing the observable behavior of the software.
![Page 59: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/59.jpg)
When?
![Page 60: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/60.jpg)
Code Smells!
If it stinks, change it- Grandma Beck
![Page 61: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/61.jpg)
Mysterious NameDuplicated CodeLong FunctionLong Parameter ListGlobal DataMutable DataDivergent ChangeShotgun SurgeryFeature EnvyData ClumpsPrimitive ObsessionRepeated Switches
Code SmellsLazy ElementSpeculative GeneralityTemporary FieldMessage ChainsMiddle ManInsider TradingLarge ClassAlternative Classes with Different InterfacesData ClassRefused BequestCommentsLoops
![Page 62: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/62.jpg)
Adding features is hard?
![Page 63: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/63.jpg)
WorkingEffectivelywithLegacyCode
Michael Feathers
![Page 64: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/64.jpg)
Full of complexity and bugs
![Page 65: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/65.jpg)
Code as a Crime Scene
Software DesignX-Rays
Adam Tornhill
![Page 66: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/66.jpg)
Code is not habitable
![Page 67: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/67.jpg)
TimelessWay ofBuilding
Christopher Alexander
![Page 68: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/68.jpg)
How?
![Page 69: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/69.jpg)
Refactoring is as much about safety
testing, small steps, commit
as it is about code changes.
![Page 70: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/70.jpg)
Refactoring changes the programs in small steps. If you make a mistake, it is
easy to find the bug.
![Page 71: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/71.jpg)
Two Hats
![Page 72: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/72.jpg)
martinfowler.com/articles/preparatory-refactoring-example.html
![Page 73: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/73.jpg)
![Page 74: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/74.jpg)
Add Function
blog.gdinwiddie.com/2012/12/26/tdd-hat/
1. Red
2. Green
3. Refactor
![Page 75: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/75.jpg)
1. Refactor
2. Green
3. Commit
Refactor
![Page 76: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/76.jpg)
Before you start refactoring, check that you have a solid suite of tests. These
tests must be self-checking.
Martin Fowler
![Page 77: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/77.jpg)
Tests, are your safety net
Listen to the flight attendentthis one time
![Page 78: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/78.jpg)
Make sure all tests are fully automatic and that they check their own results.
Martin Fowler
![Page 79: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/79.jpg)
Fast Tests
![Page 80: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/80.jpg)
Test Ordering
R.I.P. JunitMax
![Page 81: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/81.jpg)
Many small commits
Can squash later
![Page 82: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/82.jpg)
Run your tests frequently. Localize tests whenever you compile - every test at
least every day.
Martin Fowler
![Page 83: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/83.jpg)
A suite of tests is a powerful bug detector
that decapitates the time it takes to find bugs.
Martin Fowler
![Page 84: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/84.jpg)
Unit tests are like the second pair of eyes of a pair programmer.
Kent Beck
![Page 85: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/85.jpg)
When you get a bug report, start by writing a unit test that exposes the bug.
Martin Fowler
![Page 86: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/86.jpg)
Think of the boundary conditions under which things might go wrong and
concentrate your tests there.
Martin Fowler
![Page 87: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/87.jpg)
Don’t forget to test that exceptions are raised when things are expected to go
wrong.
Martin Fowler
![Page 88: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/88.jpg)
Kinds of Refactoring
![Page 89: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/89.jpg)
Quick Fixes Refactoring Rewrite
![Page 90: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/90.jpg)
Continous Clean-Up
![Page 91: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/91.jpg)
Continous Clean-Up● Rename● Replace comment with function● Make intent clear● Intention in your IDE● Not about polishing
![Page 92: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/92.jpg)
DRY
Three strikes and you refactor.
![Page 93: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/93.jpg)
Boy Scout Rule
Leave it better than you found it
![Page 94: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/94.jpg)
Use >> Reuse
Reuse within your module not across.
![Page 95: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/95.jpg)
Planned Refactoring
![Page 96: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/96.jpg)
● Before adding a feature● Addressing technical debt● Improve testability (seams)● Improve understandability● For learning about a
new code-base
Planned Refactoring
![Page 97: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/97.jpg)
(BIG) Refactoring /Rewrite
![Page 98: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/98.jpg)
Sunken Cost Fallacy
![Page 99: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/99.jpg)
Deliberate Discovery
Dan North
![Page 100: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/100.jpg)
Benefits
![Page 101: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/101.jpg)
Forces you to test
![Page 102: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/102.jpg)
Don’t let the fear that testing can’t catch all bugs stop you from writing the tests
that will catch most bugs.
Martin Fowler
![Page 103: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/103.jpg)
It is better to write and run incomplete tests than not to run complete tests.
Martin Fowler
![Page 104: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/104.jpg)
Code Ownership
Modify your code ownership policies to smooth refactoring.
![Page 105: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/105.jpg)
Fights Code Rot and Decay
![Page 106: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/106.jpg)
Improves Understanding
![Page 107: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/107.jpg)
Costs
![Page 108: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/108.jpg)
APIs
Don’t publish interfaces prematurely. Downstream dependencies.
![Page 109: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/109.jpg)
Side Effects
e.g. Performance
![Page 110: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/110.jpg)
How do I tell my Boss?
![Page 111: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/111.jpg)
Time invested
![Page 112: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/112.jpg)
Refactoring & Design
![Page 113: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/113.jpg)
Refactoring & Design
![Page 114: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/114.jpg)
Refactoring Catalogue
![Page 115: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/115.jpg)
Refactoring Catalogue (my favorites)Move Function
Split Loop
Replace Loop with Pipeline (Stream)
Replace Magic Literal
Replace Derived Variable with Query
Replace Typecode with Subclass
Replace Superclass with Delegate
Replace Control Flag with Break (Return)
Introduce Special Case (Null Object)
Replace Nested Conditionals with Guad
Clauses
Extract Function
Extract Variable
Push Statements into Function
Push members up
Extract Interface / Superclass
Migrate Function Declaration
Combine Functions into Transform
Encapsulate Collection
Replace Temp with Query
Separate Query from Modifier
Parameterize Function
![Page 116: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/116.jpg)
![Page 117: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/117.jpg)
![Page 118: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/118.jpg)
![Page 119: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/119.jpg)
![Page 120: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/120.jpg)
![Page 121: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/121.jpg)
Tools
![Page 122: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/122.jpg)
Tools today make Refactoring a Joy
![Page 123: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/123.jpg)
Smart Understanding of code & intent
Useful suggestions
Intentions & Quick fixes
![Page 124: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/124.jpg)
Use and Learn the Shortcuts
Pragmatic Programmer
![Page 125: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/125.jpg)
Intentions & Quick Fixes
![Page 126: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/126.jpg)
IntelliJ & all Jetbrains IDEs
![Page 127: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/127.jpg)
HelpProductivityGuide
![Page 128: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/128.jpg)
What did youNOT use yet
![Page 129: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/129.jpg)
Eclipse
![Page 130: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/130.jpg)
EclipseLanguageServer
![Page 131: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/131.jpg)
Netbeans
![Page 132: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/132.jpg)
VS Code & Visual Studio
![Page 133: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/133.jpg)
![Page 134: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/134.jpg)
Refactoring & Patterns
![Page 135: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/135.jpg)
Refactoring & Patterns● patterns encapsulate good solutions in a context
● represent roles of components
● avoid code-smells
● they can be the goal of a design improvment
● refactorings are steps to those designs
![Page 136: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/136.jpg)
Resources
dzone.com/refcardz/refactoring-patterns refactoring.guru
martinfowler.com/tags/refactoring.html refactoring.com/catalog
![Page 137: Refactoring, 2nd Ed. A love story - JUG Saxony Day 2020 · Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs](https://reader033.vdocuments.net/reader033/viewer/2022053004/5f0818917e708231d42050a1/html5/thumbnails/137.jpg)
Ask your questions?
Thank you for your time!
Follow @mesirii