Lead Product Evangelist @Kentico, Founding partner @craftbrewingbiz. love to learn / teach web dev & software engineering, collecting vinyl records, mowing my lawn, craft 🍺
DRY is a goal unto itself or Copying and Pasting Code is BAD!
My mantra is, don't try to DRY before you are WET (Writing it Every Time).
Having good tests can go a long way towards ensuring duplicated code continues to function correctly after modifications.
And consolidating duplicated code too early can result in an abstraction that serves too many roles.
Different parts of your code will change at different speeds and for different purposes. If you force two parts to change at the same speed and for the same purpose even if they wouldn't had they not been DRY'd up, you will box yourself into corners that are hard to get out of.
Look for the patterns in your code before you start consolidating replication.
Let your application's patterns reveal themselves to you naturally instead of trying to force them prematurely under the banner of "DRY".
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.
DRY is a goal unto itself or Copying and Pasting Code is BAD!
My mantra is, don't try to DRY before you are WET (Writing it Every Time).
Having good tests can go a long way towards ensuring duplicated code continues to function correctly after modifications.
And consolidating duplicated code too early can result in an abstraction that serves too many roles.
Different parts of your code will change at different speeds and for different purposes. If you force two parts to change at the same speed and for the same purpose even if they wouldn't had they not been DRY'd up, you will box yourself into corners that are hard to get out of.
Look for the patterns in your code before you start consolidating replication.
Let your application's patterns reveal themselves to you naturally instead of trying to force them prematurely under the banner of "DRY".