These are in no particular order. I found them by researching what methods other developers use to understand codebases that they have not seen before.
- If the codebase has tests, read the tests
- Try to write tests for the part of codebase you are trying to understand. This helps in understanding the behavior and serve as documentation
- Get overview of project. See the overall picture. How many modules it has? What are the name of the modules? Pick one module and do deep dive into it.
- Writing documentation for source code. This is a good practice to understand the codebase. I tend to prefer writing tests over documentation since the source code and tests are truth, documentation decays over time, generally.
- Find public API/function and go into details of how it achieves it's work.
- Focus on the types of the API and connect the methods based on how types are consumed.
- Pick a happy path (successful path) of a code flow, ignore the error handling and validation at first. This will help to understand what is the basic workflow.
- Do pair programming with someone on the team. This may not work however with open-source projects however.
- Run the project and trace the output.
- Ask questions. This can be from the developer on the team or user mailing lists or gitter/IRC channels for open-source projects.
- Learn to use your IDE to help navigate the project. Iteration speed matters to reproduce the steps while learning.
- https://news.ycombinator.com/item?id=8263402
- http://devblog.nestoria.com/post/96541221378/7-strategies-to-quickly-become-productive-in-an
If you see that you use a methodology that is not listed here, feel free to contribute and help others.