~/talk

6 Safe Refactorings for Untested Legacy Code

Talkat ConFoo 2025 · 2025-02-26..02-28· [developer-experience, typescript]
slides:none on file

Six concrete refactorings (inline, rename, extract, change-signature, distill/extract, extend/override) are demonstrated with TypeScript examples and VS Code shortcuts to safely change untested legacy code. Each move follows the pattern create new code, replace occurrences, remove old so edits never leave the repository broken; tools include TypeScript types and an extension for automated refactors; use F2 and extract/inline shortcuts to compose safe multi-step changes and expose pure logic for unit tests.

AI-written summary · about

  1. 0:00Introduction to refactoring
  2. 1:02What is refactoring
  3. 4:59Legacy code challenges
  4. 6:25Core refactorings overview
  5. 7:30Inline refactoring
  6. 10:21Rename refactoring
  7. 14:55Extract refactoring
  8. 20:59Composing refactorings
  9. 21:21Change signature refactoring
  10. 25:35Distill and extract for testing
  11. 32:25Extend and override technique
  12. 40:09Summary and resources
~/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.