3 ms·
The basics steps to follow are: 1) Make a note of all the files. Well named files tell what they do. If they do not, then its probably in the comments. Its imp
by z3phyr 8y ago
The basics steps to follow are:
1) Make a note of all the files. Well named files tell what they do. If they do not, then its probably in the comments. Its important that you know what each file is for.
2) Find the entry point (main, WinMain, _main_)
3) Make a note of all the major macros, structs and functions you see. Note them down. Do it recursively as you go from main towards the other defs.
4) (optional) Read the changelog and the documentation if available.
5) It will be easier to keep track of what you are reading if you note it down. Then go over and read, and keep making notes. Keep detailed but easy to find notes.
6) Please keep making notes.
7) Make notes as you read
8) Did I stress on making notes?
This method helped me a lot :) Happy Hacking
- ryanwaggoner 8y agoStrongly agree with everything here, except perhaps the bit about notes.
- baud147258 8y agoNot enough notes for your taste?
- rightbyte 8y agoIn big project reading recursivly from the entry point is essentialy to say "read it all". With code generation or libs there might even be no entry point in the repo source code. I would say go from the edges of the call tree towards the root but not all the way to it. Otherwise I get lost. Just guess which edges are interesting and start from them.
- gHosts 8y ago> Make notes as you read Make executable notes as you read. FTFY ie. Add in asserts or logs that check what you believe and log (or abort) if what you believe is false. Otherwise it's idle speculation that never gets falsified.