Hacker News new | ask | show | jobs
by osivertsson 4511 days ago
If you are lucky enough that the large and complex codebase has extensive system-level and unit-tests, then that is where I would start.

Hopefully it is easy to get the codebase up and running so that you can explore it hands-on and try both happy-path cases and what happens when things go awry.

Walk through a feature of the code manually or step through it using a debugger while drawing boxes on how stuff fits together, and what the main building blocks are.

It will always take time to really understand a new large and complex codebase. If it is high-quality code it is easier, if you have experience with similar products it is easier. But to really feel that I grasp the really good parts and the dark and dangerous corners of a new codebase always takes me months.

1 comments

I've been using the step-through-with-a-debugger approach, but what I'm missing are tools for visualisation. Drawing boxes gets way too complicated way too quickly. I'd like to have something like a UML diagram, but as far as I know UML can't really be used for that purpose.