If Hemingway Wrote JavaScript

If Hemingway Wrote JavaScript

by Angus Croll
October 2014, 192 pp.

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

"Will surely delight programmers and give a few belly laughs to literature lovers...an inventive work of fictional humor that takes coding to a whole new literate level."
Foreword Reviews

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

If Hemingway Wrote JavaScript was recently chosen as a staff pick at Powell's Books!

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.

Check out a behind-the-scenes look at the book: https://javascriptweblog.wordpress.com/2015/01/05/if-hemingway-wrote-jav...

Author Bio 

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 



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


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)


Check out what Angus has to say at HuffPost Books!

See an excerpt from the book featured on Quartz.

"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 Press (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

"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

"Twenty-five famous authors, lots of JavaScript, lots of prose and poetry. What’s not to like? Put “If Hemingway Wrote JavaScript” on your shopping list."
Alan Zeichick, for SD Times (Read More)

"Bring some fun inspiration to the software developer in your life."
Monique DeVoe, for Embedded Computing Design (Read More)

"A fantastic short read that is worth picking up for any lover of computer science or literature. I cannot recommend it enough."
The Eckleburg Project (Read More)

"A charming and diverting series of short and familiar coding exercises told in the style of a myriad of classic and contemporary writers. Lots of fun and technically challenging at the same time."
Benedetti Tech


View the latest errata.