SlideShare a Scribd company logo
@foessleitnerj
Refactoring
… with ADT
@foessleitnerjRefactoring with ADT
“The process of changing a software system in such a
way that it does not alter the external behaviour of the
code, yet improves its internal structure.”
What is Refactoring?
Martin Fowler, Refactoring 1999
https://www.refactoring.com
@foessleitnerjRefactoring with ADT
ISBN: 978-0201485677
Refactoring, by Martin Fowler
@foessleitnerjRefactoring with ADT
Test Development
Refactoring
• Add a Test  Make it work
 Make it clean
Refactoring & TDD
@foessleitnerjRefactoring with ADT
TDD Refactoring
Refactoring
?
Refactoring
?
Refactoring
Workflow of Refactoring
?
Refactoring
@foessleitnerjRefactoring with ADT
Workflow of Refactoring
Just bad code!Litter-Pickup
Refactoring
?
Refactoring
?
Refactoring
TDD Refactoring
Refactoring
@foessleitnerjRefactoring with ADT
Workflow of Refactoring
I don‘t
understand
Litter-Pickup
Refactoring
Comprehension
Refactoring
?
Refactoring
TDD Refactoring
Refactoring
@foessleitnerjRefactoring with ADT
Workflow of Refactoring
We should
have done it
this way
Litter-Pickup
Refactoring
Comprehension
Refactoring
Preparatory
Refactoring
TDD Refactoring
Refactoring
@foessleitnerjRefactoring with ADT
Code Smells „stinkt“ (© Robert C. Martin)
•Examples
• Duplicates
• Long methods
• Big classes
• Big case statements
• Bad names
• Misleading comments
• …
@foessleitnerjRefactoring with ADT
Example 1: Misleading comments
* get all fields of BUT000
SELECT PARTNER, NAME1 FROM BUT000 INTO …
* exit on error & FLAG <> ‘X‘
IF SY-SUBRC > 0 AND FLAG = ABAP_TRUE.
EXIT.
ENDIF.
@foessleitnerjRefactoring with ADT
Example 2: Method name
•What happens in the method
• LR_DATE->ADD( 5 )
•Better
• LR_DATE->ADDDAYSTO( 5 )
• LR_DATE->INCREASEBYDAYS( 5 )
@foessleitnerjRefactoring with ADT
https://www.refactoring.com
@foessleitnerjRefactoring with ADT
Code Quality
Clean Code
Profssionalism
Right Thing
Why Refactor?
@foessleitnerjRefactoring with ADT
Why Refactor?
Economy
@foessleitnerjRefactoring with ADT
“We are doing this, to be able to deliver more
functionality more quickly.”
Martin Fowler, a pionier of the agile software development
Why Refactor?
@foessleitnerjRefactoring with ADT
https://twitter.com/foessleitnerj
https://www.linkedin.com/in/johann-fößleitner-a9851b2a
https://www.xing.com/profile/johann_foessleitner
johann.foessleitner@cadaxo.com
Thank you!
https://twitter.com/domibiglsap
https://www.linkedin.com/in/dominik-bigl-9b98b68b
https://www.xing.com/profile/dominik_bigl
dominik.bigl@cadaxo.com

More Related Content

Similar to ABAP CodeRetreat 20.5.2017 Vienna - Refactoring

Refactoring
RefactoringRefactoring
Refactoring
Rabeya Bashri
 
The Power Of Refactoring (4developers Krakow)
The Power Of Refactoring (4developers Krakow)The Power Of Refactoring (4developers Krakow)
The Power Of Refactoring (4developers Krakow)
Stefan Koopmanschap
 
Ips jtoow full seo cms presentation
Ips jtoow full seo cms presentationIps jtoow full seo cms presentation
Ips jtoow full seo cms presentation
snapkode
 
Refactoring, A First Example
Refactoring, A First ExampleRefactoring, A First Example
Refactoring, A First Example
Vorleak Chy
 
The Power Of Refactoring (PHPCon Italia)
The Power Of Refactoring (PHPCon Italia)The Power Of Refactoring (PHPCon Italia)
The Power Of Refactoring (PHPCon Italia)
Stefan Koopmanschap
 
Python For Technical SEO | Women In Tech SEO Festival March 2020 | Ruth Everett
Python For Technical SEO | Women In Tech SEO Festival March 2020 | Ruth Everett Python For Technical SEO | Women In Tech SEO Festival March 2020 | Ruth Everett
Python For Technical SEO | Women In Tech SEO Festival March 2020 | Ruth Everett
Ruth Everett
 
A tour of React Native
A tour of React NativeA tour of React Native
A tour of React Native
Tadeu Zagallo
 
Translating share point from beginning to ending
Translating share point from beginning to endingTranslating share point from beginning to ending
Translating share point from beginning to ending
Vincent Biret
 
Test Driven Design
Test Driven DesignTest Driven Design
Test Driven Design
Saad Ahmed
 
Test Driven Design - GDG DevFest Istanbul 2016
Test Driven Design - GDG DevFest Istanbul 2016Test Driven Design - GDG DevFest Istanbul 2016
Test Driven Design - GDG DevFest Istanbul 2016
Lemi Orhan Ergin
 
The Power Of Refactoring (php|tek 09)
The Power Of Refactoring (php|tek 09)The Power Of Refactoring (php|tek 09)
The Power Of Refactoring (php|tek 09)
Stefan Koopmanschap
 
When to refactor
When to refactorWhen to refactor
When to refactor
Yonni Mendes
 
Principles in Refactoring
Principles in RefactoringPrinciples in Refactoring
Principles in Refactoring
Chamnap Chhorn
 
The Power of Refactoring
The Power of RefactoringThe Power of Refactoring
The Power of Refactoring
Stefan Koopmanschap
 
WF 202 Advanced Workflow Solutions
WF 202 Advanced Workflow Solutions WF 202 Advanced Workflow Solutions
WF 202 Advanced Workflow Solutions
William Huneycutt, II
 
Refactoring to Testable Code
Refactoring to Testable CodeRefactoring to Testable Code
Refactoring to Testable Code
Richard Taylor
 
Tackling Python: What is it and How Can it Help with Technical SEO? | TechSEO...
Tackling Python: What is it and How Can it Help with Technical SEO? | TechSEO...Tackling Python: What is it and How Can it Help with Technical SEO? | TechSEO...
Tackling Python: What is it and How Can it Help with Technical SEO? | TechSEO...
Ruth Everett
 
The Power Of Refactoring (PHPNW)
The Power Of Refactoring (PHPNW)The Power Of Refactoring (PHPNW)
The Power Of Refactoring (PHPNW)
Stefan Koopmanschap
 
Tackling Python: How It Can Help With Technical SEO | Pint Sized Meetup Janua...
Tackling Python: How It Can Help With Technical SEO | Pint Sized Meetup Janua...Tackling Python: How It Can Help With Technical SEO | Pint Sized Meetup Janua...
Tackling Python: How It Can Help With Technical SEO | Pint Sized Meetup Janua...
Ruth Everett
 
Getting Started with Python and Machine Learning for SEO | BrightonSEO Octobe...
Getting Started with Python and Machine Learning for SEO | BrightonSEO Octobe...Getting Started with Python and Machine Learning for SEO | BrightonSEO Octobe...
Getting Started with Python and Machine Learning for SEO | BrightonSEO Octobe...
Ruth Everett
 

Similar to ABAP CodeRetreat 20.5.2017 Vienna - Refactoring (20)

Refactoring
RefactoringRefactoring
Refactoring
 
The Power Of Refactoring (4developers Krakow)
The Power Of Refactoring (4developers Krakow)The Power Of Refactoring (4developers Krakow)
The Power Of Refactoring (4developers Krakow)
 
Ips jtoow full seo cms presentation
Ips jtoow full seo cms presentationIps jtoow full seo cms presentation
Ips jtoow full seo cms presentation
 
Refactoring, A First Example
Refactoring, A First ExampleRefactoring, A First Example
Refactoring, A First Example
 
The Power Of Refactoring (PHPCon Italia)
The Power Of Refactoring (PHPCon Italia)The Power Of Refactoring (PHPCon Italia)
The Power Of Refactoring (PHPCon Italia)
 
Python For Technical SEO | Women In Tech SEO Festival March 2020 | Ruth Everett
Python For Technical SEO | Women In Tech SEO Festival March 2020 | Ruth Everett Python For Technical SEO | Women In Tech SEO Festival March 2020 | Ruth Everett
Python For Technical SEO | Women In Tech SEO Festival March 2020 | Ruth Everett
 
A tour of React Native
A tour of React NativeA tour of React Native
A tour of React Native
 
Translating share point from beginning to ending
Translating share point from beginning to endingTranslating share point from beginning to ending
Translating share point from beginning to ending
 
Test Driven Design
Test Driven DesignTest Driven Design
Test Driven Design
 
Test Driven Design - GDG DevFest Istanbul 2016
Test Driven Design - GDG DevFest Istanbul 2016Test Driven Design - GDG DevFest Istanbul 2016
Test Driven Design - GDG DevFest Istanbul 2016
 
The Power Of Refactoring (php|tek 09)
The Power Of Refactoring (php|tek 09)The Power Of Refactoring (php|tek 09)
The Power Of Refactoring (php|tek 09)
 
When to refactor
When to refactorWhen to refactor
When to refactor
 
Principles in Refactoring
Principles in RefactoringPrinciples in Refactoring
Principles in Refactoring
 
The Power of Refactoring
The Power of RefactoringThe Power of Refactoring
The Power of Refactoring
 
WF 202 Advanced Workflow Solutions
WF 202 Advanced Workflow Solutions WF 202 Advanced Workflow Solutions
WF 202 Advanced Workflow Solutions
 
Refactoring to Testable Code
Refactoring to Testable CodeRefactoring to Testable Code
Refactoring to Testable Code
 
Tackling Python: What is it and How Can it Help with Technical SEO? | TechSEO...
Tackling Python: What is it and How Can it Help with Technical SEO? | TechSEO...Tackling Python: What is it and How Can it Help with Technical SEO? | TechSEO...
Tackling Python: What is it and How Can it Help with Technical SEO? | TechSEO...
 
The Power Of Refactoring (PHPNW)
The Power Of Refactoring (PHPNW)The Power Of Refactoring (PHPNW)
The Power Of Refactoring (PHPNW)
 
Tackling Python: How It Can Help With Technical SEO | Pint Sized Meetup Janua...
Tackling Python: How It Can Help With Technical SEO | Pint Sized Meetup Janua...Tackling Python: How It Can Help With Technical SEO | Pint Sized Meetup Janua...
Tackling Python: How It Can Help With Technical SEO | Pint Sized Meetup Janua...
 
Getting Started with Python and Machine Learning for SEO | BrightonSEO Octobe...
Getting Started with Python and Machine Learning for SEO | BrightonSEO Octobe...Getting Started with Python and Machine Learning for SEO | BrightonSEO Octobe...
Getting Started with Python and Machine Learning for SEO | BrightonSEO Octobe...
 

More from Cadaxo GmbH

Webinar SAP/ABAP und Microsoft
Webinar  SAP/ABAP und MicrosoftWebinar  SAP/ABAP und Microsoft
Webinar SAP/ABAP und Microsoft
Cadaxo GmbH
 
Webinar - ABAP Releasenotes 7.53/7.54
Webinar - ABAP Releasenotes 7.53/7.54Webinar - ABAP Releasenotes 7.53/7.54
Webinar - ABAP Releasenotes 7.53/7.54
Cadaxo GmbH
 
Webinar ABAP Managed Database Procedures
Webinar ABAP Managed Database ProceduresWebinar ABAP Managed Database Procedures
Webinar ABAP Managed Database Procedures
Cadaxo GmbH
 
Webinar - ABAP Development Tools
Webinar - ABAP Development ToolsWebinar - ABAP Development Tools
Webinar - ABAP Development Tools
Cadaxo GmbH
 
Webinar - Entwurfsmuster in ABAP
Webinar - Entwurfsmuster in ABAPWebinar - Entwurfsmuster in ABAP
Webinar - Entwurfsmuster in ABAP
Cadaxo GmbH
 
Webinar Modern ABAP
Webinar Modern ABAPWebinar Modern ABAP
Webinar Modern ABAP
Cadaxo GmbH
 
Webinar ABAP 7.51 Releaseinformationen
Webinar ABAP 7.51 ReleaseinformationenWebinar ABAP 7.51 Releaseinformationen
Webinar ABAP 7.51 Releaseinformationen
Cadaxo GmbH
 
Webinar - SAP Gateway
Webinar  - SAP GatewayWebinar  - SAP Gateway
Webinar - SAP Gateway
Cadaxo GmbH
 
Webinar - ABAP CDS Views
Webinar - ABAP CDS ViewsWebinar - ABAP CDS Views
Webinar - ABAP CDS Views
Cadaxo GmbH
 
SQL Cockpit 3.1 - Overview
SQL Cockpit 3.1 - OverviewSQL Cockpit 3.1 - Overview
SQL Cockpit 3.1 - Overview
Cadaxo GmbH
 
Webinar - SAP BOPF
Webinar - SAP BOPFWebinar - SAP BOPF
Webinar - SAP BOPF
Cadaxo GmbH
 
Webinar - ABAP 7.50 Releaseabhängige Änderungen
Webinar - ABAP 7.50 Releaseabhängige ÄnderungenWebinar - ABAP 7.50 Releaseabhängige Änderungen
Webinar - ABAP 7.50 Releaseabhängige Änderungen
Cadaxo GmbH
 
TDD mit ABAP Units
TDD mit ABAP UnitsTDD mit ABAP Units
TDD mit ABAP Units
Cadaxo GmbH
 
Clean code in ABAP
Clean code in ABAPClean code in ABAP
Clean code in ABAP
Cadaxo GmbH
 
Webinar - Boost your ABAP
Webinar - Boost your ABAPWebinar - Boost your ABAP
Webinar - Boost your ABAP
Cadaxo GmbH
 
SQL Cockpit - Releasenotes 3.0
SQL Cockpit - Releasenotes 3.0SQL Cockpit - Releasenotes 3.0
SQL Cockpit - Releasenotes 3.0
Cadaxo GmbH
 
Webinar ABAP 7.40 sp5/sp8 Releaseinformationen
Webinar ABAP 7.40 sp5/sp8 ReleaseinformationenWebinar ABAP 7.40 sp5/sp8 Releaseinformationen
Webinar ABAP 7.40 sp5/sp8 Releaseinformationen
Cadaxo GmbH
 
Prüfen Sie Ihre ABAP SQL Abfragen auf SAP HANA Tauglichkeit
Prüfen Sie Ihre ABAP SQL Abfragen auf SAP HANA TauglichkeitPrüfen Sie Ihre ABAP SQL Abfragen auf SAP HANA Tauglichkeit
Prüfen Sie Ihre ABAP SQL Abfragen auf SAP HANA Tauglichkeit
Cadaxo GmbH
 
Cadaxo SQL Cockpit 2.0 - Neue Features im Detail
Cadaxo SQL Cockpit 2.0 - Neue Features im DetailCadaxo SQL Cockpit 2.0 - Neue Features im Detail
Cadaxo SQL Cockpit 2.0 - Neue Features im Detail
Cadaxo GmbH
 
Abap 7 02 new features - new string functions
Abap 7 02   new features - new string functionsAbap 7 02   new features - new string functions
Abap 7 02 new features - new string functions
Cadaxo GmbH
 

More from Cadaxo GmbH (20)

Webinar SAP/ABAP und Microsoft
Webinar  SAP/ABAP und MicrosoftWebinar  SAP/ABAP und Microsoft
Webinar SAP/ABAP und Microsoft
 
Webinar - ABAP Releasenotes 7.53/7.54
Webinar - ABAP Releasenotes 7.53/7.54Webinar - ABAP Releasenotes 7.53/7.54
Webinar - ABAP Releasenotes 7.53/7.54
 
Webinar ABAP Managed Database Procedures
Webinar ABAP Managed Database ProceduresWebinar ABAP Managed Database Procedures
Webinar ABAP Managed Database Procedures
 
Webinar - ABAP Development Tools
Webinar - ABAP Development ToolsWebinar - ABAP Development Tools
Webinar - ABAP Development Tools
 
Webinar - Entwurfsmuster in ABAP
Webinar - Entwurfsmuster in ABAPWebinar - Entwurfsmuster in ABAP
Webinar - Entwurfsmuster in ABAP
 
Webinar Modern ABAP
Webinar Modern ABAPWebinar Modern ABAP
Webinar Modern ABAP
 
Webinar ABAP 7.51 Releaseinformationen
Webinar ABAP 7.51 ReleaseinformationenWebinar ABAP 7.51 Releaseinformationen
Webinar ABAP 7.51 Releaseinformationen
 
Webinar - SAP Gateway
Webinar  - SAP GatewayWebinar  - SAP Gateway
Webinar - SAP Gateway
 
Webinar - ABAP CDS Views
Webinar - ABAP CDS ViewsWebinar - ABAP CDS Views
Webinar - ABAP CDS Views
 
SQL Cockpit 3.1 - Overview
SQL Cockpit 3.1 - OverviewSQL Cockpit 3.1 - Overview
SQL Cockpit 3.1 - Overview
 
Webinar - SAP BOPF
Webinar - SAP BOPFWebinar - SAP BOPF
Webinar - SAP BOPF
 
Webinar - ABAP 7.50 Releaseabhängige Änderungen
Webinar - ABAP 7.50 Releaseabhängige ÄnderungenWebinar - ABAP 7.50 Releaseabhängige Änderungen
Webinar - ABAP 7.50 Releaseabhängige Änderungen
 
TDD mit ABAP Units
TDD mit ABAP UnitsTDD mit ABAP Units
TDD mit ABAP Units
 
Clean code in ABAP
Clean code in ABAPClean code in ABAP
Clean code in ABAP
 
Webinar - Boost your ABAP
Webinar - Boost your ABAPWebinar - Boost your ABAP
Webinar - Boost your ABAP
 
SQL Cockpit - Releasenotes 3.0
SQL Cockpit - Releasenotes 3.0SQL Cockpit - Releasenotes 3.0
SQL Cockpit - Releasenotes 3.0
 
Webinar ABAP 7.40 sp5/sp8 Releaseinformationen
Webinar ABAP 7.40 sp5/sp8 ReleaseinformationenWebinar ABAP 7.40 sp5/sp8 Releaseinformationen
Webinar ABAP 7.40 sp5/sp8 Releaseinformationen
 
Prüfen Sie Ihre ABAP SQL Abfragen auf SAP HANA Tauglichkeit
Prüfen Sie Ihre ABAP SQL Abfragen auf SAP HANA TauglichkeitPrüfen Sie Ihre ABAP SQL Abfragen auf SAP HANA Tauglichkeit
Prüfen Sie Ihre ABAP SQL Abfragen auf SAP HANA Tauglichkeit
 
Cadaxo SQL Cockpit 2.0 - Neue Features im Detail
Cadaxo SQL Cockpit 2.0 - Neue Features im DetailCadaxo SQL Cockpit 2.0 - Neue Features im Detail
Cadaxo SQL Cockpit 2.0 - Neue Features im Detail
 
Abap 7 02 new features - new string functions
Abap 7 02   new features - new string functionsAbap 7 02   new features - new string functions
Abap 7 02 new features - new string functions
 

Recently uploaded

WhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring AppsWhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring Apps
HackersList
 
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes..."Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
Anant Gupta
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
BrainSell Technologies
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Kunal Gupta
 
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
digitalxplive
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
Shiv Technolabs
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
KAMAL CHOUDHARY
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
maigasapphire
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
huseindihon
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
ldtexsolbl
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
Priyanka Aash
 
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
SynapseIndia
 
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python CodebaseEuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
Jimmy Lai
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
SynapseIndia
 
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
Priyanka Aash
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
shanihomely
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Torry Harris
 

Recently uploaded (20)

WhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring AppsWhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring Apps
 
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes..."Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
 
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
 
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
 
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python CodebaseEuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
 
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
 

ABAP CodeRetreat 20.5.2017 Vienna - Refactoring

Editor's Notes

  1. Im sure, most of you have heard about refactoring in the context of Test Driven Development
  2. You probably know this situation: You are looking into existing code, it‘s probably not yours, and you sad „O my good, tha‘ts realy bad code“. What was I (or the other developer) thinking? This is completely wrong! Martin Fowler calls such code „Yuck“ (=Igitt, Pfui, Pfui Teufel!) I startet my development careere 25 years ago. Back then we sad, if a code works - don‘t touch it! – If you touch it, you might brake it! - Remember „Never change a running system“ Btw: Funny fact, this pharses was only used in german-speaking countries. The Refactoring Mindeset says, when you see such bad code – you should fix it! – Maybee it was fine a year ago, when you wrote it. But now you realize, it‘s not right and you have to change it, you have to fix it. Martin Fowler describes this as Litter-Pickup! If you have read the Book “Clean Code” by Rober C. Martin then you have heard about the “Boyscout Rule”: If you have to change a code, always leave the code at least a little bit better. Make at least a small improvement! If you hit the code very often, then you will have a realy great code over the time.
  3. Sometimes you are looking into a code, and you do not understand what the code should do. „What the hell is this code doing?“ You have to analyze it, you have to go very deep into the coding to understand it. And then – I am sure you know the moment – you understand the Coding. „Bingo“ That is, what the code does! This is a important moment - but it‘s just in your head! For the moment. You can not share your brain with your team. And after a couple of months (or sometimes after a couple of hours) you have completely forgotten what the code should do. You should refactor the code to make it more clear, to make it easier to understand! Martin Fowler described this as Comprehension Refactoring Both Litter-Pickup Refactoring and Comprehension Refactoring requires the same reaction. There are 2 tracks, which you can consider: When ever you see something which you dont understand or is just bad code, you should ask yourself – „Do I wanna fix it now“. Is it a quick simple fix, or does fixing take a little bit of time. For example, if you just want to rename a method, then you can do it right now. But sometimes you have to think about the code. If you decide to fix it later, you should make a note – for example in the top area of you code – and as soon if you have finish your regular work, go back and make it a little bit cleaner.
  4. I am sure you know the situation: You look into some code and you realize, I have new insights how the code should work, that I didn‘t have bevore. Especialy in the context of adding a new feature. You have to add some new functionality to put in, and it whould be realy easy to add this new function – if the existing code was organized a little bit different. Maybe the code was o.k. when you have developed it, but now you have to add new features and it‘s not looking right anymore. This situation is called „Preparatory Refactoring“ Basically this means, before you add a new function to an existing coding which not fits in a shape that you want, refactor it! Refactor it, make the tests until they are green – and then start to add the new feature to the better refactored code base. Some people think, that refactoring slows you down, that refactoring blocks your time from other things. Usually the benefits from refactoring results in the medium term. But in this case, you can get that benefit right now in the middle of the task you are doing. Often it is faster, to do a preparatory refactoring and then add the new functionalty.
  5. People often talk about refactoring, „Why should we refactor?“ – Because we want have a good code, a clean code. Because it is the „Right Thing“. If you use these arguments in discussions with your customers, you have lost.
  6. The only valid argument is economy!
  7. We do this, to deliver more functionality more quickly! This is the only reason!
  8. We do this, to deliver more functionality more quickly! This is the only reason!