2 ms·
Hence why I am rather looking if two pieces of code change together, opposed to just looking the same. If I need to introduce the same feature in multiple plac
by tetha 2y ago
Hence why I am rather looking if two pieces of code change together, opposed to just looking the same.
If I need to introduce the same feature in multiple places in roughly the same way, that's a decent indication code wants to be the same and wants to change together. That's something to consider extracting.
Fixing the same bug in several places is a similar, but weaker indication. It's weaker, because a bug might also occur from using a framework or a library wrong and you do that in several places. Fixing the same business logic error in several places could mean to centralize some things.