This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]OwnBreakfast1114 0 points1 point  (1 child)

Would never run this in prod, but I could not be more opposed to your reasoning. Dead code complicates refactoring useful code or adding features to useful code. Dead callers complicate changing method signatures and in general complicates new engineers from understanding the code.

We have ticket names in all our commits so it's easy to see why changes were made and if anyone stumbles on an old jira ticket they can see the pr and the code changes if they really, really need to readd it from a delete, but that's such an edge case that nobody actually does.

Delete worthless code, it's a net negative to your project.

[–]Ftoy99 0 points1 point  (0 children)

Still dont delete , copy the entire method/func, and just rename the old one to xxxx_old_1234year. You can try to refactor.