Feature migration instrument № 06

Equivalence Cartographer

When feature Y resembles feature X, stop wandering the codebase. Trace every place X lives, build its twin, and let the missing bridge reveal itself.

Map the feature

Pair the implementation trail.

Select an amber Google +1 trace, then its cyan LinkedIn equivalent. Five pairs complete the feature. One cyan line is a plausible impostor.

Existing feature X · googlePlusOne
New feature Y · linkedIn
Choose one trace from each side.0 / 5 mapped
Bring your own code

Run the lantern.

Paste a compact code sample and name the old and new feature tokens. The scanner finds lines containing X and checks for a line with the equivalent Y substitution.

THE METHOD
1. Find every line belonging to X.
2. Replace X with Y and look for its twin.
3. Implement whatever remains dark.
4. Review false positives with a human brain. Annoying, but still fashionable.

This little instrument was inspired by Jon’s “Programming by Equivalence”, a satisfyingly mechanical way to implement a sibling feature and know when the trail is complete.