HACKER Q&A
📣 siltpotato

What is your approach to reading a code repo for the first time?


You click a link to a GitHub repo and read the README (I hope). Where do you usually go after that?


  👤 jason2323 Accepted Answer ✓
Oh i can answer this! Usually the best way to start off is to read the unit tests if they have any. This can usually point to what the code is trying to achieve if anything. Gives you a view of what methods are being used and for what purpose.

👤 ruairidhwm
As others have said, tests are a great place to start. They give a bit more context. I also like looking for the entry point and seeing how the environment is created, and step through it from there.

Hopefully not self promotion, but I wrote a blog on this a while back: https://ruairidh.dev/how-to-understand-a-new-codebase


👤 billconan
I would debug it. step into the code.

👤 thedevindevops
Program.cs or equivalent