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.

Brutal Refactoring Game @XP Vienna 2013 06 05

797 views

Published on

  • Be the first to comment

Brutal Refactoring Game @XP Vienna 2013 06 05

  1. 1. Brutal Refactoring Game www.mozaicworks.com
  2. 2. Me Adi Bolboaca: Programmer, Trainer, Coach www.mozaicworks.com
  3. 3. Today Take a simple problem Use pair-programming Language agnostic Write code Add functionality only when the code is clean Refactor often Refactor a lot www.mozaicworks.com
  4. 4. Code smell A code smell is a hint that shows  you might have a problem in your  system. '  www.mozaicworks.com
  5. 5. Code smell Sniffable Easy to spot Does not always indicate a problem www.mozaicworks.com
  6. 6. Refactoring Changing a software system  without changing the behavior of  the code and improving its  internal structure www.mozaicworks.com
  7. 7. Refactoring Is NOT: Re-engineering Re-design Re-writing www.mozaicworks.com
  8. 8. Problem Tic-Tac-Toe Board 3x3 X plays first 0 plays second Result: winner or draw www.mozaicworks.com
  9. 9. Coding smells 1) Lack of tests 2) Name not from domain 3) Name not expressing intent 4) Unnecessary if 5) Unnecessary else 6) Duplication of constant 7) Method does more than one thing 8) Primitive obsession 9) Feature envy 10) Method too long (> 6 lines) 11) Too many parameters (> 3) 12) Test – not unitary 13) Test – setup too complex 14) Test – unclear Act 15) Test - more than one assert 16) Test – no assert 17) Test – too many paths www.mozaicworks.com
  10. 10. Contact me Unit testing workshop Remote pair-programming TDD workshop Refactoring workshop Legacy code workshop Legacy code retreat Code retreat @adibolb www.mozaicworks.com
  11. 11. Brutal Refactoring Game http://www.mozaicworks.com adrian.bolboaca@mozaicworks.com @adibolb Extend your mentoring & training capacity Accelerate learning through communities of practice Grow your functional leaders and top talents www.mozaicworks.com
  12. 12. Read more http://blog.adrianbolboaca.ro/2013/04/the- history-of-brutal-refactoring-game www.mozaicworks.com
  13. 13. Brutal Refactoring Game Q&A, Beer & More... www.mozaicworks.com

×