29 December 2008


I have a new personal/professional profile, one to take the place of my old TypeKey profile. For a small fee, the folks at Hover provide the redirection.

23 December 2008

A question of scale

For future reference: Joel Spolsky points to Scott Schiller's post that explains how to ask Internet Explorer 7 to use a sensible image resampling algorithm. The code snippet to go in your stylesheet is

img { -ms-interpolation-mode:bicubic; }

The result: smoother resized images.

17 December 2008

Recycled clockwork

James Randerson embeds video of Michael Wright's working replica of the Antikythera Mechanism.

Jo Marchant's book about the efforts to understand the clump of metal found in the Mediterranean a century ago, Decoding the Heavens, is scheduled for publication early next year.

(Link via Wired.)

03 December 2008

Decisions, decisions

Tak Cheung Lam et al. explore the details of syntactic parsing of XML under four technologies: the well-known DOM and SAX and the lesser-known StAX (Streaming API for XML) and VTD-XML (virtual token descriptor)—with a preparatory exploration of character decoding and lexical analysis, processing steps that are common to all XML analyzers.

Since neither SAX nor StAX create in-memory representations of the complete document, they are not well-suited to applications that must transform the document, but they can be effective for simple streaming applications. StAX uses a "pull" model that puts the processing loop in the application, so many developers will find it easier to use than SAX.

By contrast, DOM and VTD are the tools to use if you need to rewrite the XML. As compared to DOM, VTD does not construct its in-memory representation with an object tree, but rather with lightweight arrays of 64-bit integers, and the article gives a one-figure sketch of how this works. The authors estimate VTD to be 5 to 8 times faster than DOM and to take up 20% of the space that DOM does, especially for incremental updates (but they don't back up these calculations with empirical measurements). They also speculate that VTD is a good candidate for hardware acceleration.

01 December 2008

Steampunk reader

Shorpy has a fabulous photographic image from 1917 of a punchcard tabulating machine in service at the Census Bureau. More images are promised!