Skip to main content

5 Reasons to enjoy working on Legacy code

· 3 min read

Working on legacy code has its own advantages and in this post I want to talk about how I enjoy and appreciate working on code that is dated as old as 15+ years.

You do not always get to start a project from scratch. Any software product usually evolves over time and ensuring that all the future developments are robust requires considerable efforts.

While I have worked on both new projects from scratch to legacy products and both have immense learning opportunities, I want to write about how I enjoyed working on Legacy code that was dated as old as 15+ years.

1) Code is poetry

This is the most famous wordpress tagline to which I concur. I have had amazing time going through the existing code written over span of 15+ years.

With the developer friendly tools, it is easier to debug code, so learning about why a certain piece of code was written, you learn a lot about the philosophy of the software.

2) Boosts confidence

Learning to read someone else’s code and appreciating their thought process helps you make better decisions. It gives you confidence to go with the existing solution or challenge the existing solution. Either way, it benefits the software product overall.

3) Scope of improvement

There is always the scope for improvement. I enjoyed creating Pull Requests to tackle code smells such as

  • Removing code that was specifically written to support certain IE version
  • Refactoring functions
  • Removing inline styles
  • Separating the JS from HTML code

4) Documentation

Complex software such as these that are evolved over 15 years of time have a lot of scope for documentation. Adding new comments is easy, but improving existing comments / documentation requires thorough understanding of the code.

5) Appreciation for Knowledge sharing

It is easy to complain about someone else’s code. However, I have enjoyed going through the history of the commits and the JIRA tickets dated 10 years from now and have appreciated the detailed documentation that the developers at the time wrote. It takes patience to dig through the history but it is worth the efforts.

I am thankful to detailed documentation I have, I am also responsible towards ensuring that all my commits have traceable JIRA tickets linked for anyone in the future.

To summarize

  • Embrace the code, enjoy the learning.
  • Take up the opportunity to improve the code and take complete ownership.
  • Read and Contribute to the documentation as much as possible.