DEV Community

Candace Eckels
Candace Eckels

Posted on

1

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!

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

Eliminate Context Switching and Maximize Productivity

Pieces.app

Pieces Copilot is your personalized workflow assistant, working alongside your favorite apps. Ask questions about entire repositories, generate contextualized code, save and reuse useful snippets, and streamline your development process.

Learn more