Book Review: If Hemingway Wrote JavaScript PDF  ICON_SEP Print ICON_SEP  E-mail
Written by Karen Leidy   
DATE_FORMAT_LC2

 

 

I found a great book for nerds…and classic book worms.
It’s called “If Hemingway Wrote Javascript,” and is penned by Angus Croll who, according to his bio, “…is obsessed with JavaScript and literature in equal measure.”
Now, I should tell you straight up, I know next to nothing about writing code.  However, I do have a keen interest in science and technology (and comic book heroes); hence, the nerd part.
I am also a lover of the written word and have enjoyed many of the classic writers. 
So, the title intrigued me, and I felt ready for a challenge.
I needn’t have worried about the technical aspect. 
If you love language, whether in literary or binary form, this book is a delightful read.
The distinctive cadence of Shakespeare’s version of a JavaScript code reads like this:

//a CALCKULATION in two acts
//employ’ng the humourous logick of JAVA-SCRIPTE

Croll lays out five common coding problems, and selects five well-known authors to solve each of them, using JavaScript in their own unique style.
You will find Charles Dickens, Geoffrey Chaucer and Sir Arthur Conan Doyle.  Added to the mix are more modern writers, such as Douglas Adams, Jack Kerouac and J.K. Rowling.
Especially entertaining is the JavaScript written is the style of gangsta rapper, the late Tupac Shakur.
“Original and rebellious, Tupac ignores the best practices of the establishment, sneering at semicolons and deriding the use of curly brackets in conditionals,” writes Croll. 
More than that, Tupac’s JavaScript has a rhythm and cadence that begs to be read aloud, preferably accompanied by a DJ, scratching out the beat on a turntable.
In the book’s introduction, Croll expresses the following observation:  “The best authors and the best JavaScript developers are those who obsess about language, who explore and play with it every day and in doing so develop their own idioms and their own voice.”
This creative work should be in the hands of every student of literature, and every computer programmer, to encourage that playfulness and ingenuity.  “If Hemingway Wrote Javascript” will stretch the mind in both subjects.
And, just how would Ernest Hemingway write JavaScript?
He would do it in the same manner as he wrote his stories:  with direct and uncomplicated prose.
Published by No Starch Press, “If Hemingway Wrote Javascript” is available on Amazon.com in both paperback and Kindle version.
Author Angus Croll 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.
Book review by Karen Leidy, Editor.