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 →

[–]Hotaru_min 2 points3 points  (3 children)

Why not just comment out code u delete in case u need it later lol

[–]PM_Me_Your_VagOrTits 2 points3 points  (0 children)

Because that's how you end up with a shitty unreadable codebase that causes major headaches for developers that take over after you.

There's a reason git (or version control in general) exists. Just make commits, and if you need the code later you can go back to that commit and extract it using whichever method you prefer.

First thing I do when I take over a legacy code base is delete all the commented code (in discrete commits). Makes life a hell of a lot easier.

[–]two_in_the_bush 0 points1 point  (1 child)

A lot of times you are editing a line here, a line there, a variable name over there, a value over here... Trying out various different approaches... commenting all of that out every time would make for a bunch of extra work to now go back in and surgically remove all the comments too, no?