Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

TDD, Refactoring - Workshop

96 views

Published on

Workshop conducted as part of Agility Today conference,

Published in: Software
  • Login to see the comments

  • Be the first to like this

TDD, Refactoring - Workshop

  1. 1. TDD, Refactoring Using Gilded Rose Kata
  2. 2. http://blog.cleancoder.com/uncle-bob/2014/12/17/TheCyclesOfTDD.html Focus Confidence Progress
  3. 3. Simple Design Rules - Passes the tests - Reveals intention - No duplication - Fewest elements
  4. 4. Warm up?
  5. 5. TDD Rules - You can’t write production code without a failing test - You can’t have more than one failing test at a time - You can’t write a new test until your code is properly refactored
  6. 6. Simple Design - Passes the tests - Reveals intention - No duplication - Fewest elements
  7. 7. Gilded Rose Kata
  8. 8. bit.ly/gilded_rose_kata
  9. 9. Learnings/Feedback
  10. 10. Existing code? Lets Start with refactoring
  11. 11. Learnings/Feedback
  12. 12. Extreme OOP
  13. 13. OOP Rules - Use only one level of indentation per method - Don’t use the else keyword - Wrap all primitives and strings - Use only one dot per line - Don’t abbreviate
  14. 14. OOP Rules - Keep all entities small. - Don’t use any classes with more than two instance variables. - Use first-class collections. - Don’t use any getters/setters/properties
  15. 15. Thank you!!! @leenasn / leena@continuousdelivery.in https://medium.com/@leenasn https://medium.com/continuousdelivery
  16. 16. References All the Little Things - Sandi Metz Gilded Rose Kata - Emily Bache Extreme OOP Why getters and setters are evil? I Pity The Fool Who Doesn't Write Unit Tests - Jeff Atwood Why TDD - Naresh Jain

×