3 ms·
Yeah when I find duplicated code I always ask myself is this duplicated because this is representing the same domain concept in two different places? Or is it
by JamesBarney 10y ago
Yeah when I find duplicated code I always ask myself is this duplicated because this is representing the same domain concept in two different places? Or is it duplicated by coincidence?
I'm much more aggressive about refactoring the former than the latter. When I was first starting off it was always hard for me to tell the difference so I abstracted a lot of things that I shouldn't have, and you could tell from the terrible method names that follow leaky abstractions.