SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
No Reuse Before Use
terry@odd-e.com
Who Am I
2
• I am Terry Yin
• Work for Odd-e
• Experienced in software development
• Focus on technical coaching
• Love programming
• A father
Me
Let’s Visit A City
On The Opposite Side of the Globe
5
6
Planned City
Oscar Niemeyer
8
9
10,000 pedestrian lives are
lost on Brazilian road in
2012, whom in theory do
not existing in Brasilia.
(270, 000 around the world)
"Organic planning does not begin with a
preconceived goal; it moves from need to
need, from opportunity to opportunity, in a
series of adaptations that themselves
become increasingly coherent and
purposeful, so that they generate a complex
final design, hardly less unified than a pre-
formed geometric pattern.”
— Lewis Mumford explained further what he
admired in medieval cities
11
12
Now
13
14
Why the graphic designer doesn’t
understand reuse?
16
Speculative Generality
Customer Value
17
People do not on the whole pay for
(or need) generality: They tend to
have a specific situation, and it is a
solution to that specific situation
that has value.
Simplicity before generality, use before reuse,
by Kevlin Henney
18
19
Design from the perspective of use
rather than implementation
20
CostofChange
0 1 2 3 4 5 6 7 8 9
21
— Kent Beck, inventor of XP
22
Duplication may be the
root of all evil in software.
Clean Code, Robert C. Martin
Refactoring
• Small steps
• Look for code smells
• Following design principles
- SOLID
- High cohesion, low coupling
- Once And Only Once
• Design emerges from working code
23
"Refactoring is the process of changing a
software system in such a way that it
does not alter the external behavior of
the code yet improves its internal
structure."
Refactoring: Improving the Design of Existing Code by Martin Fowler
The Second-System Effect
24
Mythical Man Month (1974), Fred Brooks
What has been
done
What was originated
but not done
In the first
system
Real experience
What the architect himself
think his experience is,
and will apply to the 2nd system.
Emergent Design
25
Code, listen you shall.
Let the design be the
way it wants to be!
26
Will Reuse Save Money?
Reuse Is Not Free
27
All non-trivial abstractions, to some degree, are leaky.
The Law of Leaky Abstractions
by Joel Spolsky
Devise
28
29
Who Want To Be Reused?
Business Logic?
OS functionality?
Mathematics library?
Design Patterns?
Framework?
Domain Models?
Middleware?
Open source?
No Reuse?
Project Or Product
• When you make a product like a project
• you get Brasilia
30
Working software is our primary goal
Simplicity before generality, use before reuse
Do emergent design
Reuse isn’t always a good thing
31

Weitere ähnliche Inhalte

Ähnlich wie No Reuse Before Use

RWE2007-Practical Design for Developers
RWE2007-Practical Design for DevelopersRWE2007-Practical Design for Developers
RWE2007-Practical Design for Developers
verbad
 

Ähnlich wie No Reuse Before Use (20)

Design Collaboration
Design CollaborationDesign Collaboration
Design Collaboration
 
Online TechTalk  "Patterns in Embedded SW Design"
Online TechTalk  "Patterns in Embedded SW Design"Online TechTalk  "Patterns in Embedded SW Design"
Online TechTalk  "Patterns in Embedded SW Design"
 
Whittle Modeling Wizards 2012
Whittle Modeling Wizards 2012Whittle Modeling Wizards 2012
Whittle Modeling Wizards 2012
 
Code Beauty
Code BeautyCode Beauty
Code Beauty
 
EST 200, Design Thinking
EST 200, Design ThinkingEST 200, Design Thinking
EST 200, Design Thinking
 
The Birth of the HUGE UX School
The Birth of the HUGE UX SchoolThe Birth of the HUGE UX School
The Birth of the HUGE UX School
 
Design Patterns in Swift ch0 Introduction
Design Patterns in Swift ch0 IntroductionDesign Patterns in Swift ch0 Introduction
Design Patterns in Swift ch0 Introduction
 
GHAMAS Design Principles
GHAMAS Design PrinciplesGHAMAS Design Principles
GHAMAS Design Principles
 
Kits to Find the Bits that Fits
Kits to Find  the Bits that Fits Kits to Find  the Bits that Fits
Kits to Find the Bits that Fits
 
Cormas: Modelling for Citizens with Citizens. Building accessible and reliabl...
Cormas: Modelling for Citizens with Citizens. Building accessible and reliabl...Cormas: Modelling for Citizens with Citizens. Building accessible and reliabl...
Cormas: Modelling for Citizens with Citizens. Building accessible and reliabl...
 
Systemic Design Principles & Methods (Royal College of Art)
Systemic Design Principles & Methods (Royal College of Art)Systemic Design Principles & Methods (Royal College of Art)
Systemic Design Principles & Methods (Royal College of Art)
 
BOP Product Design
BOP Product DesignBOP Product Design
BOP Product Design
 
Moser disruptive practice-arch3.0-2012
Moser disruptive practice-arch3.0-2012Moser disruptive practice-arch3.0-2012
Moser disruptive practice-arch3.0-2012
 
The psychopathology of everyday things!
The psychopathology of everyday things!The psychopathology of everyday things!
The psychopathology of everyday things!
 
Serious play (ENG version)
Serious play (ENG version)Serious play (ENG version)
Serious play (ENG version)
 
Collaborative Evolution of 3D Models
Collaborative Evolution of 3D ModelsCollaborative Evolution of 3D Models
Collaborative Evolution of 3D Models
 
META for Microservices: Getting your enterprise migration in motion
META for Microservices: Getting your enterprise migration in motionMETA for Microservices: Getting your enterprise migration in motion
META for Microservices: Getting your enterprise migration in motion
 
Rapid Product Design in the Wild
Rapid Product Design in the WildRapid Product Design in the Wild
Rapid Product Design in the Wild
 
RWE2007-Practical Design for Developers
RWE2007-Practical Design for DevelopersRWE2007-Practical Design for Developers
RWE2007-Practical Design for Developers
 
It's Better To Have a Permanent Income Than to Be Fascinating: Killer Feature...
It's Better To Have a Permanent Income Than to Be Fascinating: Killer Feature...It's Better To Have a Permanent Income Than to Be Fascinating: Killer Feature...
It's Better To Have a Permanent Income Than to Be Fascinating: Killer Feature...
 

Mehr von Terry Yin

Mehr von Terry Yin (6)

Test Driven Development of A Static Code Analyzer
Test Driven Development of A Static Code AnalyzerTest Driven Development of A Static Code Analyzer
Test Driven Development of A Static Code Analyzer
 
Six Years of Teaching Certified Scrum Developers
Six Years of Teaching Certified Scrum DevelopersSix Years of Teaching Certified Scrum Developers
Six Years of Teaching Certified Scrum Developers
 
Abstraction is a communication tool
Abstraction is a communication toolAbstraction is a communication tool
Abstraction is a communication tool
 
Programming exercises
Programming exercisesProgramming exercises
Programming exercises
 
Misconceptions Of Unit Testing
Misconceptions Of Unit TestingMisconceptions Of Unit Testing
Misconceptions Of Unit Testing
 
Adding Unit Test To Legacy Code
Adding Unit Test To Legacy CodeAdding Unit Test To Legacy Code
Adding Unit Test To Legacy Code
 

Kürzlich hochgeladen

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Kürzlich hochgeladen (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

No Reuse Before Use

  • 1. No Reuse Before Use terry@odd-e.com
  • 2. Who Am I 2 • I am Terry Yin • Work for Odd-e • Experienced in software development • Focus on technical coaching • Love programming • A father Me
  • 3.
  • 4. Let’s Visit A City On The Opposite Side of the Globe
  • 5. 5
  • 6. 6
  • 8. 8
  • 9. 9 10,000 pedestrian lives are lost on Brazilian road in 2012, whom in theory do not existing in Brasilia. (270, 000 around the world)
  • 10. "Organic planning does not begin with a preconceived goal; it moves from need to need, from opportunity to opportunity, in a series of adaptations that themselves become increasingly coherent and purposeful, so that they generate a complex final design, hardly less unified than a pre- formed geometric pattern.” — Lewis Mumford explained further what he admired in medieval cities
  • 11. 11
  • 13. 13
  • 14. 14 Why the graphic designer doesn’t understand reuse?
  • 15.
  • 17. Customer Value 17 People do not on the whole pay for (or need) generality: They tend to have a specific situation, and it is a solution to that specific situation that has value. Simplicity before generality, use before reuse, by Kevlin Henney
  • 18. 18
  • 19. 19 Design from the perspective of use rather than implementation
  • 20. 20 CostofChange 0 1 2 3 4 5 6 7 8 9
  • 21. 21 — Kent Beck, inventor of XP
  • 22. 22 Duplication may be the root of all evil in software. Clean Code, Robert C. Martin
  • 23. Refactoring • Small steps • Look for code smells • Following design principles - SOLID - High cohesion, low coupling - Once And Only Once • Design emerges from working code 23 "Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure." Refactoring: Improving the Design of Existing Code by Martin Fowler
  • 24. The Second-System Effect 24 Mythical Man Month (1974), Fred Brooks What has been done What was originated but not done In the first system Real experience What the architect himself think his experience is, and will apply to the 2nd system.
  • 25. Emergent Design 25 Code, listen you shall. Let the design be the way it wants to be!
  • 27. Reuse Is Not Free 27 All non-trivial abstractions, to some degree, are leaky. The Law of Leaky Abstractions by Joel Spolsky
  • 29. 29 Who Want To Be Reused? Business Logic? OS functionality? Mathematics library? Design Patterns? Framework? Domain Models? Middleware? Open source? No Reuse?
  • 30. Project Or Product • When you make a product like a project • you get Brasilia 30
  • 31. Working software is our primary goal Simplicity before generality, use before reuse Do emergent design Reuse isn’t always a good thing 31