Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Refactoring out of the mess

1.576 Aufrufe

Veröffentlicht am

A quick overview of the most important latest things about refactoring, lots of it based on Martin Fowler's excellent: http://martinfowler.com/articles/workflowsOfRefactoring

Veröffentlicht in: Technologie
  • Als Erste(r) kommentieren

Refactoring out of the mess

  1. 1. Refactoring your way out of the mess @WolframKriesing, uxebu - JavaScript company
  2. 2. Improve structure all the time was not possible with this tower, of course
  3. 3. A bit of history
  4. 4. Design is hard. The design of reusable software is especially hard. Reusable software usually is the result of many design iterations. William F. Opdyke, 1992 it’sallaboutdesign
  5. 5. http://martinfowler.com/books/refactoring.html
  6. 6. base controlled technique code improving design
  7. 7. applying series small tranformations too small to be worth doing
  8. 8. tranformations cumulative significant
  9. 9. error small steps reduce risk
  10. 10. avoid system broken carrying out restructuring
  11. 11. allows gradually refactor system extended period of time
  12. 12. Reasons to refactor (refactoring workflows)
  13. 13. http://martinfowler.com/articles/workflowsOfRefactoring/
  14. 14. # 1
  15. 15. #2 - Litter-Pickup
  16. 16. #3comprehensionrefactoring
  17. 17. prepare #4
  18. 18. #5
  19. 19. #6 Long-Term Refactoring • Design • Gradually get to a new design • Little jumps • Parallel refactoring
  20. 20. „If somebody talks about a system being broken for a couple of days while they are refactoring, you can be pretty sure they are not refactoring.“ http://martinfowler.com/bliki/RefactoringMalapropism.html
  21. 21. 1 TDD Refactoring 2 Litter-Pickup Refactoring 3 Comprehension Refactoring 4 Preparatory Refactoring 5 Planned Refactoring 6 Long-Term Refactoring
  22. 22. –Martin Fowler „Refactoring (noun): a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior.“ Why? How? What?
  23. 23. Write Code Read Code
  24. 24. Easier to understand? - less to read! - expressive
  25. 25. The Power Of (Long) Names
  26. 26. Let’s use our time more efficiently!
  27. 27. How? How?
  28. 28. „If you are doing refactoring your system should not be broken for more than a few minutes at a time“ http://martinfowler.com/bliki/RefactoringMalapropism.html
  29. 29. broken? requires tests
  30. 30. –Martin Fowler „Refactoring (noun): a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior.“ stay green
  31. 31. stay green reflected in tests
  32. 32. Tests? LEGACY
  33. 33. Tests?
  34. 34. http://www.merriam-webster.com/dictionary/observable observable behavior implementation detail test this DONT test this
  35. 35. implementation detail
  36. 36. test right! OR disable refactoring
  37. 37. Tests?
  38. 38. „If you are doing refactoring your system should not be broken for more than a few minutes at a time“ http://martinfowler.com/bliki/RefactoringMalapropism.html
  39. 39. baby stepping on green
  40. 40. baby steps stay green have the right tests don’t test implementation detail
  41. 41. Why refactor?
  42. 42. think in economics not in code ethics
  43. 43. http://martinfowler.com/bliki/DesignStaminaHypothesis.html
  44. 44. What to refactor
  45. 45. https://github.com/ emilybache/ Tennis-Refactoring-Kata
  46. 46. thx @WolframKriesing, uxebu - JavaScript company

×