
Ask HN: How do you navigate a new codebase? - externalpurs
Let&#x27;s say you want to contribute to a large open source codebase like rails, or openssl. How do you go about learning the ins and outs, are there any tricks?
======
ralmeida
There was a previous discussion here on HN that covered this in depth. You may
find it interesting:

[https://news.ycombinator.com/item?id=9784008](https://news.ycombinator.com/item?id=9784008)

In short, top-voted strategies include:

\- Try to find out "hotspots" in code using some scripting (e.g.
[https://github.com/gilesbowkett/rewind](https://github.com/gilesbowkett/rewind)).
According to user tessierashpool on the last thread:

> we tend to view files in a list, but in reality, some files are very
> central, some files are out on the periphery and only interact with a few
> other files

So, finding out where most things happen in the project is a good way to get
up to speed.

\- "Deep-diving": starting from a high-level point (say, the moment you type
_ssh-keygen_ on your terminal), go down the subroutine rabbit hole. You're
likely to cover a lot of ground this way.

But really, read the previous discussion, many many great strategies shared -
many of which I already used before reading that discussion and some I've
incorporated since.

------
J_Darnley
I try to find the place I need for the feature I want to add. If I can't find
it then I ask. If I don't have a feature I want to add I ask myself why I'm
looking at the code.

------
flippant
Look at the tests and see what breaks them.

------
_RPM
openssl and rails are two completely different set of circumstances. For the
former, you should look into unix debugging tools like `gdb`. You can trace
the execution of the program line by line

------
vmarshall23
printf :-/

