Skip to main content
The ladder · Lesson 12

12 Brownfield change

Product EngineerSoftware Factory Engineer

Product Engineer · Legacy ClinicLegacy Clinic: a defect in code you did not write.

I want to change code I did not write.

Brownfield change

Concepts​

  • Survey — Swifter's first look at a project's repositories: one model call that writes the System summary.
  • Read the codebase — a run that reads the code; with only Facts on, no model is called. It fills the Overview pages.
  • Overview — what the project knows about its code, page by page: Overview, Repositories, Technical architecture, Design system, Requirements, Tests.
  • Tests — the module's own tests. A test that fails before the fix and passes after it is the proof.

What Swifter learns about code it did not write

Survey
Read the codebase
Overview
Tests
one model call over the repositories; writes the System summary
a run; with only Facts on, no model is called
what the project knows about its code
the module's own tests: fail before the fix, pass after it
  1. Survey
    one model call over the repositories; writes the System summary
  2. Read the codebase
    a run; with only Facts on, no model is called
  3. Overview
    what the project knows about its code
  4. Tests
    the module's own tests: fail before the fix, pass after it

Figure 12.1 · What Swifter learns about code it did not write

Scenario​

Your team takes over Legacy Clinic, a sister app from another team: Java and Angular, code nobody on the team wrote. You read what Swifter learns from it, then the project agent fixes one defect, proved by the tests.

The flow

Read
Ask
Fix
Check and merge
  1. Read
  2. Ask
  3. Fix
  4. Check and merge

Figure 12.2 · The flow

Interface​

The project's Overview is where Swifter shows what it read. The numbers are the places the walkthrough sends you.

Walkthrough​

Scene 1 of 12 · Make your Legacy ClinicWatched 0%

Scene 1 of 12 · 0:27

Make your Legacy Clinic

Where: Overview page: ① Project name

The project name → + → Start from scratch. Name it «Legacy Clinic — your name», pick the code host. Add module → Spring Boot, name api. Add module → Angular, name web, Package manager Yarn. Continue → Create project: Swifter copies the course code.

If you see instead

  • Code lists no repositories: check gear → Modules; if api or web is missing, make the project again.

Terms​

  • Legacy Clinic — the course's older app: a veterinary clinic, a Java backend (api) and an Angular frontend (web).
  • Defect — the work item type for a bug.
  • Dev environment image — what a session's sandbox has installed; here Java and Maven.
  • Artifact repository — Swifter's own store next to the code repositories; you change nothing there.