During an interview for a front-end developer role, I was asked how I would approach navigating a new codebase. It was a simple question, yet one that stayed with me after the interview was done.
To be honest, I wasn't really sure of the proper way to explore a new code base effectively. My past experience to date was freelance or smaller Bootcamp team projects.
As per usual, YouTube offered some amazing resources, and below are 5 tips that I look forward to using in the future. (Credits and resources at the end.)
By seeing how the project is built, you can get a quick understanding of it. It can also help identify languages, packages, or frameworks you might not be familiar with.
- Docker file
- package.json file
- Git Hub Repo's tech percentage view
- Locally searching with your terminal/CLI for how many of a certain file type makes up the project.
A good place to start is looking at the Routes available. This is a high-level look at how big the project is and the specific features/sections it has.
This also gives you endpoint/slugs to use in the URL to explore the website in a more targeted way. (Like a sitemap)
For example, by seeing routes that lead to
/login, it would be logical to assume that this project has some sort of account and authorization functionality.
Looking at the available test files can help explain some of the core / mission-critical functionality.
Create a checklist for any programs, services, packages that are needed to make the local environment work, making pull requests for review, and deploying.
Having a clear direction to refer to when attempting these new processes, will make the whole experience less daunting.
This person will probably be a senior or at least seasoned developer on your team, that doesn't mind guiding you through the basics of the codebase.
New codebases are complicated things. Even coming back to 6-month (heck even 1 week) old code can be difficult to figure out. So having someone to answer the million-&-1 simple yet necessary questions will be incredibly helpful.
It is still important to try answering your own questions first, before getting help. Their time is valuable and trying to solve your own questions is a great learning experience. However, it is better to ask for help after 15min of troubleshooting, then wasting 4 hours going at it on your own.
What is a Code Base?
Working with Code Written by Someone Else
Best Tips and Tricks to Navigating a New Codebase
Woman Who Code
Learning a New and Unfamiliar Code Base
5 tips to quickly understand a new code base - FunFunFunction #7
Fun Fun Function
Header image designed with Adobe Photoshop