
Ask HN: What software engineers/programmers to make sense of large code? - SE_Student
I&#x27;m interested to know if there are tools or programs that help software engineers understand big source code bases (projects that have lines of code in the thousands), like how to understand all the parts involved.
======
eterm
FYI, "Thousands" of lines isn't particularly, a large code-base, I'm a
developer who tends to specialize in legacy code bases and I've seen aspx (asp
webforms) pages with 5k+ LOC in a single file.

Also, you haven't really defined what "makes sense" means for you. Does that
mean being able to refactor it, maintain or just evaluate it?

That said, the following are essential:

1\. An IDE with a fast token-based search

This is the number one requirement, you need to be able to search for a badly
remembered function or variable name to find the method. Jetbrains' "Go to
anything" search that resharper/rider has is unrivalled here, you can quickly
see partial matches and the type of match (function, variable, etc)

2\. An IDE with a text editor that won't choke with 5-10k LOC files.

If your environment is freezing up any time you open a certain file then
you'll have no chance if (and you likely will, for a large enough project) you
encouter a monster file.

3\. Pen and Paper

Don't be scared to write things down, draw diagrams and write down your mental
models as you go. A pen and paper is essential, it persists through all
sessions, can't crash and if you think something is wrong you can easily throw
it out and start again without considering that time wasted.

~~~
SE_Student
> Also, you haven't really defined what "makes sense" means for you. Does that
> mean being able to refactor it, maintain or just evaluate it? I meant to be
> able to understand the components that make up the software, so to be able
> to maintain it and contribute to code base.

thank you for the reply.

------
streetcat1
1\. First see if you can get the use cases, I.e. what are the requirements for
the system. 2\. Choose 1-3 core use cases. Analyse those use cases - Data in /
Processing / Data out. 3\. Draw UML diagram of the components in the systems.
4\. Trace each use case end to end with either a debugger or just code
reading. 5\. Along the way, draw UML diagram of the class / data structure.
6\. For each class add the core methods where all the business logic resides.

BTW thousands line of code is NOT a big code base.

------
billconan
I use debugger to trace it, instead of looking at the source code.

opengrok is also a good tool for searching.

