I just ripped out one of those annoying little bits of code; the ones where you check 3 or 4 times saying "are you absolutely sure you want this, it really seems like a bad idea, it's going to cause this problem and that problem and be a pain to implement". It's not that it's particularly large, only 5 or 6 lines of code, but the logic is just messy from the ground up, and getting all the cases to work requires sitting and thinking for 10 minutes or so about all the possible cases that can come up.
Then you deploy and someone says "oh, found a bug, it does this and this and this"... this and this and this happening to exactly match the specified behaviour. You feel good for a few moments, thinking "yay, I got through to them", then you look at the hairy little piece of code and think "but I slaved over you, you cute little thing with your funky multi-pass filtering and filling, for so long, and now I must kill you".
You don't actually kill it though, you can't do that... instead you just comment it out, thinking maybe some day the spec will change again and that hard-won logic will become useful again.
Pingbacks are closed.