~/talk

Surgical Refactoring of Non-Tested Code – A Worked Example

Talkat Craft Conference 2021 · 2021-06-02..06-04· [legacy-modernisation, testing]
slides:none on file

Method extracts impure chunks from a small C++ trivia codebase, converts the deterministic parts into pure functions, moves them into a separate file (CLion and compiler errors guide dependency injection), and adds data-driven tests (and notes how to use property-based tests or Spock in JVM languages). Refactoring collapses duplicated creators into a single generator, then groups helpers into classes; the process produces a tested result with 167 assertions checked and incremental commits to keep behavior unchanged.

AI-written summary · about

  1. 0:00Start
  2. 0:06Alexandre Bobwaka
  3. 9:17Refactoring Move Function
  4. 12:27Data-Driven Tests Approach
  5. 26:37Test Separation
  6. 31:43How Do You Move Pure Functions into a Class
~/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.