3 ms·
For me this often happens incrementally. Like they started with "if (FeatureNotDisabled)" and then locally refactored the code until it was "if (!FeatureNotDis
by rabidrat 8y ago
For me this often happens incrementally. Like they started with "if (FeatureNotDisabled)" and then locally refactored the code until it was "if (!FeatureNotDisabled)". The problem is that they then didn't go back for another pass before commit, and reverse the double-negative by changing the variable name and semantics. This could be due to laziness, ignorance (it works, what's the problem?), fear (it works now, let's not break it), or time mismanagement (it took long enough to get it working, no time to make everything "perfect").
- vidanay 8y agoI could understand that evolution, but I have become convinced that this particular developer simply worked with negative logic in his brain. Even the configuration files will have: Feature1Disabled=False Feature2Disabled=True Feature3Disabled=False Instead of using feature flags to enable a feature, he used feature flags to disable features. He was very consistent and the logic is all correct, simply inverted.