Terence Tao’s account of restoring his old mathematical applets with coding agents deserves credit for something rarer than another claim about AI productivity: it describes a concrete body of work, the defects observed, and the human verification that made the result usable. Tao modernized roughly two dozen Java applets for subjects including complex analysis, honeycombs, and Besicovitch sets, then used the same workflow to realize new visualization ideas.
The striking result is not simply that an agent produced JavaScript quickly. It is that the task had an unusually favourable verification structure. Tao knew what each mathematical object should do, could interact with the visual output, still had the original implementations, and could inspect discrepancies. Reimplementation was expensive; checking candidate behaviour was comparatively cheap.
That asymmetry is a useful criterion for deciding where coding agents genuinely help.
The relevant ratio is generation cost to verification cost
AI-assisted development is often evaluated through output volume or elapsed time. Neither measure says whether the generated system deserves trust. A more useful first approximation compares two costs:
- the cost of producing a candidate implementation;
- the cost of obtaining independent evidence that the candidate preserves the required behaviour.
An agent has high leverage when it reduces the first cost without making the second unmanageable. Legacy porting can fit this pattern when the old program still runs, representative inputs are available, outputs are observable, and a domain expert can recognize invalid behaviour.
The pattern fails when verification is as difficult as writing the program correctly. If a generated numerical method has no trusted baseline, a plausible plot is weak evidence. If a theorem visualizer silently changes a mathematical convention, visual polish can conceal the defect. If a migration rewrites both the implementation and its tests from the same prompt, agreement between them may only show a shared misunderstanding.
Why old scientific software is a strong candidate
Scientific applets often become unusable for infrastructural reasons rather than mathematical ones. Browser plugins disappear, language runtimes change, dependencies become unavailable, or the original deployment environment can no longer be reproduced. The mathematical idea may remain valuable while the executable artifact decays.
Coding agents can reduce the mechanical cost of recovering such software:
- translating obsolete APIs and event models;
- reconstructing build and deployment files;
- replacing unsupported graphical primitives;
- separating numerical logic from the old interface;
- generating adapters and comparison harnesses;
- documenting code that was previously understandable only to its author.
These are not trivial operations, but much of the work is constrained by an existing artifact. The agent is not being asked to invent the mathematical specification from nothing. It is proposing a new realization of behaviour that already has evidence behind it.
Tao’s report is also valuable because it records defects in both directions: the generated ports introduced a minor interaction bug, while the process exposed bugs in the original code. A legacy implementation is therefore a comparator, not an oracle. Differences must be investigated rather than automatically resolved in favour of the old program.
Preservation requires more than a successful port
A browser demonstration that works today can become the next abandoned artifact. A defensible modernization should preserve the relationship between the old and new systems:
| Preservation layer | Evidence to retain |
|---|---|
| Provenance | original source, version, licence, runtime, and author |
| Behaviour | representative inputs, expected invariants, and known edge cases |
| Equivalence | differential results and explanations for intentional changes |
| Mathematics | definitions, coordinate conventions, tolerances, and assumptions |
| Environment | reproducible build, dependency versions, and deployment instructions |
| Review | generated changes, human corrections, unresolved discrepancies |
For an interactive mathematical applet, screenshots are insufficient. They can detect large visual regressions but not whether a transformation preserves an invariant, a plotted locus uses the intended definition, or a numerical approximation behaves correctly near a singularity. Verification should combine visual comparisons with executable properties and selected reference cases.
The most valuable tests may come from the mathematics itself: symmetry, conservation, monotonicity, limiting behaviour, known special cases, or agreement with an independently implemented formula. These checks survive a change of programming language better than assertions tied to the old user interface.
What this example does not establish
Successful recovery of applets does not show that coding agents can autonomously validate mathematical software. The expert supplied the goal, recognized the objects, guided corrections, and accepted responsibility for the result. The outputs were unusually inspectable, and the original programs provided additional evidence.
The lesson also should not be generalized to every legacy migration. A financial batch system with undocumented side effects, a safety controller without a complete test environment, or a concurrent service whose failures emerge only under production load has a very different verification cost. Fast translation can increase risk when the behavioural contract is hidden.
Before assigning a modernization task to an agent, ask:
- Is there an executable or documentary baseline?
- Which behaviour must remain identical, and which may change?
- Can domain invariants be checked independently of the generated code?
- Are failures observable on a representative sample?
- Can a qualified reviewer understand the resulting implementation?
- Will the new artifact be more reproducible and maintainable than the old one?
If these questions have concrete answers, the agent can turn preservation projects that were previously uneconomical into realistic work. If they do not, rapid code generation may only replace visible obsolescence with hidden uncertainty.
Tao’s experiment is therefore important beyond its individual applets. It suggests a disciplined selection rule for AI-assisted development: prefer tasks where candidate production is expensive but verification remains structured, independent, and affordable. The durable advantage is not that an agent can write the code. It is that an expert can still decide, with evidence, whether the code deserves to survive.