Tip 24

Try Working with a Legacy Codebase

by Ildar Akhmetov

Building new projects is nice. But real learning happens when you touch an old, ugly, tangled... real codebase! As a developer, you will almost never start new projects from scratch. Mostly, you'll be adding to existing codebases. So, that is what you should practice.

But where do you find a codebase if you don't have a job or internship?

  1. Find an abandoned project on GitHub. Look for projects with >100 stars and no commits since... say, 2019.

  2. Ask around -- maybe your uncle owns a shop and still has code for the ancient PHP system he was using in the 2010s before migrating to a SaaS (or even better, maybe he still uses that system!). You don't need his database of customers -- you need a copy of his code.

  3. Or, actually, something that you wrote a couple years ago and then forgot. It can be as incomprehensible as if someone else had written it :-)

Now, try to run the code on your machine. This alone is a fantastic exercise. It can easily take hours -- and this is not time wasted!

Then, think of the most basic change. Can you change the color of a button? Good. Try adding a new test. Try a simple refactoring. Add a small new feature.

Using AI is fair game here! It will help you explore and understand. At the end of the day, your goal is to build a mental model of a legacy codebase -- AI does not replace it, but makes building it much faster.

Your first job won't be a nice greenfield project that you'll design. It'll be a messy legacy codebase. Start preparing for it now!

Related Tips

Get tips in your inbox

Two new tips every week.

Powered by Buttondown