No Starch Press

If Hemingway Wrote Javascript by Angus Croll

If Hemingway Wrote Javascript by Angus Croll

Angus Croll’s book-length thought experiment adds a new twist to the common trope in technical writing of using literature as dummy text for exercises: This time the literary references are the exercises. In If Hemingway Wrote Javascript the literary masters tackle classic programming problems in ways that will be recognizable to well-read programmers, with style to spare. BorgesLewis Carroll, Dickens, and David Foster Wallace devise algorithms that generate prime numbers. (At least two of these authors would not have been out of their element here). James Joyce, Jane Austen, Arthur Conan Doyle, and Jack Kerouac take on factorials. Can you guess whose code has a jazzy, improvised feel? and whose abounds with neologisms and non sequiturs? Croll plays the role of omniscient narrator, offering post-code explanations that dig into the rationale behind each writer’s approach.

Read More