3 ms·
We have bad terminology and insufficient training I think. We are deep into metric dysfunction now thinking the repetition of very small blocks of text is waste
by hinkley 7y ago
We have bad terminology and insufficient training I think. We are deep into metric dysfunction now thinking the repetition of very small blocks of text is wasteful, even shameful.
That’s not the duplication that matters. The duplication that matters is the effort. Having to do the same action over and over, and ensuring the same result occurs. That’s expensive. That’s draining.
Trying to deduplicate code that is structurally similar but has different aims just creates a problem later on.
- dwaltrip 7y ago> Trying to deduplicate code that is structurally similar but has different aims just creates a problem later on. This is one of the most important lessons I've learned in software. Abstractions work well when the snippets in question have similar, coupled requirements. The proposed abstraction must target the shared requirements, or it will soon cause more problems than it solves as the snippets diverge due to their different purposes. Structural similarity alone provides very limited opportunity for a robust abstraction. A rough heuristic that may indicate one of these problematic abstractions is the number of special cases and if-elses that are continually being added to make it work.
- harimau777 7y agoThe issue, at least as I understand it, isn't so much in the fact that code is being duplicated. Rather, the problems that I see are: - Having lots of utility classes applied to the tags in HTML make it difficult to read. In particular, when it becomes necessary to split a tag onto multiple lines the HTML can become less effective at visually indicating how tags are nested. - Including styling in HTML obscures the intent of the HTML. For example, is this div here because this is actually a new semantic section or just because we needed somewhere to put utility classes?