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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: What are your tips for reading other people's code?

2 点作者 autogol超过 8 年前

2 条评论

Eridrus超过 8 年前
Depends on how long you have, how unfamiliar the code&#x2F;build is and what the goal is, but spend as much time as reasonable getting tools to work first.<p>Make sure you can figure out what function is actually getting called when you see a function name. Tools like Source Insight can be useful if you need to get up and running quickly since they support very loose searching rules. I&#x27;ve also heard good things about SciTools Understand, but never used it myself.<p>The best thing though would be to get the software running in a way that you can debug it. Being able to step through code and see how data is modified and which particular implementation of an interface gets called, etc, can be very helpful.<p>Being able to exercise the code in question always makes it easier to understand because you can think about it in larger blocks than trying to form an picture of the larger goal line by line.
NigelR超过 8 年前
Read through some of the code with the original author. It may seem obvious and it&#x27;s not always possible, but when you can do this you can cut hours off the time it takes to understand the code and other code that the author wrote.<p>What you&#x27;ll get from this that would be more challenging on your own:<p>- design tradeoffs<p>- high level design<p>- the author&#x27;s coding patterns