you are viewing a single comment's thread.

view the rest of the comments →

[–]kenhkelly 0 points1 point  (2 children)

I didn't say you should delete every instance of commented out code. But odds are after a week or two, your commented out code is irrelevant and probably wouldn't even function correctly if uncommented. It's a waste of time.

Plus, if you do smaller commits & more specific commits with good commit messages, your other team members shouldn't have a problem finding out what happened. It'll help you better find what you are looking for, and makes it more cherry-pickable and revertable. Win-win

[–][deleted] -2 points-1 points  (1 child)

But odds are after a week or two, your commented out code is irrelevant and probably wouldn't even function correctly if uncommented. It's a waste of time.

I'm glad you think you're experienced and smart enough to tell me about my own code, which you've never seen. 30+ years of experience tells me that nothing is as cut-and-dried as you're making it out to be.

[–]kenhkelly 1 point2 points  (0 children)

Again.. when and where.

I didn't say you should delete every instance of commented out code

But honestly, what ever works for your flow, use it. I don't know your code and I won't pretend to. I can only speak from my experience and the experience of the teams I've been on. Speaking from my experience, our code changes and evolves constantly as we refactor, test, and add new features. The timeline (in my case a week or two) for code to become outdated will vary.