3 ms·
For most modern programming problems that we get paid to solve, a bit of duplicate or similar looking code is the least of our problems. Conceptually integrity
by semicolon_storm 4y ago
For most modern programming problems that we get paid to solve, a bit of duplicate or similar looking code is the least of our problems. Conceptually integrity and managing dependencies/coupling is far more important.
- klyrs 4y agoWho is "we" and do you have statistics behind that "most?" And why is "paid to solve" relevant to the discussion? It's okay to say that what I'm saying about my personal experience doesn't resonate with your personal experience, but hand-waving at a nebulous authority isn't making a case. I use compile-time flags to deduplicate logic because refactoring is a nightmare if tens to hundreds of lines of code are turned into boilerplate. That is to say, I ensure conceptual integrity by maintaining a single source of truth. The nice thing about relatively dry code is that if you need to decouple it, you can easily just duplicate the code in question and run with that. If you have a dozen slightly-different copies of the same boilerplate, it's very rare in my experience for the variations to be well documented, so it ends up taking a lot of work to figure out why the variations exist -- and the real pitfall that I've seen time and time again is that a bug is found in one variant, fixed there, and not propagated to the other variants.
- rcarr 4y ago> Who is "we" and do you have statistics behind that "most?" I love that you've called this out. So many people try and justify their coding preferences by referring to this mythical 'we' or the 'coding community' who have apparently all agreed to to some certain standard and everyone should just fall in line and get behind it without asking any questions. It's such a load of bullshit.