DRY (don’t repeat yourself) is the only programming rule everyone follows blindly wether beginner or senior.

Avoiding some code duplication brings coupling but coupling is a way more dangerous beast.

dry vs coupling meme

I say fuck DRY !

I say repeat yourself !

The default rule must be duplicate. And then, after a while, if the same things change at the same time and for the same reasons (as Robert C. Martin says) then you start to mutualize some code.

Clean Code Technical Debt Coupling Code Duplication