March 30, 2012
MarkBernstein.org
 

Day 1

Day 1

A grueling day of sprint-coding, starting from the rarely-seen XCode stationery. The blank canvas is always formidable, and it’s worse here because intensive Tinderbox work for the 5.10 updates has played havoc with my Objective-C reflexes.

Ten hours later and we’re just about reading legacy Storyspace files.

Day 1

Much of the code is quite ugly, thanks to tons of arcane bit-twiddling. Remember, this file format was originally designed to lift things efficiently off floppy disks, because a big hypertext like Victory Garden could take five minutes to load on those old machines. To minimize processing, large parts of the file format exactly matched the data structures, so you could slam the bits right into memory. Unfortunately, this means that details of the 68000 compiler’s memory layout persist even in this new code, three processors on.

It’s not all awful. Test-driven design will help a lot. It hadn’t been invented the last time I went through this. It’s already helping, although I did lose 20 minutes trying to track down the lost 141-st link in Mary-Kim Arnold’s “Lust”, when it turned out the lost link was never lost at all.

Status: 5 classes, 4 tests.