2 ms·
Spicy take: Despite the amount of attention paid to code quality, it generally does not matter beyond some (extremely low) baseline. By contrast, data quality (
by JoshuaDavid 4y ago
Spicy take: Despite the amount of attention paid to code quality, it generally does not matter beyond some (extremely low) baseline. By contrast, data quality (consistency and sensibility of the data model, proper migration of old data to new schemas, alerting around anomalous data) is neglected but vitally important. Adding abstraction will usually improve your code quality metrics, but make it harder to tell where data is coming from, how it is being transformed, and where it is going. Copy/paste/modify will do terrible things to your code quality metrics, but frequently does not make your data flow harder to understand.
As such, abstraction for the purpose of avoiding copy/paste/modify is usually bad. You should just copy/paste/modify, and maybe extract out common functionality if the common functionality is obvious and well-contained.
Epistemic status: I don't fully endorse literally the above take, but it gestures in the direction of my actual opinions if you're starting from the viewpoint "Martin Fowler's Clean Code is approximately correct", which seems to be the majority viewpoint in my circles. As always, take into account the rule that you should probably reverse any advice you hear[1] -- if this take resonates with you, it is unusually likely to be bad advice for you in particular.
[1] https://slatestarcodex.com/2014/03/24/should-you-reverse-any-advice-you-hear/ https://slatestarcodex.com/2014/03/24/should-you-reverse-any...