~/talk

Testing Legacy Code & Refactoring Patterns

Talkat Devnexus 2025 · 2025-03-04..03-06· [testing, legacy-modernisation]
links:none on file
slides:none on file

Practical Java refactor recipes that keep public signatures intact: use IntelliJ refactor actions (Control‑Alt‑Shift‑T, Shift‑F6, Control‑Shift‑T) to extract delegate/class (phone number from Person), extract interface (TokenWallet), and introduce functional parameters to remove new/static calls so tests avoid PowerMock. Demo projects include a three‑class Blackjack and wallet; patterns shown: decorator via wrap class, sprout method/class, parameterized constructor. Claims: duplicate then refactor wins over heavy mocking, lambdas simplify tests, and TDD works in brownfield code.

AI-written summary · about

  1. 0:00Introduction to legacy code
  2. 2:08Legacy code principles
  3. 6:06Test-driven development
  4. 11:17Testing and mocking
  5. 12:51Extract delegate pattern
  6. 17:16Refactoring in IntelliJ
  7. 25:01Extract interface pattern
  8. 29:30Parameterizing methods
  9. 32:53Overcoming static calls
  10. 37:54Constructor refactoring
  11. 42:29Sprout and wrap patterns
  12. 47:02Decorator pattern
  13. 52:20Advanced refactoring tools
  14. 55:52Refactoring best practices
~/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.