Hacker News new | ask | show | jobs
by skydhash 1555 days ago
You should always be aware of the business domain of the code. My general pattern is to actually have an idea of what the software does. Then I locate where the general code is. After I ask what modules I'm interested in - most codebases have clearly delimited modules. Then I work from the entry point on that module and look on what it returns. I sometimes look at other part of the code to assert my assumptions, but generally, I stay in one place until I have a good idea of its behavior. Then after I have a good model, I move on to the next one. The goal is to understand each unit enough that I can write a couple of sentences or paragraphs about it - from functions to whole file.