Writing high quality code for agile2012

274 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
274
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Writing high quality code for agile2012

  1. 1. 7/17/2012 Writing High Quality Code Agile 2012 www.ToBeAgile.com © Copyright 2009-2012 To Be Agile DB20120717 info@ToBeAgile.com www.techniquesofdesign.com info@techniquesofdesign.com COPYRIGHT © TECHNIQUES OF DESIGN DB20111207 Thank you for being here 2http://ToBeAgile.com 1
  2. 2. 7/17/2012 I am David Bernstein 3 Standing on the shoulders of giants 4http://ToBeAgile.com 2
  3. 3. 7/17/2012 What is quality? Service Products ? Software 5 What makes software good? 6http://ToBeAgile.com 3
  4. 4. 7/17/2012 Correctness is not enough 7 Remember when? 8http://ToBeAgile.com 4
  5. 5. 7/17/2012 Things change 9 Dealing with change 10http://ToBeAgile.com 5
  6. 6. 7/17/2012 What makes code easy to change? 11 What makes code difficult to change? 12http://ToBeAgile.com 6
  7. 7. 7/17/2012 Code pathologies 13 Rigidity – hard to repurpose 14http://ToBeAgile.com 7
  8. 8. 7/17/2012 Viscosity – difficult to change 15 Complexity – unsure how to change 16http://ToBeAgile.com 8
  9. 9. 7/17/2012 Opaque – difficult to understand 17 Brittleness – expensive to change 18http://ToBeAgile.com 9
  10. 10. 7/17/2012 Pathologies scare us 19 It’s harder on larger projects 20http://ToBeAgile.com 10
  11. 11. 7/17/2012 Quality in software 21 6 software qualities 22http://ToBeAgile.com 11
  12. 12. 7/17/2012 Cohesive 1 23 Language and software 24http://ToBeAgile.com 12
  13. 13. 7/17/2012 Class cohesion 25 Method cohesion 26http://ToBeAgile.com 13
  14. 14. 7/17/2012 Pathologies of poor cohesion 27 Non-redundant 2 28http://ToBeAgile.com 14
  15. 15. 7/17/2012 Finding redundancy 29 Types of redundancy 30http://ToBeAgile.com 15
  16. 16. 7/17/2012 Can non-identical code be redundant? 31 Can identical code be non-redundant? 32http://ToBeAgile.com 16
  17. 17. 7/17/2012 Redundant intent 33 Code investment or debt 34http://ToBeAgile.com 17
  18. 18. 7/17/2012 Pathologies of redundancy 35 Encapsulated 3 36http://ToBeAgile.com 18
  19. 19. 7/17/2012 What can be encapsulated? 37 What you don’t know… 38http://ToBeAgile.com 19
  20. 20. 7/17/2012 …can’t hurt you 39 Encapsulate by policy 40http://ToBeAgile.com 20
  21. 21. 7/17/2012 Optimization 41 Can you encapsulate it? 42http://ToBeAgile.com 21
  22. 22. 7/17/2012 Many ways to encapsulate 43 Pathologies of poor encapsulation 44http://ToBeAgile.com 22
  23. 23. 7/17/2012 Assertive 4 45 Assertive or inquisitive? 46http://ToBeAgile.com 23
  24. 24. 7/17/2012 Object therapy 47 “With great state comes great responsibility” 48http://ToBeAgile.com 24
  25. 25. 7/17/2012 Winston Churchill, Spiderman’s Uncle 49 Pathologies of inquisitiveness 50http://ToBeAgile.com 25
  26. 26. 7/17/2012 Testable 5 51 Testability guides design 52http://ToBeAgile.com 26
  27. 27. 7/17/2012 Pathologies of poor testability 53 Explicit 6 54http://ToBeAgile.com 27
  28. 28. 7/17/2012 Good and bad coupling 55 Bad coupling 56http://ToBeAgile.com 28
  29. 29. 7/17/2012 Coupling  Type  Interface  Abstract  Concrete 57 Coupling example Abstract Coupling Type Coupling Interface Coupling No Concrete Coupling 58http://ToBeAgile.com 29
  30. 30. 7/17/2012 Pathologies of bad coupling 59 The six code qualities… 60http://ToBeAgile.com 30
  31. 31. 7/17/2012 – Cohesive – non-Redundant – Encapsulated – Assertive – Testable – Explicit 61 …spells CREATE 62http://ToBeAgile.com 31
  32. 32. 7/17/2012 Code qualities guide us 63 Thank You!  We have just scratched the surface, to learn more: – Read my blog: http://ToBeAgile.com/blog – Follow me on Twitter (@ToBeAgile) – Attend my one of my Certified Scrum Developer trainings  Public Certified Scrum Developer Essentials classes: – October 15 – 19, 2012 in Redwood City, CA  Public Agile Software Developer Essentials classes: – December 10 – 14, 2012 Online (8:00 am-12:00 pm PT)  Private classes available for groups of 8 or more developers – Learn more at http://ToBeAgile.com 64http://ToBeAgile.com 32

×