D esign  S mells The  7  Odors of  R otting  S oftware G iorgio  V espucci  –  S oftware  F actory  R oma
?
W hat is
S oftware D esign
?
“ […] the  design  of a software project is documented primarily by its  source code .” Robert C. Martin
The source code  is  the design.
Abandoned code  rots .
When it rots,  it  smells .
7   S mells
1.  R igidity
The tendency for software to be  difficult to change , even in simple ways. The design is  hard to change .
2.  F ragility
The tendency of a program to  break in many places  when a  single change  is made. The design is  easy to break .
3.  I mmobility
It is hard to  disentangle  the system into components that can be  reused  in other systems.   The design is  hard  to  r...
4.  V iscosity
S oftware viscosity
Design -preserving  methods vs. Hacks
E nvironment viscosity
Slow  and inefficient development environment Very  long  compile times Hours  to check-in Several  minutes to deploy
Doing things  wrong   is  easier  than  doing things  right .
5.  N eedless  C omplexity
Elements  not  currently  useful  in the design. O verdesign.
6.  N eedless  R epetition
C ut- a nd- p aste is useful for text-editing, but can be  disastrous  for  c ode- e diting.
The design contains  repeating  structures that could be unified under a  single  abstraction.
7.  O pacity
The tendency of a module  to be  difficult  to  understand .
Code written in a  clear  and  expressive  manner vs. Code written in an  opaque  and  convoluted  manner.
?
W hat is a
D esign S mell
?
A  d esign  s mell  is a  symptom .
It’s a  violation of  P rinciples.
S . O . L . I . D .   Principles
T o be  c ontinued...
Upcoming SlideShare
Loading in...5
×

Design Smells

6,346

Published on

A quick-and-dirty introduction to Design Smells, as presented in Robert 'Uncle Bob' Martin book "Agile Software Development". Thought as the first of a series.

Published in: Technology

Transcript of "Design Smells"

  1. 1. D esign S mells The 7 Odors of R otting S oftware G iorgio V espucci – S oftware F actory R oma
  2. 2. ?
  3. 3. W hat is
  4. 4. S oftware D esign
  5. 5. ?
  6. 6. “ […] the design of a software project is documented primarily by its source code .” Robert C. Martin
  7. 7. The source code is the design.
  8. 8. Abandoned code rots .
  9. 9. When it rots, it smells .
  10. 10. 7 S mells
  11. 11. 1. R igidity
  12. 12. The tendency for software to be difficult to change , even in simple ways. The design is hard to change .
  13. 13. 2. F ragility
  14. 14. The tendency of a program to break in many places when a single change is made. The design is easy to break .
  15. 15. 3. I mmobility
  16. 16. It is hard to disentangle the system into components that can be reused in other systems. The design is hard to reuse .
  17. 17. 4. V iscosity
  18. 18. S oftware viscosity
  19. 19. Design -preserving methods vs. Hacks
  20. 20. E nvironment viscosity
  21. 21. Slow and inefficient development environment Very long compile times Hours to check-in Several minutes to deploy
  22. 22. Doing things wrong is easier than doing things right .
  23. 23. 5. N eedless C omplexity
  24. 24. Elements not currently useful in the design. O verdesign.
  25. 25. 6. N eedless R epetition
  26. 26. C ut- a nd- p aste is useful for text-editing, but can be disastrous for c ode- e diting.
  27. 27. The design contains repeating structures that could be unified under a single abstraction.
  28. 28. 7. O pacity
  29. 29. The tendency of a module to be difficult to understand .
  30. 30. Code written in a clear and expressive manner vs. Code written in an opaque and convoluted manner.
  31. 31. ?
  32. 32. W hat is a
  33. 33. D esign S mell
  34. 34. ?
  35. 35. A d esign s mell is a symptom .
  36. 36. It’s a violation of P rinciples.
  37. 37. S . O . L . I . D . Principles
  38. 38. T o be c ontinued...

×