
There’s a story in Greek mythology about the Ship of Theseus. The Athenians preserved the ship Theseus sailed home in for centuries. When old planks rotted, they replaced them with new ones, then again, then again. By the time none of the original planks remained, the philosophers asked: is this still the Ship of Theseus?
Software engineering has a pattern shaped exactly like this paradox. It’s called Strangler Fig, and people sometimes call the same pattern Ship of Theseus.
Strangler Fig is named after the tropical strangler fig tree, a plant that wraps around a host tree and eventually replaces it. Martin Fowler coined the name in 2004 because the strategy of gradually replacing legacy systems looks the same. Maybe because “strangler” sounds harsh, people also call it the Ship of Theseus pattern.
There’s a ship like this at my startup too. It started as a Django monolith. Every feature lived in a single codebase. As we moved to MSA, we peeled features off one by one, and Django became a proxy that forwarded requests to each service. We had been replacing planks, one at a time. And now, even that proxy is being replaced with Spring WebFlux. The last plank.
When this swap is done, no line of Django code will remain. And then we’ll ask the same question the philosophers asked. Is this still the same service? Same name, same users sending the same requests, but not a single line of the original code.
It will still be the same ship. Whether the planks are wood or steel, if it crosses the same sea to the same destination, it’s the same ship. In software especially, identity lives in the contract, not the code. As long as the same users send the same requests and receive the same responses, it’s the same service. Code is just the planks that hold up the contract for a while, and swapping them doesn’t change the ship. It’s how you carry the same contract faster, or to farther seas. Old planks have their limits, and that’s why we keep replacing them and asking the question.