Changing Inherited Code
Seams in Python, dependency-breaking techniques, Fowler and Feathers contrasted and combined, and the decision between refactoring and rewriting.
Seams in Python: monkeypatch, injection, and duck typing
Find the places in code you didn't write where a test can swap a dependency without editing it, and learn where a patch has to land for the swap to take effect.
Dependency-breaking techniques for modern Python
Break a legacy engine's hard-wired carrier calls one small step at a time, and use a single table of expected quotes to show that no step changed what the code does.
Fowler vs Feathers, contrasted and combined
See what each book assumes before you touch code, record what an inherited engine really quotes, and refactor it in small steps while a table of those quotes tells you the moment a total moves.
Refactor or rewrite
Decide between reworking an inherited engine and replacing it from the forces in front of you, prove a rewrite matches the old quotes before it takes traffic, and route one zone at a time.