3 ms·
I worked with someone who never threw old code away. It was amusingly difficult to try to understand what his code did. Typically shitloads of php files that di
by sunkencity 17y ago
I worked with someone who never threw old code away. It was amusingly difficult to try to understand what his code did. Typically shitloads of php files that didn't do anything and in the files that actually did something stuff like
if (false) { ... large incomprehensible code block .. }
was common. Why comment out stuff when you can just disable it programmatically?
- davidw 17y agoI did some work at a place where they had a PHP class called something like "foobar_2004_08". Given that it was 2006, I asked about axing it, but was told it was still in use. Shudder
- theli0nheart 17y agoUgh, makes me sick to my stomach.
- scotty79 17y agoThe cause could be that inside the block there were already the /* */ comments, and editor did not have single keystroke option to add // at the beginning of each selected line.
- sunkencity 17y agono. he used Eclipse. Apple-7 would have worked.
- scotty79 17y agoOk. So I have another theory. In place of false there was previously some ugly condition and he wanted get rid of the things that were done on this condition with minimal necessary effort hoping that someone in the future with more time (maybe even himself) will clean that up since doing cleanup in such case is not hard thing to do.
- ajb 17y agoThere is actually a reason for doing that, as opposed to commenting it out - at least in compiled languages, the compiler will complain if code changes elsewhere conflict with it, so it doesn't bitrot as fast.