TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: What software engineers/programmers to make sense of large code?

2 pointsby SE_Studentalmost 6 years ago
I'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.

3 comments

etermalmost 6 years ago
FYI, &quot;Thousands&quot; of lines isn&#x27;t particularly, a large code-base, I&#x27;m a developer who tends to specialize in legacy code bases and I&#x27;ve seen aspx (asp webforms) pages with 5k+ LOC in a single file.<p>Also, you haven&#x27;t really defined what &quot;makes sense&quot; means for you. Does that mean being able to refactor it, maintain or just evaluate it?<p>That said, the following are essential:<p>1. An IDE with a fast token-based search<p>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&#x27; &quot;Go to anything&quot; search that resharper&#x2F;rider has is unrivalled here, you can quickly see partial matches and the type of match (function, variable, etc)<p>2. An IDE with a text editor that won&#x27;t choke with 5-10k LOC files.<p>If your environment is freezing up any time you open a certain file then you&#x27;ll have no chance if (and you likely will, for a large enough project) you encouter a monster file.<p>3. Pen and Paper<p>Don&#x27;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&#x27;t crash and if you think something is wrong you can easily throw it out and start again without considering that time wasted.
评论 #20559242 未加载
streetcat1almost 6 years ago
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 &#x2F; Processing &#x2F; 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 &#x2F; data structure. 6. For each class add the core methods where all the business logic resides.<p>BTW thousands line of code is NOT a big code base.
billconanalmost 6 years ago
I use debugger to trace it, instead of looking at the source code.<p>opengrok is also a good tool for searching.