If Hemingway Wrote JavaScript

by Angus Croll

October 2014, 192 pp.
ISBN: 978-1-59327-585-3
Contents | Reviews | Updates

"If Hemingway Wrote Javascript is a strange and beautiful book"
—Robin Sloan, author Mr. Penumbra’s 24‑Hour Bookstore

Look Inside!

If Hemingway Wrote JavaScriptIf Hemingway Wrote JavaScript
If Hemingway Wrote JavaScriptIf Hemingway Wrote JavaScript

What if William Shakespeare were asked to generate the Fibonacci series or Jane Austen had to write a factorial program? In If Hemingway Wrote JavaScript, author Angus Croll imagines short JavaScript programs as written by famous wordsmiths. The result is a peculiar and charming combination of prose, poetry, and programming.

The best authors are those who obsess about language—and the same goes for JavaScript developers. To master either craft, you must experiment with language to develop your own style, your own idioms, and your own expressions. To that end, If Hemingway Wrote JavaScript playfully bridges the worlds of programming and literature for the literary geek in all of us.

Featuring original artwork by Miran Lipovača.


About the Author

Angus Croll is obsessed with JavaScript and literature in equal measure. He works on Twitter's UI framework team where he co-authored the Flight framework. He writes the influential JavaScript, JavaScript blog and speaks at conferences worldwide.


Table of Contents

Introduction

Fibonacci

1 Ernest Hemingway
2 William Shakespeare
3 André Breton
4 Roberto Bolaño
5 Dan Brown

Factorial

6 Jack Kerouac
7 Jane Austen
8 Samuel Johnson
9 Sir Arthur Conan Doyle
10 James Joyce

Happy Numbers

11 J.D. Salinger
12 Tupac Shakur
13 Virginia Woolf
14 Geoffrey Chaucer
15 Vladimir Nabokov

Prime Numbers

16 Jorge Luis Borges
17 Lewis Carroll
18 Douglas Adams
19 Charles Dickens
20 David Foster Wallace

Say It

21 Sylvia Plath
22 Italo Calvino
23 J.K. Rowling
24 Arundhati Roy
25 Franz Kafka

Poetic Interludes

1 Edgar Allan Poe
2 William Shakespeare
3 Dylan Thomas
4 Walt Whitman

View the detailed Table of Contents (PDF)

(top)

Reviews

"A real treat, and a book whose time has come."
—Rob Friesel, author of The PhantomJS Cookbook (Read More)

"Wild experiments are what moves a genre forward. And this is a format of programming book that's certainly never been tried before."
—Marijn Haverbeke (Read More)

"A thought experiment, appealing to Javascript and literary nerds alike."
—Dan Shurley, for nomadic sojourns creative collective (Read More)

"Last night I read If Hemingway Wrote JavaScript, twice, then pre-ordered a physical copy."
—Rick Waldron, creator of Johnny-Five and JavaScript standards author

"Probably my favorite book about programming. This year's for sure. Totally enthralled."
—Steve Klabnik, author Rust for Rubyists, web celebrity

"Yes, If Hemingway Wrote JavaScript by @angustweets is cool"
—Brendan Eich, inventor of JavaScript, co-founder of Mozilla

"I really, thoroughly enjoyed the book...Angus is hilarious, well-read, and a great writer."
—Alex Sexton, engineer at Stripe, Modernizr core team, jQuery Board of Directors, Dojo Foundation Board

"Code, literature and art are beautifully represented in @angustweets' new book"
—Jenn Schiffer, Bocoup engineer, celebrity speaker, comedian

"Sweet, edifying and laugh-out-loud funny."
—Patrick Ewing, Twitter hall-of-famer, esteemed rubyist and coiner of "duck-punching"

"...you should have this book at hand at all times...so whenever you start feeling disheartened, unmotivated or simply bored with what you are doing...you'll look at it's chapters and remember that programming can be fun. That, beyond good and bad parts, beyond best practices and the professional fences with which we surround ourselves, those lego sets that we call programming languages, can and should be played with"
—Javier Alba, JavaScript developer, voracious reader

"I'm so excited by the "If Hemingway wrote JavaScript" book by the completely brilliant Angus Croll"
—Robert Nyman, Mozilla Tech Evangelist, Editor of Mozilla Hacks

"Best hypothetical question we've heard in a while"
—The Millions

"Looking forward to a tech book for the first time in a long time. [This] is going to be rad"
—Brian LeRoux, creator Phone Gap

(top)