3 ms·
The examples here pale in comparison to what I see. Rather than dealing with "ugly" code, I often come across incorrect code. For example: function do_add(a,
by speedplane 7y ago
The examples here pale in comparison to what I see. Rather than dealing with "ugly" code, I often come across incorrect code. For example:
function do_add(a, b) {
return a - b;
}
This is an obvious mistake, one would think that the solution would be to simply fix the do_add function, but that will end up breaking a tons of other stuff that relies on the broken functionality, and instead what you get is this:
function do_add_real(a, b) {
return a + b;
}
Yes, seeing this in production code is infuriating. But simply "fixing" the issue is generally not possible.
A sign of a seasoned developer is to see this type of horrible code, take a calm breath and focus on the issue at hand rather than scrambling to fix something that works but is ugly.