r/ExperiencedDevs • • Sep 12 '23

How to quickly understand large codebases?

Hi all,

I'm a software engineer with a few years of experience hoping to get promoted to a senior level role in my company. However, I realize I have a hard time quickly getting up to speed in a new code base and understanding the details at a deep technical level fast. On a previous team, there was a code base that basically did a bunch of ETL in Java and I found the logic to be totally incomprehensible. Luckily, I was able to avoid having to do any work on it. However, a new engineer was hired and after a few weeks they head created a pretty detailed diagram outlining the logic in the code base. I was totally floored and felt embarrassed by my inability to do the same.

What tips do you guys have for understanding a codebase deeply to enable you to make changes, modifications or refactors? Do you make diagrams to visualize the flow of logic (if so, what tools or resources are there to teach this or help with this)? Looking specifically for resources or tools that have helped you improve this skill.

Thanks!

111 Upvotes

58 comments sorted by

View all comments

Show parent comment

2

u/Doctuh Engineer / 30+y Sep 12 '23

Well most code ends up being some form of data-in, data-out so its sort of like that. Put some data in the top of the maze, and try to watch it go through to where it comes out. Then you use your debugging tools/techniques to catch it somewhere inside and better understand what/why it is there.

At that point experience helps because you tend to see familiar patterns in how things are done and can extrapolate from that into larger "how this (sorta) works".

I find the "conceptual" stuff only helps when you are working on a codebase with strong "concepts". A lot of times you get codebases that go through multiple hands and the concepts themselves get muddled.