Practise the standard verbs for safely refactoring undocumented legacy code.
0 / 5 completed
1 / 5
Fill in: 'We ___ a characterisation test around legacy code before changing a single line, so the old, undocumented behaviour is captured and can't silently drift.'
We 'write a test' — the standard, simple collocation for creating coverage before refactoring risky code. The other options are less idiomatic here.
2 / 5
Fill in: 'Refactoring a legacy module with no tests and no documentation can ___ a subtle behavioural change unnoticed until a customer reports it weeks later.'
We say an untested refactor will 'leave' a change unnoticed — the standard, natural collocation for the resulting risk. The other options aren't idiomatic here.
3 / 5
Fill in: 'We ___ the blast radius of a legacy change carefully, tracing every caller, before touching a function nobody on the current team has ever read.'
We 'assess a blast radius' — the standard, simple collocation for judging how far a change might reach before making it. The other options are less idiomatic here.
4 / 5
Fill in: 'We ___ legacy code in small, reviewable steps rather than one sweeping rewrite, so a reviewer can actually reason about each individual change.'
We 'refactor code' — the standard, simple collocation for restructuring existing code without changing its behaviour. The other options are less idiomatic here.
5 / 5
Fill in: 'We ___ every assumption baked into a legacy function against current requirements, since code written years ago often encodes a rule nobody still believes.'
We 'question an assumption' — the standard, simple collocation for challenging inherited logic before preserving it further. The other options aren't idiomatic here.