Prefer duplication over the wrong abstraction (2016)
sandimetz.com
Prefer duplication over the wrong abstraction (2016)
1–10 of 375 posts
Re: Prefer duplication over the wrong abstraction (2016)
#2Re: Prefer duplication over the wrong abstraction (2016)
#3Re: Prefer duplication over the wrong abstraction (2016)
#4Do you want to iterate using for loop or using .iter().step(2).map()?
I would rather have consistency than a mixed bag of levels of abstractions.
Re: Prefer duplication over the wrong abstraction (2016)
#5The Node ecosystem is full of wrong abstractions.
Re: Prefer duplication over the wrong abstraction (2016)
#6Re: Prefer duplication over the wrong abstraction (2016)
#7There has been growth since but it's been concentrated into fewer channels and somewhat industrialized.
Re: Prefer duplication over the wrong abstraction (2016)
#8This is the biggest lesson I got from LMMs. I have a 1 million LOC vibe coded project that I can only imagine would fit in a few hundred thousand lines. But it's still holding up, I expected some kind of development collapse long before this point.
OP is right that code duplication is far cheaper than the wrong abstraction, but the opposite is also true - the right abstraction is far cheaper than code duplication.
Re: Prefer duplication over the wrong abstraction (2016)
#9The problem with coming up with a rule that works for everyone is that everyone have a different idea of what makes a good abstraction. Do you want to iterate using for loop or using .iter().step(2).map()? I would rather have consistency than a mixed bag of levels of abstractions.
I don’t think it matters, specially for sort sized loop scopes
Re: Prefer duplication over the wrong abstraction (2016)
#10it wasn't received well and senior developer told me that 'good developers know exactly what patterns to use all the time before writing any piece of code and that he will clean up my mess'
long story short his refactoring caused what was otherwise a stable system into a complete mess and it reminded me of Nassim Taleb's book