4 ms·
I've seen patches in production code that amount to 20 if else's to handle specific inputs rather than the correct input. I just inherited a system that uses t
by noir_lord 9y ago
I've seen patches in production code that amount to 20 if else's to handle specific inputs rather than the correct input.
I just inherited a system that uses trim everywhere on everything because originally they didn't sanitise the inputs.
Rather than hunt down all the inputs they just did trim(foo) == trim(bar) making it worse is that it's PHP and so not only do they trim things but they type-coerce them, good luck trying to reason about that 7 layers deep :|