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 pr...
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...
"Organic planning does not begin with a
preconceived goal; it moves from need to
need, from opportunity to opportunity, in...
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 i...
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
- Onc...
The Second-System Effect
24
Mythical Man Month (1974), Fred Brooks
What has been
done
What was originated
but not done
In ...
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...
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 ...
No Reuse Before Use
No Reuse Before Use
Upcoming SlideShare
Loading in …5
×

No Reuse Before Use

2,047 views

Published on

The software industry has an overloaded expectation for reuse. And different people have different expectation from software reuse. When reuse happens before actual use, the reality is often quite different than everybody's expectation.
This talk promotes working software that has customer value, once-and-only-once over reusability, simplicity before generality, use before reuse.

Published in: Technology, Design

No Reuse Before Use

  1. 1. No Reuse Before Use terry@odd-e.com
  2. 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. 3. Let’s Visit A City On The Opposite Side of the Globe
  4. 4. 5
  5. 5. 6
  6. 6. Planned City Oscar Niemeyer
  7. 7. 8
  8. 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)
  9. 9. "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
  10. 10. 11
  11. 11. 12 Now
  12. 12. 13
  13. 13. 14 Why the graphic designer doesn’t understand reuse?
  14. 14. 16 Speculative Generality
  15. 15. 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
  16. 16. 18
  17. 17. 19 Design from the perspective of use rather than implementation
  18. 18. 20 CostofChange 0 1 2 3 4 5 6 7 8 9
  19. 19. 21 — Kent Beck, inventor of XP
  20. 20. 22 Duplication may be the root of all evil in software. Clean Code, Robert C. Martin
  21. 21. 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
  22. 22. 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.
  23. 23. Emergent Design 25 Code, listen you shall. Let the design be the way it wants to be!
  24. 24. 26 Will Reuse Save Money?
  25. 25. Reuse Is Not Free 27 All non-trivial abstractions, to some degree, are leaky. The Law of Leaky Abstractions by Joel Spolsky
  26. 26. Devise 28
  27. 27. 29 Who Want To Be Reused? Business Logic? OS functionality? Mathematics library? Design Patterns? Framework? Domain Models? Middleware? Open source? No Reuse?
  28. 28. Project Or Product • When you make a product like a project • you get Brasilia 30
  29. 29. Working software is our primary goal Simplicity before generality, use before reuse Do emergent design Reuse isn’t always a good thing 31

×