Reading C++ Source

Recently, a cloned Unreal Engine repo locally to my PC. There are tons of file in the repo, and high quality codes. It's a great pleasure to read professionally written, not educational textbook, source code.

My question is, what is your general strategy to read and understand such a big projects for maintaining or using parts? And how do you understand which file associated with which? What is the best way to see short comes of still project to get sense which module need improvement?

Thanks in advance for every answerers.
This is what I tend to do right at the outset:

1. Get an overall understanding of the high level architecture and design philosophy. Study the the source code directory structure and identify the important subsystems.

2. Try to understand the 'normal' flow of control for a typical use-case (ie. ignore error handling during the first pass). For instance, when a particular event occurs, how does the control flow through the subsystems that are involved in processing that event

3. Pick up the source code of one subsystem that looks interesting and make a dependency chart of its components.

4. Explore the source code of the subsystem, at first using a top-down approach (start with a component at the top of the dependency chart).
I wonder if the old program "understand c++" is still being maintained and available? It could actually serve as an IDE and I used it as such with g++ for several years. It could give you a TON of info about what function is called by what and the reverse (who calls what) and had a bunch of ways to unravel code. It was very inexpensive for its power. We even set it up generate a lot of automatic documentation. Top notch tool, and IIRC there is a trial period.

@jonnin,
do you have some more information. Searching "understand c++" will show lost of courses but no apps.

Here is a book about code reading:
https://www.amazon.co.uk/Code-Reading-Perspective-Effective-Development/dp/0201799405/ref=sr_1_1?ie=UTF8&qid=1503500241&sr=8-1&keywords=Code+Reading%3A+The+Open+Source+Perspective
google failure?

My topmost hit was it (and it does seem to be ongoing, that is good).

https://scitools.com/?gclid=CIjD38qT7tUCFY48gQoduScIZw

Last edited on
USA. I get the scitools as #1 from your link also. /shrug anyway, that is the one you want. It seems to still have a demo.
Must be an issue with the location or language in the browser. That is what I get. Firefox with German living in the UK.

https://pasteboard.co/GH9CqDm.jpg
The scitools link is an ad. It isn't a search result.
try https://scitools.com/trial-download-3/

I can't test this, can't install stuff on my work pc at random and my home PC already has the tool.
Last edited on
Topic archived. No new replies allowed.