It’s hard to get yourself acquainted with an established code base. Senior devs have put in the time to orientate themselves quickly.
You’ll be like: “What’s this?! What the heck is that doing?! Where do I find the &%#$ thingymabob?!”. Not understanding a code base can cripple your productivity, kill your confidence and keep you confused.
So here are six steps I’ve found really useful when you’re getting up to speed with how a code base has been put together:
You’ve been put on a new project at work and haven’t got clue how it works. First things first: before knowing the code base you need to know the product and how users interact with it.
Know the product before trying to change or add to it. I guarantee you will not be adding value if you don’t understand what problem the product is trying to solve.
If you love JavaScript and find yourself working on a C# .NET project, you might feel like you’re learning to code all over again. Not only will the code be different — the tools most likely will be too.
Don’t try to swim upstream. Get familiar with your project tools, technologies and conventions. The more you try to fight for familiar tools, the less value you’ll be gaining from the tools that are made for that specific job.
Design patterns can be harder to understand if you’re a junior dev but more valuable to figure out from the get-go. Having a microscopic lens on specific areas of a project is an easy trap for making mistakes — because you won’t be able to predict the behaviour of the rest of the project. Understanding the design pattern = understanding the architectural decisions.
Figure out how your separation of concerns are being split and you’ll stop seeing a single behemoth of code craziness.
Data is the lifeblood of a product. Understanding how it has been set up is one of the most important parts to understanding a project.
When developing you will spend a large amount of time trying to figure out where data is coming/going. Console.log it. Breakpoint it. Check what type it should be. Test all your assumptions of what you think it should be doing and make sure it is.
Old code bases are opinionated and quirky (like your senile Grandpa). Three common ways of discovering quirks about a code base are: through a ReadMe, asking people or finding out when you inadvertently break something. Don’t be that guy.
People won’t always remember or confess to all the gnarly parts of a code base. But don’t be too quick to judge! Very likely you’ll be explaining about a strange snippet of code you added to a project months earlier. It happens to all of us.
Unless you have a photographic memory finding files in a new code base can drive you crazy. Learn what search tools you have at your disposal and then refine how you use them. For example:
Don’t waste time searching file by file or constantly asking people to show you where things are. You’ve got a lot of helpful search options. Once you know how to use them, you won’t have to rely on others to find things.
Interacting with previously established code is one of the hardest parts about being a developer. It’s also one of the things you’ll do most often. If you want to make advancements as a developer, push through the learning pain. Your future self will thank you for it.