Plutarch tells us that the Athenians kept the ship in which Theseus had sailed home from Crete. As its planks rotted, they replaced them with new timber, one at a time, and the ship stayed in the harbour for centuries. Philosophers used it as an example in their arguments: once every plank has been replaced, is it still the ship of Theseus?
With AI, the puzzle has become a practical one for software. An application that took ten years to build can now be read, understood and rewritten in weeks. When every module has been replaced, what exactly have we kept?
Two answers
The first answer says a thing is its material. The ship is its planks, so when the last original plank goes, the ship of Theseus is gone, and what floats in the harbour is a replica.
The second says a thing is its form and its continuity. The ship is the shape the planks make, the role it plays, and the unbroken history of repair. Replace the planks gradually and it remains the same ship, the way a person remains the same person though most of the cells in their body are replaced.
For software, the first answer says the system is its code. The second says the system is its behaviour: the contracts it keeps, the data it holds, and the promises it has made to the people who rely on it.
Hobbes’s twist
In 1655, Thomas Hobbes made the puzzle harder. Suppose someone collected every old plank as it was removed, and later reassembled them into a ship. Now there are two. One has all the original material. The other has the continuous history. Which is the ship of Theseus?
Legacy modernisation produces Hobbes’s ending constantly. A team rewrites the system, and somewhere the old codebase is still running: a copy kept for one customer, a reporting job nobody migrated, a fork in another region. Both versions have a claim to being the real one, and the arguments about which one to fix are really arguments about identity.
Why the second answer is the useful one
If the system is its code, a rewrite is a replacement, and replacements are risky, all-or-nothing events. If the system is its behaviour, a rewrite is a repair, and repairs can be gradual.
This is the idea behind the pattern Martin Fowler called the strangler fig: build new parts around the edges of the old system, move behaviour across one piece at a time, and let the old code wither. It only works if you know which behaviour you are preserving. The planks can change because the shape is written down.
- The contract people rely on
- Original part
- Replacement
The original system
A third replaced
Two thirds replaced
Every part replaced
It is also why I believe code is no longer the moat. If AI can replace the planks cheaply, the value was never in the planks. It is in the shape: the contracts, the data model and the trust of the people who sail in it.
A practical test
Before rewriting anything, write down what the system is, independently of its code.
- Which interfaces must keep working, and for whom?
- Which data must survive, and with what guarantees?
- Which behaviour do people rely on that nobody ever specified?
If you can answer those questions, you can replace every plank and still have the same ship. If you can’t, you are about to build a replica and hope nobody notices.