DEV Community

Candace Eckels
Candace Eckels

Posted on

Legacy Code

Recently I was given some legacy code in a monolithic app to take a peek at to work on how to problem solve with old code.

What I learned most from this exercise is that it is really easy to get lost in the code. I found myself in parts of the code that didn't seem to have anything to do with the questions at hand because I was trying to figure out what direction is this issue trying to point me in? Here are some tips that helped me to focus in on the issue at hand.

  1. Try and use the search function in your code editor to search possible key terms that might be used in specific files
  2. Break down the issue into plain terms. This helped me to be able to focus on the basics of what the issue is asking of me.
  3. The Schema! What is the structure of the app? What are common terms that are used throughout? (Granted the app I was looking at was pretty small so I am not sure how scalable this is for larger apps with a thousand plus lines of schema!)
  4. The gemfile! What technology is this app using? Am I familiar with this code? If not, can I use tip 1 to figure out how this code is being used?

I hope these tips were helpful and if you have any tips for me please leave them in the comments below!

Top comments (0)