~/talk

TUTORIAL: Refactoring without a net

Talkat Python Web Conf 2023 · 2023-03-13..03-17· [testing]
slides:none on file

Shows how to refactor risky legacy code without a full test suite by capturing current behavior as golden outputs with ApprovalTests and running a 30-day characterization test against the Gilded Rose kata. Demonstrates concrete steps in PyCharm: create received/approved files, approve golden output, rename and extract methods, inject a bug (plus→minus) and see it fail, then apply strategy/factory patterns to replace nested ifs. The demo builds working approval tests and a refactored item-based updater that passes the preserved-behavior checks.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 1:06Speaker introduction
  3. 3:15What is refactoring
  4. 13:46Approval tests introduction
  5. 23:28Exercise overview
  6. 27:01Gilded Rose exercise setup
  7. 33:43First exercise preparation
  8. 46:07Refactoring patterns overview
  9. 57:03Step-by-step refactoring demo
  10. 1:18:18Strategy pattern approach
  11. 1:37:04Strategy pattern implementation
  12. 1:38:49Factory and new features
  13. 1:41:22Refactoring confidence summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.