Comment by nobodyandproud
5 years ago
> It's OK to duplicate code in places where the abstractions are far enough apart that the alternative is worse.
Something I’ve mentioned to my direct reports during code reviews: Sometimes, code is duplicated because it just so happens to do something similar.
However, these are independent widgets and changes to one should not affect the other; in other words, not suitable for abstraction.
This type of reasoning requires understanding the problem domain (i.e., use-case and the business functionality ).
No comments yet
Contribute on Hacker News ↗