How do you read a large code base?
Let’s take a look at a few ways in which you can start to grasp a monolithic codebase.
- Read the Documentation. The first place I start with a new project is reading over any available documentation or README files.
- Read the Commit Messages.
- Pairing.
- Read the Tests.
- Start with the Smallest Part.
- Dive In.
What is the fastest way to understand a new code base?
- Find a mentor. Find a programmer already familiar with the code base, and ask them if they are willing to be interrupted a lot during the coming weeks to help answer your silly questions.
- Get an overview.
- Do a small quest.
- Have a don’t-get-stuck rule.
- Use code review.
- Recap.
How do you handle large code bases?
Approaches you might consider:
- Try to find out what the code is supposed to do, in business terms.
- Read all the documentation that exists, no matter how bad it is.
- Talk to anyone who might know something about the code.
- Step through the code in the debugger.
- Introduce small changes and see what breaks.
How long does it take to get used to a codebase?
To become completely familiar with it, like you wrote it yourself, should be at least 6 months. But a few weeks to be pretty comfortable fixing bugs. Some bugs take days and even weeks to fix even when you already know the codebase!
What is a common code base?
In software development, a codebase (or code base) is a collection of source code used to build a particular software system, application, or software component. Subversion, Git and Mercurial are examples of popular tools used to handle this workflow, which are common in open source projects.
How do you read a long code?
What’s the best way to read and understand someone else’s code?
- Find one thing you know the code does, and trace those actions backward, starting at the end. Say, for example, you know that the code you’re viewing ultimately creates a file with a list of movie titles.
- Rinse and repeat.