TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How do I dive into a bigger codebase?

9 点作者 s4chin超过 9 年前
All I have done till now is write and read code which was small in size. How do I get started with reading a bigger codebase? For ex. The Chromium Project, etc

4 条评论

MarkCole超过 9 年前
Having recently done this what I like to do is perform some actions, and follow it through the codebase. So for example on a web project, what happens when I hit the index page? First it hits the router&#x2F;dispatcher, it is handed off to this controller, the controller calls the database. Etc.<p>So for the chromium project I&#x27;d try to work my way through, by performing an action. Then asking how it is performed, and follow the code through.<p>Hope this helps.
hacknat超过 9 年前
I&#x27;m reiterating what&#x27;s already been said by others, but as more explicit instructions:<p>1. Download the code and figure out how to build it.<p>2. Figure out how to run it.<p>3. Figure out how to attach a debugger to it.<p>4. Figure out where to listen&#x2F;break for an event whose purpose you pretty much understand (like the initial DNS request).<p>5. Follow the code down the rabbit-hole, you&#x27;ll be amazed at how quickly it connects you to everything else in the code.
brudgers超过 9 年前
It looks like the git repository is 22GB or 6.5GB without the commit history. I doubt a person can read that much in a lifetime. So I guess the best approach depends on finer grained goals.
lastofus超过 9 年前
I sometimes like to pick a module, set a breakpoint in a debugger, and start stepping through it to see where it takes me.