3 ms·
I feel bad to say this, but the practical world has burned me so many times that I simply can't trust anything said after a comment delimiter. If it's not in th
by falcolas 10y ago
I feel bad to say this, but the practical world has burned me so many times that I simply can't trust anything said after a comment delimiter. If it's not in the code, it doesn't have any impact on what the code is actually doing, making it redundant at best, and misleading at worst.
For that reason, I find myself constantly reverse engineering code. If I am tracking down a bug and run across a bit of obfuscated code which has the comment "optimized hotspot sorting", I'm going to assume that it's wrong. I'm going to take the time to reverse engineer that obfuscated code, to make sure that the code is actually sorting, that it it an actual hotspot, and that it's not the cause of the bug I'm chasing down.
I guess I use it as a negative signal: "the comment says the code does X, I need to verify that it actually does X, correctly". "Optimized" code blocks and comments taken as the truth have pointed me at more bad code than good code.