DEV Community

Cover image for Working With A Large Codebase
Jeff Edmondson
Jeff Edmondson

Posted on • Updated on • Originally published at jeffedmondson.dev

Working With A Large Codebase

Introduction

So you landed your first dev job and now you are starting at a massive codebase and feel completely overwhelmed. Don't worry everyone has been there before. Do not try to understand what every line of code is doing in a large codebase. You will waste time and be completely overwhelmed by it. Believe me I have been there. Understanding how the entire codebase works will come with time, and utilizing the tips below should help expedite that process. For now focus on the task at hand and only try to understand the code that your task is related to.

Know What the Application Does

One of the biggest pieces of advice that I could give is know as much as you can about what that the application does. If you are able to know everything that the application does then the code should become much easier to read. Variable names, database tables and columns will all make more sense. Take the place of the user who uses the application and try and go through every main use case and jot down some notes.

Architecture & Design

Having some idea of what architecture the codebase is following will help immensely. Some of the current most popular are Model View Controller (MVC) and Layered. If you are not sure what these architectures are I would highly recommending doing some research on them. A code base will usually only have one type of architecture but could employ multiple different design patterns. Design patterns are a reusable solution to reoccurring problems in software. Some of the most frequent design that are used today are: Singleton, Factory, Observer, Inverse of Control (IOC technically a a principle but still very common). Ask you coworkers what architecture the application is following and what design patterns it is using and then go and research them. Drawing out UML and Logic flow diagrams can help aide you in this step.

Know What 3rd Party Libraries Are Being Used

Almost all applications will be utilizing some third party libraries. Libraries help make a developers life easier by reducing the amount of code and work to accomplish certain tasks. Having an understanding of what libraries the application is using is key. Take a look at all the libraries the application is using and do some research on them. What is the purpose of the library? How is it being leveraged in this particular codebase?

Master the language

This should go without saying but make sure you are well versed in the language that the codebase is. Practice makes perfect.

Read Documentation (If Available)

The crown jewel for understanding a large codebase is documentation. However, we do not live in a perfect world therefore GOOD documentation is not often available. If you have it USE IT.

Practice

One of the best ways to learn how to deal with a large codebase is contribute to open source! There are so many projects that need help. Find a project that you are interested and find an issue to work on.

These are just my tips. Leave yours in the comments!

Top comments (0)