1 / 17

WARNING

WARNING. These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010. They may not show up well on other PowerPoint versions . You can download PowerPoint 2010 viewer from here .

jaeger
Download Presentation

WARNING

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. WARNING • These slides are not optimized for printing or exam preparation. These are for lecture delivery only. • These slides are made for PowerPoint 2010. They may not show up well on other PowerPoint versions. You can download PowerPoint 2010 viewer from here. • These slides contain a lot of animations. For optimal results, watch in slideshow mode.

  2. Broken Windows story Broken windows

  3. Lesson: Me sy things get m r

  4. Make it work, right, fast Make it work Make it right Make it fast Lesson: Me sy things get m r

  5. Make it work, right, fast code Make it work Make it right Make it fast Lesson: Me sythings get m r

  6. Refactoring: from Turkey to Peacock in thousand steps CS2103/T, Lecture 2, Part 2, [Aug 23, 2013]

  7. Refactoring Bug fixing == Refactoring? REFACTORING [Improving structure incrementally without modifying behaviour]

  8. Refactoring • Rewriting REFACTORING [Improving structure incrementally without modifying behaviour]

  9. Catalog memorize

  10. Example: Introduce Explaining Variable if ( (platform.toUpperCase().indexOf("MAC") > -1) && (browser.toUpperCase().indexOf("IE") > -1) && wasInitialized() && resize > 0 ) {…} final boolean isMacOs= platform.toUpperCase().indexOf("MAC") > -1; final boolean isIEBrowser= browser.toUpperCase().indexOf("IE") > -1; final boolean wasResized= resize > 0; if (isMacOs && isIEBrowser && wasInitialized() && wasResized) {…}

  11. IDE support

  12. Regression test REFACTORING [Improving structure incrementally without modifying behaviour]

  13. It’s not rocket surgery! Regression test REFACTORING [Improving structure incrementally without modifying behaviour]

  14. Regression test REFACTORING [Improving structure incrementally without modifying behaviour]

More Related