No, but also yes,
2 pieces of code could be doing the same thing for different reasons and we might not want changes to the way our first piece of code to change how our second piece of code behaves. Writing the same code multiple times but for different reasons isnt repeating yourself.
If however, we find ourselves reusing a piece of code that would have to be changed at all the places we pasted it into for the same reason we are violating dry and making our work more difficult and our code harder to change/maintain.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
No, but also yes,
2 pieces of code could be doing the same thing for different reasons and we might not want changes to the way our first piece of code to change how our second piece of code behaves. Writing the same code multiple times but for different reasons isnt repeating yourself.
If however, we find ourselves reusing a piece of code that would have to be changed at all the places we pasted it into for the same reason we are violating dry and making our work more difficult and our code harder to change/maintain.