3 ms·
I used to share the same example against obsession with DRY. But it's a bit more nuanced. Both options can be valid. DRY is a tangential topic, the main goal s
by hbrn 4y ago
I used to share the same example against obsession with DRY. But it's a bit more nuanced.
Both options can be valid. DRY is a tangential topic, the main goal should be to keep your code as close to your mental model as possible (also keeping mental models in sync between team members, which is quite hard).
ABC being a sequence could be a pattern, or it could be a coincidence. You can't know which one it is just by looking at the code. The knowledge whether it's a sequence or not is in the business domain and in your mental model of that domain.
You might think you're disagreeing on DRY with another team member, but in reality you two have different mental models, and one of you is using DRY to justify a his.