Tombstone
zer
Dec 2014 โ Jan 2015 ยท age 32โ33
What it was
Zoom, Enhance, Rotate: the generic half of a 2D editor, written in Java 8 and JavaFX and pulled out of a larger tool so that tool could be tested. zer knew about a camera, a canvas with grids and guide lines, rubber-band selection, undo hooks, a property panel, layers and a plugin menu. It knew nothing about what was being edited. The host application filled in an abstract class of about twenty methods, and zer did the rest. JavaScript plugins ran through Rhino, reloaded themselves every two seconds when their files changed, and talked to the document through a single $ function over a five-method model whose query language belonged entirely to the host. About 4,750 lines, published as a pre-release library, with no tests. Within three months its own README announced it had been rolled up into world-bootstrap.
Wins, for the age
- At thirty-two, Jeff designed a scripting bridge of five methods where the host owns the query language, and wrapped every script run in
beginandendso undo captured it as one step. Small, and exactly right. - Found on their own what Sublime Text's plugin auto-reload (2012) had already found: edit a script beside the running tool and see it live two seconds later.
- Built a batch edit that applies one value to many selected things and rolls every one of them back on the first rejection. All or none.
- Taught a property panel that rebuilds on every change to remember which field had focus.
- Went through the full ceremony of publishing to Maven Central once, then reused it for the next library.
What it taught
- Separate the editor shell from the thing edited. The shell was never tested, but its contract made the host testable.
- A tiny scripting bridge beats a large plugin API.
- Rebuild-on-sync UIs need focus memory or they are unusable.
- No tests means the bugs are exactly the ones tests would find: a cancelled Save As threw, a single-point selection zoomed to infinity, and a broken plugin kept running its old code in silence.
- This was the last project where this primate wrote JavaFX handlers as anonymous inner classes. Lambdas won.
Genealogy
Ancestors: Zen Game System: a scriptable engine with its own polygon editor, the first editor shell. Descendants: World Bootstrap: the CAD tool it was folded back into, whole.
Epitaph
Zoom, Enhance, Rotate. It was the frame around someone else's picture, and when the picture grew, it went back inside the frame.