Making sense of Codebase


As a software developer, you’ve probably encountered a new codebase and asked yourself, “What is happening here?” This can happen when exploring an open-source library, starting a new project, or even when trying to understand code you wrote just a few months ago.

There are different techniques for understanding a codebase, but each requires a different set of skills and motivation. Some examples include:

  • Asking a colleague
  • Reading documentation
  • Brushing up on language readability and diving into the code
  • Compiling and running the code to see what happens
  • Starting from the main function and dry-running the code in your head

While it may seem unnecessary to understand everything, even small fixes or changes can benefit from a deeper understanding of the codebase. Although there are tools like ChatGPT, co-pilot, and code whisperers that can help automate some of these tasks, they do not replace the value of a human touch. Understanding code with a human touch is essential for becoming a better developer, gaining hands-on experience, and preparing for future problems.

Knowing what works and why it works is critical to developing optimal solutions and tackling more complex codebases. The knowledge gained from understanding code will remain with you throughout your career and will help you become a better programmer.