SlideShare a Scribd company logo
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Unleashing the Power of
Automated Refactoring with JDT
Law of Diversity
Distrust all claims of ONE true way!
Naresh Jain
@nashjain
http://nareshjain.com
naresh@agilefaqs.com
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Plan
What and Why... Refactor?
Automated Refactoring Demo 1 with JDT
When and How... Refactor?
Automated Refactoring Demo 2 with JDT
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
What is Refactoring?
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
What is Refactoring?
A series of small steps, each of which changes the
program’s internal structure without changing its
external behaviour - Martin Fowler
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
What if you hear...
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
What if you hear...
We’ll just refactor the code to support logging
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
What if you hear...
We’ll just refactor the code to support logging
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
What if you hear...
We’ll just refactor the code to support logging
Can you refactor the code so that it authenticates against LDAP instead
of Database?
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
What if you hear...
We’ll just refactor the code to support logging
Can you refactor the code so that it authenticates against LDAP instead
of Database?
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
What if you hear...
We’ll just refactor the code to support logging
Can you refactor the code so that it authenticates against LDAP instead
of Database?
We have too much duplicate code, we need to refactor the code to
eliminate duplication
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
What if you hear...
We’ll just refactor the code to support logging
Can you refactor the code so that it authenticates against LDAP instead
of Database?
We have too much duplicate code, we need to refactor the code to
eliminate duplication
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
What if you hear...
We’ll just refactor the code to support logging
Can you refactor the code so that it authenticates against LDAP instead
of Database?
We have too much duplicate code, we need to refactor the code to
eliminate duplication
This class is too big, we need to refactor it
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
What if you hear...
We’ll just refactor the code to support logging
Can you refactor the code so that it authenticates against LDAP instead
of Database?
We have too much duplicate code, we need to refactor the code to
eliminate duplication
This class is too big, we need to refactor it
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
What if you hear...
We’ll just refactor the code to support logging
Can you refactor the code so that it authenticates against LDAP instead
of Database?
We have too much duplicate code, we need to refactor the code to
eliminate duplication
This class is too big, we need to refactor it
In-Memory Object Caching?
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
What if you hear...
We’ll just refactor the code to support logging
Can you refactor the code so that it authenticates against LDAP instead
of Database?
We have too much duplicate code, we need to refactor the code to
eliminate duplication
This class is too big, we need to refactor it
In-Memory Object Caching?
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Origin
Ward Cunningham and Kent Beck
Smalltalk style
Ralph Johnson at University of Illinois at Urbana-
Champaign
Bill Opdyke’s Thesis
ftp://st.cs.uiuc.edu/pub/papers/refactoring/opdyke-
thesis.ps.Z
John Brant and Don Roberts:The Refactoring Browser
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Readability
Which code segment is easier to read?
Sample 1
if (date.Before(Summer_Start) || date.After(Summer_End)){
charge = quantity * winterRate + winterServiceCharge;
else
charge = quantity * summerRate;
}
Sample 2
if (IsSummer(date)) {
charge = SummerCharge(quantity);
else
charge = WinterCharge(quantity);
}
Commercial Break!
Copyright
© 2012,
Mumbai
Tech Talks!
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Automated Refactoring
Demo 1
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
How do we Refactor?
We looks for Code-Smells
Things that we suspect are not quite right or will cause us severe pain if
we do not fix
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
2 Piece of Advice before Refactoring
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
2 Piece of Advice before Refactoring
Baby Steps
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
2 Piece of Advice before Refactoring
Baby Steps
The Hippocratic Oath
First Do No Harm!
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Automated Refactoring
Demo 2
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Code Smells Lab
Long Method
Lazy class and
Speculative Generality Smell
Refused Bequest
Black Sheep
Duplicate Code
Switch Smell
Dead Code
Alternative Classes with different interface
Odd Ball solution
Primitive Obsession
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Why do we Refactor?
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Why do we Refactor?
Helps us deliver more business value faster
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Why do we Refactor?
Helps us deliver more business value faster
Improves the design of our software
Combat’s “bit rot”
Easier to maintain and understand
Easier to facilitate change
More flexibility
Increased re-usability
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Why do we Refactor?...
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Why do we Refactor?...
Minimizes technical debt
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Why do we Refactor?...
Minimizes technical debt
Keep development at speed
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Why do we Refactor?...
Minimizes technical debt
Keep development at speed
To make the software easier to understand
Write for people, not the compiler
Understand unfamiliar code
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Why do we Refactor?...
Minimizes technical debt
Keep development at speed
To make the software easier to understand
Write for people, not the compiler
Understand unfamiliar code
To help find bugs
refactor while debugging to clarify the code
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Why do we Refactor?...
Minimizes technical debt
Keep development at speed
To make the software easier to understand
Write for people, not the compiler
Understand unfamiliar code
To help find bugs
refactor while debugging to clarify the code
To “Fix broken windows” - Pragmatic Programmers
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
When should you refactor?
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
When should you refactor?
To add new functionality
refactor existing code until you understand it
refactor the design to make it simple to add
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
When should you refactor?
To add new functionality
refactor existing code until you understand it
refactor the design to make it simple to add
To find bugs
refactor to understand the code
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
When should you refactor?
To add new functionality
refactor existing code until you understand it
refactor the design to make it simple to add
To find bugs
refactor to understand the code
For code reviews
immediate effect of code review
allows for higher level suggestions
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
When should you refactor?
To add new functionality
refactor existing code until you understand it
refactor the design to make it simple to add
To find bugs
refactor to understand the code
For code reviews
immediate effect of code review
allows for higher level suggestions
Like championship
snooker players we are
setting ourselves up for
our next shot
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
The Two Hats
Adding Function
Add new capabilities to the system
Adds new tests
Get the test working
Refactoring
Does not add any new features
Does not add tests (but may change some)
Restructure the code to remove redundancy
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
The Two Hats
Adding Function
Add new capabilities to the system
Adds new tests
Get the test working
Refactoring
Does not add any new features
Does not add tests (but may change some)
Restructure the code to remove redundancy
Swap frequently between the hats, but only wear one at a time
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Refactoring and TDD
TDD Rhythm - Test, Code, Refactor
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Refactoring and TDD
TDD Rhythm - Test, Code, Refactor
Add a Test
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Refactoring and TDD
TDD Rhythm - Test, Code, Refactor
Add a Test
Run the Test
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Refactoring and TDD
TDD Rhythm - Test, Code, Refactor
Add a Test
Run the Test
Pass
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Refactoring and TDD
TDD Rhythm - Test, Code, Refactor
Add a Test
Run the Test
Fail
Pass
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Refactoring and TDD
TDD Rhythm - Test, Code, Refactor
Add a Test
Run the Test
Make a little change
Fail
Pass
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Refactoring and TDD
TDD Rhythm - Test, Code, Refactor
Add a Test
Run the Test
Make a little change
Run the Test
Fail
Pass
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Refactoring and TDD
TDD Rhythm - Test, Code, Refactor
Add a Test
Run the Test
Make a little change
Run the Test
Fail
Fail
Pass
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Refactoring and TDD
TDD Rhythm - Test, Code, Refactor
Add a Test
Run the Test
Make a little change
Run the Test
Fail
Pass
Fail
Pass
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Refactoring and TDD
TDD Rhythm - Test, Code, Refactor
Add a Test
Run the Test
Make a little change
Run the Test
Refactor
Fail
Pass
Fail
Pass
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Refactoring and TDD
TDD Rhythm - Test, Code, Refactor
Add a Test
Run the Test
Make a little change
Run the Test
Refactor
Fail
Pass
Fail
Pass
http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved.
Refactoring and TDD
TDD Rhythm - Test, Code, Refactor
Add a Test
Run the Test
Make a little change
Run the Test
Refactor
Fail
Pass
Fail
Pass
T H A N K Y O U !
Q U E S T I O N S ?
Naresh Jain
@nashjain
http://nareshjain.com

More Related Content

What's hot

Building an Automated Database Deployment Pipeline
Building an Automated Database Deployment PipelineBuilding an Automated Database Deployment Pipeline
Building an Automated Database Deployment Pipeline
Grant Fritchey
 
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
Simplilearn
 
Devops online training ppt
Devops online training pptDevops online training ppt
Devops online training ppt
KhalidQureshi31
 
Devconf - Moving 65000 Microsofties to DevOps with Visual Studio Team Services
Devconf - Moving 65000 Microsofties to DevOps with Visual Studio Team ServicesDevconf - Moving 65000 Microsofties to DevOps with Visual Studio Team Services
Devconf - Moving 65000 Microsofties to DevOps with Visual Studio Team Services
Willy-Peter Schaub
 
Dev ops tutorial for beginners what is devops & devops tools
Dev ops tutorial for beginners what is devops & devops toolsDev ops tutorial for beginners what is devops & devops tools
Dev ops tutorial for beginners what is devops & devops tools
JanBask Training
 
Continuous Delivery vs Continuous Deployment | DevOps Methodology | Devops Tr...
Continuous Delivery vs Continuous Deployment | DevOps Methodology | Devops Tr...Continuous Delivery vs Continuous Deployment | DevOps Methodology | Devops Tr...
Continuous Delivery vs Continuous Deployment | DevOps Methodology | Devops Tr...
Edureka!
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
Ahmed Adel
 
Continuous Integration for Oracle Database Development
Continuous Integration for Oracle Database DevelopmentContinuous Integration for Oracle Database Development
Continuous Integration for Oracle Database DevelopmentVladimir Bakhov
 
Automation CICD
Automation CICDAutomation CICD
Automation CICD
Lumban Sopian
 
Devops Intro - Devops for Unicorns & DevOps for Horses
Devops Intro - Devops for Unicorns & DevOps for HorsesDevops Intro - Devops for Unicorns & DevOps for Horses
Devops Intro - Devops for Unicorns & DevOps for Horses
BoonNam Goh
 
Continuous Delivery at Oracle Database Insights
Continuous Delivery at Oracle Database InsightsContinuous Delivery at Oracle Database Insights
Continuous Delivery at Oracle Database Insights
Michael Medin
 
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
Simplilearn
 
Devops Mindset Essentials
Devops Mindset EssentialsDevops Mindset Essentials
Devops Mindset Essentials
Willy-Peter Schaub
 
Top DevOps tools
Top DevOps toolsTop DevOps tools
Top DevOps tools
Metricoid Technology
 
A New Approach to DevOps Software Product Development Solution
A New Approach to DevOps Software Product Development SolutionA New Approach to DevOps Software Product Development Solution
A New Approach to DevOps Software Product Development Solution
Blazeclan Technologies Private Limited
 
DevOps in a nutshell
DevOps in a nutshellDevOps in a nutshell
DevOps in a nutshell
Dominique LAPERE
 
PuppetConf 2016: Successful Puppet Implementation in Large Organizations – Ja...
PuppetConf 2016: Successful Puppet Implementation in Large Organizations – Ja...PuppetConf 2016: Successful Puppet Implementation in Large Organizations – Ja...
PuppetConf 2016: Successful Puppet Implementation in Large Organizations – Ja...
Puppet
 
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
Simplilearn
 
Agile Maintenance
Agile MaintenanceAgile Maintenance
Agile Maintenance
Naresh Jain
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
Knoldus Inc.
 

What's hot (20)

Building an Automated Database Deployment Pipeline
Building an Automated Database Deployment PipelineBuilding an Automated Database Deployment Pipeline
Building an Automated Database Deployment Pipeline
 
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
 
Devops online training ppt
Devops online training pptDevops online training ppt
Devops online training ppt
 
Devconf - Moving 65000 Microsofties to DevOps with Visual Studio Team Services
Devconf - Moving 65000 Microsofties to DevOps with Visual Studio Team ServicesDevconf - Moving 65000 Microsofties to DevOps with Visual Studio Team Services
Devconf - Moving 65000 Microsofties to DevOps with Visual Studio Team Services
 
Dev ops tutorial for beginners what is devops & devops tools
Dev ops tutorial for beginners what is devops & devops toolsDev ops tutorial for beginners what is devops & devops tools
Dev ops tutorial for beginners what is devops & devops tools
 
Continuous Delivery vs Continuous Deployment | DevOps Methodology | Devops Tr...
Continuous Delivery vs Continuous Deployment | DevOps Methodology | Devops Tr...Continuous Delivery vs Continuous Deployment | DevOps Methodology | Devops Tr...
Continuous Delivery vs Continuous Deployment | DevOps Methodology | Devops Tr...
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
 
Continuous Integration for Oracle Database Development
Continuous Integration for Oracle Database DevelopmentContinuous Integration for Oracle Database Development
Continuous Integration for Oracle Database Development
 
Automation CICD
Automation CICDAutomation CICD
Automation CICD
 
Devops Intro - Devops for Unicorns & DevOps for Horses
Devops Intro - Devops for Unicorns & DevOps for HorsesDevops Intro - Devops for Unicorns & DevOps for Horses
Devops Intro - Devops for Unicorns & DevOps for Horses
 
Continuous Delivery at Oracle Database Insights
Continuous Delivery at Oracle Database InsightsContinuous Delivery at Oracle Database Insights
Continuous Delivery at Oracle Database Insights
 
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
 
Devops Mindset Essentials
Devops Mindset EssentialsDevops Mindset Essentials
Devops Mindset Essentials
 
Top DevOps tools
Top DevOps toolsTop DevOps tools
Top DevOps tools
 
A New Approach to DevOps Software Product Development Solution
A New Approach to DevOps Software Product Development SolutionA New Approach to DevOps Software Product Development Solution
A New Approach to DevOps Software Product Development Solution
 
DevOps in a nutshell
DevOps in a nutshellDevOps in a nutshell
DevOps in a nutshell
 
PuppetConf 2016: Successful Puppet Implementation in Large Organizations – Ja...
PuppetConf 2016: Successful Puppet Implementation in Large Organizations – Ja...PuppetConf 2016: Successful Puppet Implementation in Large Organizations – Ja...
PuppetConf 2016: Successful Puppet Implementation in Large Organizations – Ja...
 
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
 
Agile Maintenance
Agile MaintenanceAgile Maintenance
Agile Maintenance
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
 

Similar to Unleashing the Power of Automated Refactoring with JDT

System design for Web Application
System design for Web ApplicationSystem design for Web Application
System design for Web Application
Michael Choi
 
Mastering DevOps With Oracle
Mastering DevOps With OracleMastering DevOps With Oracle
Mastering DevOps With Oracle
Kelly Goetsch
 
WoMakersCode 2016 - Shit Happens
WoMakersCode 2016 -  Shit HappensWoMakersCode 2016 -  Shit Happens
WoMakersCode 2016 - Shit Happens
Jackson F. de A. Mafra
 
So You Just Inherited a $Legacy Application… NomadPHP July 2016
So You Just Inherited a $Legacy Application… NomadPHP July 2016So You Just Inherited a $Legacy Application… NomadPHP July 2016
So You Just Inherited a $Legacy Application… NomadPHP July 2016
Joe Ferguson
 
So You Just Inherited a $Legacy Application...
So You Just Inherited a $Legacy Application...So You Just Inherited a $Legacy Application...
So You Just Inherited a $Legacy Application...
Joe Ferguson
 
Agile Mumbai 2019 Conference | Intelligent DevOps enabling Enterprise Agilit...
Agile Mumbai 2019 Conference |  Intelligent DevOps enabling Enterprise Agilit...Agile Mumbai 2019 Conference |  Intelligent DevOps enabling Enterprise Agilit...
Agile Mumbai 2019 Conference | Intelligent DevOps enabling Enterprise Agilit...
AgileNetwork
 
Webinar-DevOps.pdf
Webinar-DevOps.pdfWebinar-DevOps.pdf
Webinar-DevOps.pdf
Amazon Web Services
 
DOES SFO 2016 - Scott Willson - Top 10 Ways to Fail at DevOps
DOES SFO 2016 - Scott Willson - Top 10 Ways to Fail at DevOpsDOES SFO 2016 - Scott Willson - Top 10 Ways to Fail at DevOps
DOES SFO 2016 - Scott Willson - Top 10 Ways to Fail at DevOps
Gene Kim
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
Lakshman Prasad
 
API Athens Meetup - API standards 25-6-2014
API Athens Meetup - API standards 25-6-2014API Athens Meetup - API standards 25-6-2014
API Athens Meetup - API standards 25-6-2014
openi_ict
 
API Athens Meetup - API standards 25-6-2014
API Athens Meetup - API standards   25-6-2014API Athens Meetup - API standards   25-6-2014
API Athens Meetup - API standards 25-6-2014Michael Petychakis
 
Open source-secret-sauce-rit-2010
Open source-secret-sauce-rit-2010Open source-secret-sauce-rit-2010
Open source-secret-sauce-rit-2010
Ted Husted
 
2017 03 25 Microsoft Hacks, How to code efficiently
2017 03 25 Microsoft Hacks, How to code efficiently2017 03 25 Microsoft Hacks, How to code efficiently
2017 03 25 Microsoft Hacks, How to code efficiently
Bruno Capuano
 
DevOps Culture at Amazon
DevOps Culture at AmazonDevOps Culture at Amazon
DevOps Culture at Amazon
Amazon Web Services
 
Advances in SAFe DevOps
Advances in SAFe DevOpsAdvances in SAFe DevOps
Life of a Code Change to a Tier 1 Service - AWS Online Tech Talks
Life of a Code Change to a Tier 1 Service - AWS Online Tech TalksLife of a Code Change to a Tier 1 Service - AWS Online Tech Talks
Life of a Code Change to a Tier 1 Service - AWS Online Tech Talks
Amazon Web Services
 
From Monolith to Microservices (And All the Bumps along the Way) (CON360-R1) ...
From Monolith to Microservices (And All the Bumps along the Way) (CON360-R1) ...From Monolith to Microservices (And All the Bumps along the Way) (CON360-R1) ...
From Monolith to Microservices (And All the Bumps along the Way) (CON360-R1) ...
Amazon Web Services
 
Rapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesRapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesKeith Fitzgerald
 
Test Masters 2016 Spring Conference
Test Masters 2016 Spring ConferenceTest Masters 2016 Spring Conference
Test Masters 2016 Spring Conference
Adam Sandman
 
Rapid software testing and conformance with static code analysis
Rapid software testing and conformance with static code analysisRapid software testing and conformance with static code analysis
Rapid software testing and conformance with static code analysis
Rogue Wave Software
 

Similar to Unleashing the Power of Automated Refactoring with JDT (20)

System design for Web Application
System design for Web ApplicationSystem design for Web Application
System design for Web Application
 
Mastering DevOps With Oracle
Mastering DevOps With OracleMastering DevOps With Oracle
Mastering DevOps With Oracle
 
WoMakersCode 2016 - Shit Happens
WoMakersCode 2016 -  Shit HappensWoMakersCode 2016 -  Shit Happens
WoMakersCode 2016 - Shit Happens
 
So You Just Inherited a $Legacy Application… NomadPHP July 2016
So You Just Inherited a $Legacy Application… NomadPHP July 2016So You Just Inherited a $Legacy Application… NomadPHP July 2016
So You Just Inherited a $Legacy Application… NomadPHP July 2016
 
So You Just Inherited a $Legacy Application...
So You Just Inherited a $Legacy Application...So You Just Inherited a $Legacy Application...
So You Just Inherited a $Legacy Application...
 
Agile Mumbai 2019 Conference | Intelligent DevOps enabling Enterprise Agilit...
Agile Mumbai 2019 Conference |  Intelligent DevOps enabling Enterprise Agilit...Agile Mumbai 2019 Conference |  Intelligent DevOps enabling Enterprise Agilit...
Agile Mumbai 2019 Conference | Intelligent DevOps enabling Enterprise Agilit...
 
Webinar-DevOps.pdf
Webinar-DevOps.pdfWebinar-DevOps.pdf
Webinar-DevOps.pdf
 
DOES SFO 2016 - Scott Willson - Top 10 Ways to Fail at DevOps
DOES SFO 2016 - Scott Willson - Top 10 Ways to Fail at DevOpsDOES SFO 2016 - Scott Willson - Top 10 Ways to Fail at DevOps
DOES SFO 2016 - Scott Willson - Top 10 Ways to Fail at DevOps
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
 
API Athens Meetup - API standards 25-6-2014
API Athens Meetup - API standards 25-6-2014API Athens Meetup - API standards 25-6-2014
API Athens Meetup - API standards 25-6-2014
 
API Athens Meetup - API standards 25-6-2014
API Athens Meetup - API standards   25-6-2014API Athens Meetup - API standards   25-6-2014
API Athens Meetup - API standards 25-6-2014
 
Open source-secret-sauce-rit-2010
Open source-secret-sauce-rit-2010Open source-secret-sauce-rit-2010
Open source-secret-sauce-rit-2010
 
2017 03 25 Microsoft Hacks, How to code efficiently
2017 03 25 Microsoft Hacks, How to code efficiently2017 03 25 Microsoft Hacks, How to code efficiently
2017 03 25 Microsoft Hacks, How to code efficiently
 
DevOps Culture at Amazon
DevOps Culture at AmazonDevOps Culture at Amazon
DevOps Culture at Amazon
 
Advances in SAFe DevOps
Advances in SAFe DevOpsAdvances in SAFe DevOps
Advances in SAFe DevOps
 
Life of a Code Change to a Tier 1 Service - AWS Online Tech Talks
Life of a Code Change to a Tier 1 Service - AWS Online Tech TalksLife of a Code Change to a Tier 1 Service - AWS Online Tech Talks
Life of a Code Change to a Tier 1 Service - AWS Online Tech Talks
 
From Monolith to Microservices (And All the Bumps along the Way) (CON360-R1) ...
From Monolith to Microservices (And All the Bumps along the Way) (CON360-R1) ...From Monolith to Microservices (And All the Bumps along the Way) (CON360-R1) ...
From Monolith to Microservices (And All the Bumps along the Way) (CON360-R1) ...
 
Rapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesRapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web Architectures
 
Test Masters 2016 Spring Conference
Test Masters 2016 Spring ConferenceTest Masters 2016 Spring Conference
Test Masters 2016 Spring Conference
 
Rapid software testing and conformance with static code analysis
Rapid software testing and conformance with static code analysisRapid software testing and conformance with static code analysis
Rapid software testing and conformance with static code analysis
 

More from Naresh Jain

Problem Solving Techniques For Evolutionary Design
Problem Solving Techniques For Evolutionary DesignProblem Solving Techniques For Evolutionary Design
Problem Solving Techniques For Evolutionary Design
Naresh Jain
 
Agile India 2019 Conference Welcome Note
Agile India 2019 Conference Welcome NoteAgile India 2019 Conference Welcome Note
Agile India 2019 Conference Welcome Note
Naresh Jain
 
Organizational Resilience
Organizational ResilienceOrganizational Resilience
Organizational Resilience
Naresh Jain
 
Improving the Quality of Incoming Code
Improving the Quality of Incoming CodeImproving the Quality of Incoming Code
Improving the Quality of Incoming Code
Naresh Jain
 
Agile India 2018 Conference Summary
Agile India 2018 Conference SummaryAgile India 2018 Conference Summary
Agile India 2018 Conference Summary
Naresh Jain
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
Naresh Jain
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
Naresh Jain
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
Naresh Jain
 
Pilgrim's Progress to the Promised Land by Robert Virding
Pilgrim's Progress to the Promised Land by Robert VirdingPilgrim's Progress to the Promised Land by Robert Virding
Pilgrim's Progress to the Promised Land by Robert Virding
Naresh Jain
 
Concurrent languages are Functional by Francesco Cesarini
Concurrent languages are Functional by Francesco CesariniConcurrent languages are Functional by Francesco Cesarini
Concurrent languages are Functional by Francesco Cesarini
Naresh Jain
 
Erlang from behing the trenches by Francesco Cesarini
Erlang from behing the trenches by Francesco CesariniErlang from behing the trenches by Francesco Cesarini
Erlang from behing the trenches by Francesco Cesarini
Naresh Jain
 
Anatomy of an eCommerce Search Engine by Mayur Datar
Anatomy of an eCommerce Search Engine by Mayur DatarAnatomy of an eCommerce Search Engine by Mayur Datar
Anatomy of an eCommerce Search Engine by Mayur Datar
Naresh Jain
 
Setting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile AppSetting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile App
Naresh Jain
 
Towards FutureOps: Stable, Repeatable environments from Dev to Prod
Towards FutureOps: Stable, Repeatable environments from Dev to ProdTowards FutureOps: Stable, Repeatable environments from Dev to Prod
Towards FutureOps: Stable, Repeatable environments from Dev to Prod
Naresh Jain
 
Value Driven Development by Dave Thomas
Value Driven Development by Dave Thomas Value Driven Development by Dave Thomas
Value Driven Development by Dave Thomas
Naresh Jain
 
No Silver Bullets in Functional Programming by Brian McKenna
No Silver Bullets in Functional Programming by Brian McKennaNo Silver Bullets in Functional Programming by Brian McKenna
No Silver Bullets in Functional Programming by Brian McKenna
Naresh Jain
 
Functional Programming Conference 2016
Functional Programming Conference 2016Functional Programming Conference 2016
Functional Programming Conference 2016
Naresh Jain
 
Agile India 2017 Conference
Agile India 2017 ConferenceAgile India 2017 Conference
Agile India 2017 Conference
Naresh Jain
 
Getting2Alpha: Turbo-charge your product with Game Thinking by Amy Jo Kim
Getting2Alpha: Turbo-charge your product with Game Thinking by Amy Jo KimGetting2Alpha: Turbo-charge your product with Game Thinking by Amy Jo Kim
Getting2Alpha: Turbo-charge your product with Game Thinking by Amy Jo Kim
Naresh Jain
 
MVP Design Hacks
MVP Design HacksMVP Design Hacks
MVP Design Hacks
Naresh Jain
 

More from Naresh Jain (20)

Problem Solving Techniques For Evolutionary Design
Problem Solving Techniques For Evolutionary DesignProblem Solving Techniques For Evolutionary Design
Problem Solving Techniques For Evolutionary Design
 
Agile India 2019 Conference Welcome Note
Agile India 2019 Conference Welcome NoteAgile India 2019 Conference Welcome Note
Agile India 2019 Conference Welcome Note
 
Organizational Resilience
Organizational ResilienceOrganizational Resilience
Organizational Resilience
 
Improving the Quality of Incoming Code
Improving the Quality of Incoming CodeImproving the Quality of Incoming Code
Improving the Quality of Incoming Code
 
Agile India 2018 Conference Summary
Agile India 2018 Conference SummaryAgile India 2018 Conference Summary
Agile India 2018 Conference Summary
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
 
Pilgrim's Progress to the Promised Land by Robert Virding
Pilgrim's Progress to the Promised Land by Robert VirdingPilgrim's Progress to the Promised Land by Robert Virding
Pilgrim's Progress to the Promised Land by Robert Virding
 
Concurrent languages are Functional by Francesco Cesarini
Concurrent languages are Functional by Francesco CesariniConcurrent languages are Functional by Francesco Cesarini
Concurrent languages are Functional by Francesco Cesarini
 
Erlang from behing the trenches by Francesco Cesarini
Erlang from behing the trenches by Francesco CesariniErlang from behing the trenches by Francesco Cesarini
Erlang from behing the trenches by Francesco Cesarini
 
Anatomy of an eCommerce Search Engine by Mayur Datar
Anatomy of an eCommerce Search Engine by Mayur DatarAnatomy of an eCommerce Search Engine by Mayur Datar
Anatomy of an eCommerce Search Engine by Mayur Datar
 
Setting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile AppSetting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile App
 
Towards FutureOps: Stable, Repeatable environments from Dev to Prod
Towards FutureOps: Stable, Repeatable environments from Dev to ProdTowards FutureOps: Stable, Repeatable environments from Dev to Prod
Towards FutureOps: Stable, Repeatable environments from Dev to Prod
 
Value Driven Development by Dave Thomas
Value Driven Development by Dave Thomas Value Driven Development by Dave Thomas
Value Driven Development by Dave Thomas
 
No Silver Bullets in Functional Programming by Brian McKenna
No Silver Bullets in Functional Programming by Brian McKennaNo Silver Bullets in Functional Programming by Brian McKenna
No Silver Bullets in Functional Programming by Brian McKenna
 
Functional Programming Conference 2016
Functional Programming Conference 2016Functional Programming Conference 2016
Functional Programming Conference 2016
 
Agile India 2017 Conference
Agile India 2017 ConferenceAgile India 2017 Conference
Agile India 2017 Conference
 
Getting2Alpha: Turbo-charge your product with Game Thinking by Amy Jo Kim
Getting2Alpha: Turbo-charge your product with Game Thinking by Amy Jo KimGetting2Alpha: Turbo-charge your product with Game Thinking by Amy Jo Kim
Getting2Alpha: Turbo-charge your product with Game Thinking by Amy Jo Kim
 
MVP Design Hacks
MVP Design HacksMVP Design Hacks
MVP Design Hacks
 

Recently uploaded

Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 

Recently uploaded (20)

Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 

Unleashing the Power of Automated Refactoring with JDT

  • 1. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Unleashing the Power of Automated Refactoring with JDT Law of Diversity Distrust all claims of ONE true way! Naresh Jain @nashjain http://nareshjain.com naresh@agilefaqs.com
  • 2. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Plan What and Why... Refactor? Automated Refactoring Demo 1 with JDT When and How... Refactor? Automated Refactoring Demo 2 with JDT
  • 3. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. What is Refactoring?
  • 4. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. What is Refactoring? A series of small steps, each of which changes the program’s internal structure without changing its external behaviour - Martin Fowler
  • 5. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. What if you hear...
  • 6. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. What if you hear... We’ll just refactor the code to support logging
  • 7. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. What if you hear... We’ll just refactor the code to support logging
  • 8. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. What if you hear... We’ll just refactor the code to support logging Can you refactor the code so that it authenticates against LDAP instead of Database?
  • 9. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. What if you hear... We’ll just refactor the code to support logging Can you refactor the code so that it authenticates against LDAP instead of Database?
  • 10. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. What if you hear... We’ll just refactor the code to support logging Can you refactor the code so that it authenticates against LDAP instead of Database? We have too much duplicate code, we need to refactor the code to eliminate duplication
  • 11. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. What if you hear... We’ll just refactor the code to support logging Can you refactor the code so that it authenticates against LDAP instead of Database? We have too much duplicate code, we need to refactor the code to eliminate duplication
  • 12. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. What if you hear... We’ll just refactor the code to support logging Can you refactor the code so that it authenticates against LDAP instead of Database? We have too much duplicate code, we need to refactor the code to eliminate duplication This class is too big, we need to refactor it
  • 13. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. What if you hear... We’ll just refactor the code to support logging Can you refactor the code so that it authenticates against LDAP instead of Database? We have too much duplicate code, we need to refactor the code to eliminate duplication This class is too big, we need to refactor it
  • 14. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. What if you hear... We’ll just refactor the code to support logging Can you refactor the code so that it authenticates against LDAP instead of Database? We have too much duplicate code, we need to refactor the code to eliminate duplication This class is too big, we need to refactor it In-Memory Object Caching?
  • 15. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. What if you hear... We’ll just refactor the code to support logging Can you refactor the code so that it authenticates against LDAP instead of Database? We have too much duplicate code, we need to refactor the code to eliminate duplication This class is too big, we need to refactor it In-Memory Object Caching?
  • 16. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Origin Ward Cunningham and Kent Beck Smalltalk style Ralph Johnson at University of Illinois at Urbana- Champaign Bill Opdyke’s Thesis ftp://st.cs.uiuc.edu/pub/papers/refactoring/opdyke- thesis.ps.Z John Brant and Don Roberts:The Refactoring Browser
  • 17. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Readability Which code segment is easier to read? Sample 1 if (date.Before(Summer_Start) || date.After(Summer_End)){ charge = quantity * winterRate + winterServiceCharge; else charge = quantity * summerRate; } Sample 2 if (IsSummer(date)) { charge = SummerCharge(quantity); else charge = WinterCharge(quantity); }
  • 21.
  • 22.
  • 23.
  • 25.
  • 26.
  • 27. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Automated Refactoring Demo 1
  • 28. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. How do we Refactor? We looks for Code-Smells Things that we suspect are not quite right or will cause us severe pain if we do not fix
  • 29. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. 2 Piece of Advice before Refactoring
  • 30. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. 2 Piece of Advice before Refactoring Baby Steps
  • 31. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. 2 Piece of Advice before Refactoring Baby Steps The Hippocratic Oath First Do No Harm!
  • 32. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Automated Refactoring Demo 2
  • 33.
  • 34. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Code Smells Lab Long Method Lazy class and Speculative Generality Smell Refused Bequest Black Sheep Duplicate Code Switch Smell Dead Code Alternative Classes with different interface Odd Ball solution Primitive Obsession
  • 35. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Why do we Refactor?
  • 36. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Why do we Refactor? Helps us deliver more business value faster
  • 37. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Why do we Refactor? Helps us deliver more business value faster Improves the design of our software Combat’s “bit rot” Easier to maintain and understand Easier to facilitate change More flexibility Increased re-usability
  • 38. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Why do we Refactor?...
  • 39. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Why do we Refactor?... Minimizes technical debt
  • 40. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Why do we Refactor?... Minimizes technical debt Keep development at speed
  • 41. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Why do we Refactor?... Minimizes technical debt Keep development at speed To make the software easier to understand Write for people, not the compiler Understand unfamiliar code
  • 42. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Why do we Refactor?... Minimizes technical debt Keep development at speed To make the software easier to understand Write for people, not the compiler Understand unfamiliar code To help find bugs refactor while debugging to clarify the code
  • 43. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Why do we Refactor?... Minimizes technical debt Keep development at speed To make the software easier to understand Write for people, not the compiler Understand unfamiliar code To help find bugs refactor while debugging to clarify the code To “Fix broken windows” - Pragmatic Programmers
  • 44. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. When should you refactor?
  • 45. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. When should you refactor? To add new functionality refactor existing code until you understand it refactor the design to make it simple to add
  • 46. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. When should you refactor? To add new functionality refactor existing code until you understand it refactor the design to make it simple to add To find bugs refactor to understand the code
  • 47. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. When should you refactor? To add new functionality refactor existing code until you understand it refactor the design to make it simple to add To find bugs refactor to understand the code For code reviews immediate effect of code review allows for higher level suggestions
  • 48. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. When should you refactor? To add new functionality refactor existing code until you understand it refactor the design to make it simple to add To find bugs refactor to understand the code For code reviews immediate effect of code review allows for higher level suggestions Like championship snooker players we are setting ourselves up for our next shot
  • 49. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. The Two Hats Adding Function Add new capabilities to the system Adds new tests Get the test working Refactoring Does not add any new features Does not add tests (but may change some) Restructure the code to remove redundancy
  • 50. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. The Two Hats Adding Function Add new capabilities to the system Adds new tests Get the test working Refactoring Does not add any new features Does not add tests (but may change some) Restructure the code to remove redundancy Swap frequently between the hats, but only wear one at a time
  • 51. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Refactoring and TDD TDD Rhythm - Test, Code, Refactor
  • 52. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Refactoring and TDD TDD Rhythm - Test, Code, Refactor Add a Test
  • 53. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Refactoring and TDD TDD Rhythm - Test, Code, Refactor Add a Test Run the Test
  • 54. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Refactoring and TDD TDD Rhythm - Test, Code, Refactor Add a Test Run the Test Pass
  • 55. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Refactoring and TDD TDD Rhythm - Test, Code, Refactor Add a Test Run the Test Fail Pass
  • 56. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Refactoring and TDD TDD Rhythm - Test, Code, Refactor Add a Test Run the Test Make a little change Fail Pass
  • 57. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Refactoring and TDD TDD Rhythm - Test, Code, Refactor Add a Test Run the Test Make a little change Run the Test Fail Pass
  • 58. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Refactoring and TDD TDD Rhythm - Test, Code, Refactor Add a Test Run the Test Make a little change Run the Test Fail Fail Pass
  • 59. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Refactoring and TDD TDD Rhythm - Test, Code, Refactor Add a Test Run the Test Make a little change Run the Test Fail Pass Fail Pass
  • 60. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Refactoring and TDD TDD Rhythm - Test, Code, Refactor Add a Test Run the Test Make a little change Run the Test Refactor Fail Pass Fail Pass
  • 61. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Refactoring and TDD TDD Rhythm - Test, Code, Refactor Add a Test Run the Test Make a little change Run the Test Refactor Fail Pass Fail Pass
  • 62. http://agilefaqs.com | Copyright © 2016, AgileFAQs. All Rights Reserved. Refactoring and TDD TDD Rhythm - Test, Code, Refactor Add a Test Run the Test Make a little change Run the Test Refactor Fail Pass Fail Pass
  • 63. T H A N K Y O U ! Q U E S T I O N S ? Naresh Jain @nashjain http://nareshjain.com