Software Development

How to Tackle a Legacy Codebase

You’ve just landed a new job and you have to come up to speed quickly with the existing legacy codebase. So how do you do that?

There is rarely anything better than building and deploying the whole application for yourself to feel like you’ve made a start with learning the application and taking a big step towards the holy grail of being productive*.

You will need:

  1. A developer laptop, or one with developer rights (perhaps) depending on how the code is built.
  2. Access to source code
  3. Access to build tools
  4. Build docs or CI server access so that you can copy it
  5. Patience and perhaps someone to help you out occasionally

Assuming you have a means of building, then you’ll need access to the source code repo. This could be easy to achieve, it could be hard, and it might need people to sign this off. You might need to be patient.

Likewise access for tools – perhaps you’ll need a licence, perhaps you’ll need some special configuration that is only documented on a Wiki – and access to that could also be restricted by someone. There is here an opportunity.

The Opportunity

Onboarding and learning a new codebase can be frustrating, it can be slow. But there are important things you can do to make the exercise useful for the others that follow you.

While you’re making your first build, remember to do a couple of things:

  1. Make notes for yourself about the build process and any problems or gotchas you run into. Good for making improvements further down the line (or even automating)
  2. Draw a map of the dependencies required for building the code. If this is not already well documented (or perhaps the docs are out of date) you can add your knowledge to the docs for others to improve.

These notes and pictures can be turned easily into definitive documentation to help other developers. This is the essence of the ‘boy scout rule’. Leave the code (or the experience in this case) better than you found it.

* – productivity is in the eye of the beholder. Don’t believe the hype

Related articles