Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you remove/clean-up code which is no longer used?

Tags:

refactoring

We have a project which had to be radically descoped in order to ship on time. It's got a lot of code left in it which is not actually used. I want to clean up the code, removing any dead-wood. I have the authority to do it and I can convince people that it's a commercially sensible thing to do. [I have a lot of automated unit tests, some automated acceptance tests and a team of testers who can manually regression test.]

My problem: I'm a manager and I don't know technically how to go about it.

Any help?

like image 245
clarke ching Avatar asked Feb 04 '23 05:02

clarke ching


1 Answers

make sure it's all checked in to your source-control system and tagged as a specific version (prerelease or something you can remember)

back up the code onsite and offsite

run a static analysis tool over the code to identify the deadwood

delete the deadwood

rebuild and re-run all tests

or you could just ignore it ;-)

like image 79
Steven A. Lowe Avatar answered May 21 '23 20:05

Steven A. Lowe