3 ms·
It's also useful to look at not just the duplication but the code itself. In this case, it was code for geometry which is not like to change all too much. Ofte
by jrumbut 7y ago
It's also useful to look at not just the duplication but the code itself. In this case, it was code for geometry which is not like to change all too much.
Often the difference between harmless but ugly looking duplication and duplication that is actually harmful relies on the semantics of the code and not just its appearance.
- shkkmo 7y agoIt wasn't code for geometry, it was code for manipulating geometric shapes via UI. the article specifically mentions that custom behavior was eventually needed: > we later needed many special cases and behaviors for different handles on different shapes. My abstraction would have to become several times more convoluted to afford that, whereas with the original “messy” version such changes stayed easy as cake.