~/talk

Large scale refactoring: from start to finish

Talkat JSHeroes 2022 · on Thursday, 2022-06-09· [developer-experience]
slides:none on file

A migration at GitLab upgrades to Apollo 3 over 11 months, splits work into many smaller MRs and moves 354 unit tests out of a single giant merge request to halve its size. Refactoring uses codemods with jscodeshift, a temporary mock-client hack plus enforced wait for promises in tests, linters to block regressions, and a single DRI plus one canonical doc (epic/merge request) as source of truth. Results: weeds removed, pipelines stabilise, iteration wins.

AI-written summary · about

  1. 0:00Introduction
  2. 1:10What refactoring is and why it matters
  3. 2:15Refactoring examples
  4. 3:41Directly Responsible Individual
  5. 5:28Announcing and documenting refactoring
  6. 7:12Removing undesired code behavior
  7. 8:57Manual vs automated refactoring
  8. 10:01Using code modification tools
  9. 12:11AST and code transformation
  10. 13:15Live refactoring demo
  11. 16:41Handling conditional changes
  12. 20:14Regression prevention with linters
  13. 22:00Communicating changes to avoid breaks
  14. 23:04Test compatibility solutions
  15. 25:07Imperfect supporting code
  16. 25:50Splitting and iterating refactoring
  17. 27:15Key takeaways
~/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.