Deleting code means that you either:
- found a better way to do something
- found unneeded abstractions
- found unneeded functionality
Therefore, always strive to have as little code as possible doing the job. As they say in Extreme Programming, "Pay as you go: Build just enough to meet today's requirements".
You could get sad when removing code because it means that you or someone else have done something that could be considered a waste. Well, sometimes it was a waste but it won't be less a waste because you keep it. Most times the code you're about to delete served a purpose though, leading you to find the better solution.
So summing it up; Don't be sad about deleting code, love it like I do!
No comments:
Post a Comment