3 ms·
Agreed. I think this is actually dangerous advice. While I agree that the wrong abstraction can cause lots of pain, the repetition of a bug through duplicate co
by bluejekyll 10y ago
Agreed. I think this is actually dangerous advice. While I agree that the wrong abstraction can cause lots of pain, the repetition of a bug through duplicate code is arguably a worse issue.
One example might be not using an abstraction for accessing filesystem resources in a web based service. You might end up duplicating a ton of code that improperly takes a string from a request without sanitizing it and then have a massive security problem all over your code.
- thinkloop 10y agoThis would not be a candidate for duplication tho, because the underlying intent is also logically the same. Author is talking about things that coincidentally happen to have similar code at the moment, but are fundamentally and logically unrelated, having a high likelihood of diverging in the near future.
- bluejekyll 10y agoI understand the intent. I still believe the advice is dangerous if improperly applied.
- therealjumbo 10y agoThat's true for all advice, especially in software development.
- new_hackers 10y ago"Brush your teeth" is dangerous advice if improperly applied.