~/talk

Refactoring Legacy Code guided by Simple Design

Talkat Agile Singapore Conference 2016 · on Monday, 2016-10-17· [legacy-modernisation]
slides:none on file

Walks a messy Java production module down to a safe-to-change shape by deleting dead code, moving constants into consumers, extracting methods, renaming for intent, and adding characterization tests that lock current behavior. Uses Eclipse shortcuts, UC Detector to find unused publics, Mockito for mocks, and EclEmma/Emma for coverage. Starts from a file util claimed at ~500,000 lines, spends about 1.5–2 hours of work, gets full coverage on the focal method, and checks incremental commits proving the refactor compiles and tests pass.

AI-written summary · about

  1. 0:00Intro
  2. 1:25Code base overview
  3. 2:41Legacy codebase overview
  4. 6:09Find more dead code
  5. 7:02Delete unused methods
  6. 11:30Remove unneeded classes
  7. 16:42Rename vigorously
  8. 17:45Extract method
  9. 19:41Characterization tests
  10. 28:39Unit tests
  11. 31:01Extract code
  12. 33:26Illegal argument exception
  13. 33:59Job parameters
  14. 36:16Mocks
  15. 41:15Ifelse
~/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.