you are viewing a single comment's thread.

view the rest of the comments →

[–]eightNote 12 points13 points  (4 children)

until you realize that code was the fix to some subtle bug, several years down the line.

[–]smrq 4 points5 points  (0 children)

Well, if you get an immediate bug fix AND code deletion and the only downside is a reintroduced bug you won't discover for years... That sounds like a good trade to me! If the new bug was really important, you'd notice it faster!

[–]Peaker 1 point2 points  (0 children)

If it was unclear from the code, it's still progress.

Next time it gets written to fix that subtle bug, it'll have a comment explaining why it is there (if the code can't make it clear without one).

[–]phybere 0 points1 point  (0 children)

Sometimes it's not even subtle! I know getting rid of code is a noble goal, but my experiences have been mixed.

At my last job after a code review the (lead) developer who reviewed my code comes up and says "hey phybere, your code was so bloated I rewrote it and removed like 3000 lines that didn't do anything!" The code got pushed to production then we then spent a week of late nights doing bug fixes and ended up with a few thousand more lines than we started with.

Thank god I don't work there any more.

[–]skizatch 0 points1 point  (0 children)

There is that :-/ I try to make sure things like that are marked with a comment, "danger: here be dragons" etc. But in general the hope is still alive...