Master the collocations for refactoring, extracting, renaming, and modernising a codebase.
0 / 5 completed
1 / 5
The team decided to ___ the payment module to improve readability without changing its behaviour.
Refactor (code/a module) is the precise technical collocation for restructuring existing code without changing external behaviour. 'Rewrite over' implies replacement. 'Clean away' is informal. 'Fix along' implies bug fixing, not restructuring.
2 / 5
A good first step was to ___ the date formatting logic into a shared utility library.
Extract (logic/a method) is the standard refactoring collocation, from Martin Fowler's catalog of refactoring patterns (e.g., Extract Method, Extract Class). 'Pull out into' is informal. 'Move away' implies deletion. 'Take out along' is not standard.
3 / 5
The team agreed to ___ all occurrences of the deprecated `getUserData` function across 47 files.
Rename (a function/variable) is the standard refactoring term from the 'Rename Method' pattern. Modern IDEs support 'rename refactoring' automatically. 'Change name of' is wordy. 'Re-label' and 'retitle' are used for documents and UI, not code.
4 / 5
To make the authentication service easier to test, the team worked to ___ the logic and reduce coupling.
Simplify code/logic is the natural refactoring collocation for reducing complexity. 'Make simpler around' is informal and wordy. 'Reduce down' is redundant. 'Smooth out all' is informal and non-technical.
5 / 5
The CTO approved a six-month programme to ___ the entire data layer from MySQL to PostgreSQL.
Migrate the codebase/data layer is the standard collocation for moving from one technology to another as part of a modernisation effort. 'Move over around' and 'shift across all' are informal and non-technical. 'Transfer away' implies a one-time handover rather than a structured migration.