Ask HN: How do you effectively read code from someone else

3 points by pacomerh ↗ HN
What are some of the techniques you use to read and understand a code base from someone else, say open source libraries, frameworks, etc.

Do you just do lists (bullets of functions, etc), maybe mind maps?, abstractions? or do you just straight up top-down read it and get it.

I found that this is sometimes not an easy task since keeping track of dependencies and/or async flow is not a trivial thing. I personally just try to abstract as much as possible and then go deeper into each part (as needed), but maybe you have a better method.

1 comment

[ 2.6 ms ] story [ 14.7 ms ] thread
great question! I also find it more difficult to familiarize myself with the structure of anything I didn't build, as architecture is rarely made clear by file-system hierarchies and everything is just sort of informationally flat at first, until some sense of structure appears.

were there a tool (ha!) that could make some schematics and reveal info across languages and coding styles... but this tends to be ones imagination aided with bits of paper or whiteboard.

docs and comments help.