CODE SMELLS AND REFACTORING FEB 24 TH 2020

CODE SMELLS AND REFACTORING FEB 24 TH, 2020

AGENDA • Demo Info (2: 00 -2: 10) • Reading Discussion (2: 10 -2: 20) • Refactoring Practice (2: 20 -3: 20) • Work Time (3: 20 -3: 50)

MEMO OF UNDERSTANDING • Grade posted on Pweb on the submission for MOU • You may edit and resubmit to gain back points (could achieve full points) • Please notify me if you plan to resubmit or not • I will not put in grades for the rest of the team until notified one way or the other • Resubmit by Monday of next week at 2 pm

DEMO INFO (2: 00 -2: 10) • Overview linked on schedule • Whole group stands at front • Probably use Power. Point/Google Slides • Must show either designs or current deployed functional prototype • Also show/discuss ‘invisible’ progress (tests, documentation, bug squashing, refactoring, etc) • Share user stories/feature goals for next sprint

READING DISCUSSION (2: 10 -2: 20) • What order should you do the following with legacy code and why? (Think-pair-share) • 3. Bug fixing • 1. Writing characterization tests – even those capturing buggy behavior • 2. Refactoring

REFACTORING PRACTICE (2: 20 -3: 20) • In-class practice link with ‘legacy’ code • Copy code into Time. Setter. rb and starting test suite into Time. Setter. Tests. rb • With partner: 1. Identify code smells (from reading) 2. Write characterization tests 3. Refactor 4. Find and fix bug 5. Update test suite

REFACTORING PRACTICE (2: 20 -3: 20) • To experiment with code: • irb -r. /Time. Setter. rb • To run tests: • ruby Time. Setter. Tests. rb 1. Identify code smells (from reading) 2. Write characterization tests 3. Refactor 4. Find and fix bug 5. Update test suite

WORK TIME (3: 20 -3: 50) • Upcoming work: • Reading for Wednesday (do it!!!) • HW 6 due Wednesday • Ethics topic proposal due Friday • Demos on Friday • Sprint 1 Report/Plan for Sprint 2 due Friday • HW 7 due 3/4 (it’s a hard one!)
- Slides: 8