Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
Python & Django

Inheriting Code You Did Not Write

Last updated:

The first day

  1. Can it be run locally? If not, that is the first problem
  2. Is it in version control? With history, ideally
  3. Are dependencies current? Audit for known vulnerabilities
  4. Are there tests, and do they pass?
  5. What is about to expire? Credentials, certificates, unsupported versions
The fifth is the urgent one. An expiring credential or an unsupported Python version is a deadline you inherited without being told about it.

Then understand what it does

  • What triggers it — schedule, request, event
  • What it reads and what it writes
  • What external services it depends on
  • What happens when each of those fails
  • Who currently relies on its output

Get it under control before changing it

  1. Version control, if it is not already
  2. A local environment that works, documented
  3. Characterisation tests around the important behaviour
  4. Monitoring, so you know if it stops
  5. A backup of whatever it depends on

Changing code you do not understand, with no tests and no monitoring, is how inherited systems break in the first month.

Common findings

FindingFrequency
Credentials in the repositoryVery common
Dependencies years out of dateVery common
No testsCommon
No monitoringCommon
Runs on one person's machineMore common than you would hope

Write down what you find

A one-page summary: what it does, what it depends on, what is wrong, what is urgent. That document is worth having whether you keep, fix or replace the system.

It is also what lets a non-technical owner decide what to fund.

Frequently asked questions

What if it only runs on one machine?

That is a continuity emergency. Getting it running elsewhere, documented, is the first task.

Should we rewrite it?

Not until you understand it. Most inherited systems need specific fixes rather than replacement.

How long does an assessment take?

One to three days for a typical service, depending on how much documentation exists.

What if there is no documentation?

Normal. Characterisation tests document behaviour as you go, which is more reliable anyway.

Keep reading

Inherited a system nobody understands?

Five checks in the first day tell you where you stand. Happy to run the assessment.

Book a free 30-minute call Get a project estimate WhatsApp us

Related services

What we build for problems like this one

Custom Software DevelopmentWeb DevelopmentMachine Learning