Hacker News new | ask | show | jobs
by dylan604 2155 days ago
# Nah, commenting out is better in case decisions are reversed.

# Once it's deleted, there's no way to get it back.

# Version control isn't reliable.

2 comments

> Nah, commenting out is better in case decisions are reversed.

But worse in all other cases. If your decision process is such that that weighs in favor of cluttering your codebase with dead code, that's a problem.

And, actually, since the commented code almost certainly isn't being maintained and uncommented for testing as the rest of the codebase evolved, it's probably not even better in the case that decisions are reversed.

> Once it's deleted, there's no way to get it back

There's rewriting it in light of the actual requirements and current state of the rest of the code base.

> Version control isn't reliable.

Neither is unmaintained, commented-out code dragged along with your code base. If your VCS isn't the vastly more reliable of those two things, that's a problem you ought to address.

(Of course, at the time of Mario 64, the calculus might well have favored a different approach.)

Man, you took that comment seriously. Doh!
# JIRA: L-2401

# Dev-only code.

# Fixme: delete before release.

Most software isn't released anymore. Most times pipelines will gobble up your changes and ship immediately after review. I don't see how this would work for your team.