Earlier quoted context omitted.
> Maintaining the wrong abstraction, or, god help, abstractions, would be even worse. Hard disagree. When you've had to chase through a change in untold and actually unknown numbers of duplications of code in different permutations and fix them because they are all on fire simultaneously, you'd disagree too. A bad abstraction would at least have had one fire in one place.
I, on the other hand, have had to burn through countless cycles of security alerts because I used a library for JSON parsing that had all kinds of other features that I didn't need or want. The security bugs were all in features I never wanted. A bit of simple duplication would have been golden.
Prefer duplication over the wrong abstraction (2016)
371–375 of 375 posts
Re: Prefer duplication over the wrong abstraction (2016)
#372Earlier quoted context omitted.
It's sensible if you have strict control of your duplications. You do have strict control of what is duplicated and where, right? Write everything twice quickly becomes write everything 4 times once a new change appears, just as quickly as it becomes write everything 8 times, and so on. I'm afraid there's no sensible soundbite developers can follow blindly.
> Write everything twice quickly becomes write everything 4 times once a new change appears, just as quickly as it becomes write everything 8 times, and so on. That's a good problem to have. Getting to 4 or 8 or 12, and then pruning it to 1 or maybe 2 or 3 clearly different cases, is better than shoehorning multiple cases into the wrong abstraction, having everything that speaks with them coupled to that and dancing…
Re: Prefer duplication over the wrong abstraction (2016)
#373Earlier quoted context omitted.
Code duplication differs from single source of truth applied to data in the sense that data is data but two pieces of code may functionally be the same (they do the same thing) but they might be semantically different in their usage (they’re advertised to achieve different things), in that case coupling them together with deduplication and forcing them to do the same thing doesn’t really make sense, and may make the…
[flagged]
https://news.ycombinator.com/newsguidelines.html
Edit: could you please not post flamebait generally? You've been doing it in other places with this account as well, and we end up banning such accounts.
Re: Prefer duplication over the wrong abstraction (2016)
#374Earlier quoted context omitted.
[flagged]
You crossed into personal attack here. Please don't do that on HN. https://news.ycombinator.com/newsguidelines.html Edit: could you please not post flamebait generally? You've been doing it in other places with this account as well, and we end up banning such accounts.