I have a hot take on this, which I hope will resonate with at least a few people: duplication, even of blocks of up to a few long statements, rarely bothers me, because I remember all the duplications as a single instance. I have extra ordinary memory, and this makes a huge difference in how I think of and write code. Or anything really. I save everything I've ever written, like bash history, but everything, and refer beck to it and copy paste somewhere else. I wonder if anyone else has this. This doesn't affect how I think of production code, but it hugely affects my work flow.