Hacker News new | past | comments | ask | show | jobs | submit login

I agree that recovering from VCS is something that never actually happens. Mostly because the code is forgotten.

Still, commented-out code is generally worthless and should be deleted. Unless it is actively being worked on and only commented out to achieve some short-term goal. In which case it should also not be commented out but instead live on a branch.

Occasionally you might have two flows and you're not sure which is best. But in that case keep them in separate functions and one of those will not be used but can still be covered with tests. And all static analysis tools will work on it. Just needs a comment about why this unused code is there.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: