Hacker News new | ask | show | jobs
by aidos 817 days ago
That’s got “macro” written all over it.
1 comments

That's a sed /d of course. Or a "Replace all in folder" in any decent code editor.

Or a sufficiently efficient "extract to method" on a decent IDE, that notices the different occurrences even with renamed variables.

Unless those lines of code were subtly edited all over the place and needed careful and subtly different replace for each occurrence, or at last review because that's what's truly evil with duplicated code. It's forks that diverged to maintain N times in your codebase.