DEV Community

Discussion on: How it's like to refactor code, written by other developer?

Collapse
 
cseeman profile image
christine

This as been every job I have ever had. Some legacy code is worse then others! I typically term it code archeology. Hopefully you have some tests, that gives you some leeway with the code and can help you understand what it does. When I have to walk through new code I pick a direction, either UI on down, or start with the backend/db and work your way up through a workflow. Pick a feature, and try to understand how it works top to bottom.

If there are no tests, add some as you go. You can test how you think it is working, it will help your understanding, as well as improving test coverage and maybe even code quality.