3 ms·
I’ve done this a few times. Boy do some people get mad. In one particular case we had two implementations of some complex code with security implications. It w
by hinkley 4y ago
I’ve done this a few times. Boy do some people get mad.
In one particular case we had two implementations of some complex code with security implications. It wasn’t working with a new feature, and the author gave up and put me on the case. One implementation took an array, the other a single instance, a couple blocks were in different order and some variable names were different.
So I diff them against each other, got them identical except an outer loop, then fixed his bug.
His lead found me the next day, “why did you put this duplicate code here?” I didn’t. I just revealed it. “Oh”
Three hours later, “I removed that duplicate code.” I did not temple my fingers and say “excellent” except inside my own head.
And that is how I learned to use nerd sniping for good, not evil.