4 ms·
Nice 10kf overview, but more hand on tips: 1. Run the program, look at stacktraces/profiler. Sometimes it's easier to analyze runtime and figure out what the p
by jakozaur 12y ago
Nice 10kf overview, but more hand on tips:
1. Run the program, look at stacktraces/profiler. Sometimes it's easier to analyze runtime and figure out what the program is doing and what are the main/common patterns.
E.g. Java - jstack, C++ - gdb, gprof
2. Use some static tools to get call/caller graph and be able to browse program quickly. Jump between definitions, see what's used, what's not.
E.g. C++ - docgen, Java - most modern IDE will do just fine
- kaokun 12y agoTools like gdb and docgen are useful for smaller open source projects, but I think they quickly loose effectiveness on a large code base. For example I think the original post's high level view would work great when starting a new job as well as when diving into an open source project. That said one step down the chain from stack traces and profiler output might be to look at log files, or run the code in verbose/debug/trace mode if it exists.