3 ms·
Same here, unfortunately. It drives me nuts. It's oh so easy and tempting to vialoate the DRY principle. But what's even worse is people actually defending thei
by stinos 12y ago
Same here, unfortunately. It drives me nuts. It's oh so easy and tempting to vialoate the DRY principle. But what's even worse is people actually defending their Ctrl+C Ctrl+V behaviour with false/uninformed arguments such as
- why waste time with creating a function when I can copy-paste?
- but I'm never going to have to change this code anymore
- but it's more readable else I have to figure out what the function will do, browse to it, ... (well, good luck navigating any codebase at all)
- but it occurs only twice (ok, twice is debatable, but still: before you know it the same is used again in another place an there we go again..)
- but it's faster because it doesn't require an actual function call (this is by far the worst one: they claim this without having even measured it, without having checked if there even is a bottleneck, without realizing that in compiled laguages any decent optimizer would inline and generate assembly anyway)