24 April 2018

Links roundup: 6

12 April 2018

A Portable Cosmos

Solving the puzzles posed by a broken, corroded mechanical gizmo found by sponge divers in the waters off a small Greek island might seem, at first thought, unrelated to the problems of debugging a software service or improving the user experience of a new mobile app. But, as Alexander Jones in A Portable Cosmos (Oxford University Press, 2017) recounts the researches into what is now called the Antikythera Mechanism, discovered in 1900 as part of the cargo of a shipwreck, some surprising parallels with current software development practices come into view.

Ever since the bronze fragments of the Mechanism were brought to the surface, archeologists and other technologists have trained increasingly sophisticated tools on it, from detailed drawings, to progressively more detailed photographs, to (from 1988) radiological focal plane tomography (to look inside it, non-destructively), to reflectance transformation imaging (a super-contrast way of reading the inscriptions on the front and back of the device). This is reverse engineering on a millennial scale.

Our current understanding is that the Antikythera Mechanism was made in the first century BCE. About the size of a shoebox standing on end, it housed an intricate assemblage of gears, driven by a hand crank on the side of its enclosure. On what we call the front, a miniature solar system of Moon, Sun, Mercury, Venus, Mars, Jupiter, and Saturn revolved within two bezels marked with the constellations of the Zodiac and the months of the Egyptian calendar. On the back, pointers moving across two spiral dials (and three smaller dials) displayed celestial events in 19- and 76-year cycles. Bronze plates covering the front and back explained its operation and provided additional astronomical information.

So what does sussing out this—let me write it—analog dingus have to do with current technology practice? A few points:

Switching contexts to gain understanding: Or what I might call inference feedback loops. One of the back dials (one of the few that were completely preserved) is inscribed with the names of various athletic events that recur in four-year cycles, from the best-known Olympics to the rather obscure Naa and Halieia games. The Halieia festival took place in Rhodes; Rhodes was the home of the highly influential astronomer Hipparchus; and writings by Cicero refer to a celestial machine made there. Hence, it is likely that the Antikythera Mechanism was built in Rhodes (p. 94). Elsewhere, Jones accumulates information that points to the intended destination of the device: Epirus, in the far west of the Greek peninsula. Thus, we can connect the dots that a wrecked cargo ship traveling between these two points would be found someone between them—off the island of Aigila (also called Antikythera).

Similarly, Jones examines the orientation of the back dials and their pointers (p. 159). An arrangement that puts the pointers at the top pointing straight down and the pointers at the bottom parallel to one another corresponds to a zero point, or calendrical epoch, of 25 August 205 BCE. This date is not too far in the past for a device built in about 60 BCE.

The arithmetic of the gears: Some of the gears are sufficiently intact that we can count the number of teeth; others are just stuck together with 2000 years of gunk. But we can infer the missing gear trains. Since we know the patterns and cycles that each dial pointer would have had to trace, we can calculate the gear ratios necessary to produce the required movement. For instance, to account for a Moon pointer:

The pointer has to revolve 254 times clockwise around the dial in the same time as [main gear] b1 rotates 19 times; hence the desired ratio of periods is 19:254. A gear with 254 teeth would probably have been considered undesirably large... The prime factors of 254 are 2 and 127, so a gear with 127 teeth was unavoidable as the driving gear in an engaged pair. A gear with 19 or a small multiple of 19 will be necessary as a driven gear; since 19 is an uncomfortably small number of teeth for a gear, we can tentatively chose 38 as the smallest viable multiple. If we just had a gear pair with tooth counts 38 and 127, the resulting ratio would be four times what we want, so additional gears must be provided that collectively amount to a ratio of 1:4. (pp. 210-211)

Designed vs. actual use: For twelve decades, various purposes have been proposed for the whatsit. Early researchers reasoned that, since it was on a ship, it was an astrolabe or other navigational device. Later, as more details became available, it became clear that the machine could be used to predict eclipses and compute horoscopes. Jones argues, however, that while the mechanism could do these things, it was much better suited as a portable planetarium—a teaching device. And indeed, a student watching the planets in motion, with their anomalies and retrogrades, would have been much more engaged than the same student studying two-dimensional static diagrams—like the (very well done) diagrams in Jones's book. In today's world, consider the three-dimensional ball-and-stick model of biological molecules like DNA as compared to the same information rendered on paper.

Design for small spaces: The Saros dial on the back is divided into 233 cells. When a pointer points to particular cell, then the positions of Earth, Sun, and Moon are such that a lunar and/or eclipse is likely, and at a certain time. The Mechanism represents these facts with a combination of one-letter initials and two-letter ligatures: 8 characters to compactly represent, say, "Eclipse of the Moon, during hour 5 of the day; Eclipse of the Sun, during hour 12 of the day." An additional letter in the cell indexes to inscriptions on the back face of the machine, describing periodic starry events in greater detail. The index letter is a callout, in other words. (p. 152)

The Antikythera Mechanism is an altogether fascinating contraption, one that still keeps a few secrets to be revealed.

11 April 2018

NoWarehouse

Gregory Vial surveys the current landscape of database management systems: RDBMS, key-value stores, and systems in between -- for transaction processing and/or analytics. The emphasis is what I might call narrow-attribute storage, as opposed to free text-oriented systems like Elasticsearch.

09 April 2018

Very content

It's been a very slow, soft launch for us on the team building the Content Service, but now we can say that we have a production application powered by our service. The NPR App launched at the beginning of the month on iOS devices. The NPR App is more of a reading experience (either to skim the headlines or to go deep into a story), while the companion NPR One continues as a listening-oriented experience.

More apps and clients to come!