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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Onboarded and overwhelmed by new code base

6 点作者 zarathustra333超过 1 年前
I am doing a SWE internship and the company shared their codebase with me on git and I am very overwhelmed with all the moving parts. Ive never joined in to a project like this and am wondering the best approach to get familiar with things.

7 条评论

muzani超过 1 年前
A common trap is trying to learn all the parts and reading the docs. Docs for most codebases are out of date. We stopped doing docs - most engineers are better at reading code than the docs, and we design things in a way that when someone leaves or joins, things can be picked up without docs.<p>First, learn how the parts connect to one another.<p>You want to add a button. What is that button connected to? What runs underneath? Where does that change? Does it go through an API? Is the value tracked in a global variable?<p>What else is a value connected to? How is change displayed? Often changes in value are observed in modern code, but it can also be manually changed when a value is changed.<p>You don&#x27;t want to learn parts because parts are easily replaced. Learn connections between those parts.<p>Some things appear invisible to those who have worked in similar systems. These don&#x27;t show up in docs sometimes, which makes the learning curve steeper.<p>Next: learn purpose.<p>Why not purpose then connections? A system can be corrupted from its purpose. Things will eventually rewire to suit the purpose, but they don&#x27;t function that way now.<p>Purposes can change too. When a code is written by a large contractor, the purpose is to make money. When that code is passed to the client, the purpose is to keep doing what it does and also to save money and time. When you see major refactors, it can be because of a change in purpose, but it&#x27;s useful to understand how and why it&#x27;s changing.<p>Sometimes there&#x27;s no purpose - someone copied something they didn&#x27;t understand.<p>Docs are good at denoting purposes too, so this is a good place to read them.
wendyshu超过 1 年前
I&#x27;ve been there. You have to communicate with your manager and be honest about how much you can do how quickly. Start small, with one component in one programming language. Learn the language and the frameworks. Ideally you&#x27;ll be allowed time to do so. After you&#x27;re familiar with the technologies the code will be easier to understand. Make notes on the code. Read the docs and if they&#x27;re missing info, find out and fill it in; that way you&#x27;re learning and contributing. I like starting from the database models, data is usually the heart of an application. It&#x27;s important not to feel like you have to rush. Learning big things takes time.
thesuperbigfrog超过 1 年前
How to Learn a Code Base:<p>1. Read any documentation<p>2. Examine the front-end<p>3. Study the permanent data streams and persistent data<p>4. Learn the class &#x2F; type system and map it out<p>5. Find the code&#x27;s locations and see how the code is processed<p>6. Categorize the code by functionality and map it out<p>7. Study the back-end CRUD operations<p>8. Study the front-end CRUD operations<p>9. Study the permissions and security infrastructure<p>10. Study a well-defined data collection or functional area<p>Source: not me; I lost the original source document.
ssc23超过 1 年前
Most cases when a company shares the codebase it&#x27;s to give you freedom to explore what you&#x27;ll be working with while they decide what specifics tasks you&#x27;ll be undertaking.<p>Get your dev space up and running and play around with stuff you read in available docs.
syndicatedjelly超过 1 年前
- See if you can pair with someone a few months or a year ahead of you. They&#x27;ll be new enough to remember what it&#x27;s like to be new, but experienced enough to give you advice. Seniors devs can sometimes be very busy, not approachable, and don&#x27;t remember what it&#x27;s like to be new<p>- Just read the entire codebase...I know that&#x27;s not very popular, or efficient. If it&#x27;s an enormous codebase, just take it folder-by-folder. Skim large files or things you don&#x27;t understand. Eventually something will pop out as familiar and you&#x27;ll notice some patterns. Ask questions about those patterns and see if your intuition is correct.<p>- Figure out what the output is supposed to be. Is it a web app? Get it running locally so you can view it in a browser. Something else? Run the test suite and see what the tests actually do. If it&#x27;s an embedded project or something that runs on hardware, ask for an experienced dev to introduce you to the hardware and show you how to upload and run builds on it.<p>- Find the entry point for the application. Some sort of main() function, depending on the language. Surrounding it will be some clues as to what the high-level architecture is.<p>Hope that helps!
评论 #38827109 未加载
andsoitis超过 1 年前
Learn by doing.<p>Fix a couple of nontrivial bugs.<p>Implement a new feature.<p>Get comfortable with the fact that you&#x27;ll be slower than others.
haltist超过 1 年前
Welcome to the real world of software engineering. It only gets worse.