05
Change Function Declaration
Goal
Function names match what they actually do; parameter lists carry only what the function needs, in the order callers expect.
Before the refactoring
function circum(radius) {
return 2 * Math.PI * radius;
}After the refactoringfunction circumference(radius) {
return 2 * Math.PI * radius;
}Savings
Call sites read fluently; mismatches between expectation and behavior surface immediately at the boundary.
Note
Mass renames or signature shifts ripple to every caller; refactor in tooling-supported steps and update tests with each batch.