Goodreads helps you keep track of books you want to read.
Start by marking “If Hemingway Wrote JavaScript” as Want to Read:
If Hemingway Wrote JavaScript
Enlarge cover
Rate this book
Clear rating
Open Preview

If Hemingway Wrote JavaScript

4.14  ·  Rating details ·  327 ratings  ·  60 reviews
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 langu
Paperback, 200 pages
Published October 23rd 2014 by Penguin Random House LLC (No Starch) (first published August 25th 2014)
More Details... Edit Details

Friend Reviews

To see what your friends thought of this book, please sign up.

Reader Q&A

To ask other readers questions about If Hemingway Wrote JavaScript, please sign up.

Be the first to ask a question about If Hemingway Wrote JavaScript

Community Reviews

Showing 1-30
Average rating 4.14  · 
Rating details
 ·  327 ratings  ·  60 reviews

More filters
Sort order
Start your review of If Hemingway Wrote JavaScript
عمرو صبحي
Jan 10, 2015 rated it it was amazing
Follow your heart, but take Javascript with you.
Dec 03, 2014 rated it did not like it
Bravo to the author of this book for successfully acquiring my money.

I didn't know what to expect with this book, but I suppose it is pretty much summed up by its title. You won't learn programming from this book and you won't get any deep insights about the featured authors.

Instead of reading this book, I would recommend looking at the list of authors who are featured in this book and getting one of their books. Hardcover would be preferable, and something substantial like Joyce's Ulysses woul
Jigar Brahmbhatt
Jan 11, 2017 rated it really liked it
This book is an exciting exercise. It is very amusing to see the authors code, and amusing still to know that Angus Croll is quite well versed in both coding as well as literature to pull off an idea like this. The analysis of style he provides per writer is bang on. When asked to produce a Fibonacci series for a given "n", Hemingway produces the most essential, no-nonsense code (not an extra line or variable anywhere), while Andre Braton, the surrealist, defines an array of indefinite length an ...more
Oct 24, 2014 rated it it was amazing
Shelves: literary, programming
A unique genre, all it's own: literary programming books.

Here we have a survey of 25 authors, along with a JavaScript programming problem written using code in the style of that author. Croll provides a short biography of each author, a code snippet, and then some explanation of why the snippet was written the way it was.

Lots of fun and JavaScript in-jokes, but also a thoughtful exploration of the flexibility of JavaScript and some of it's more esoteric elements. Also, might even teach you a f
Aug 21, 2014 rated it it was amazing
Reading this book, I am reminded first of my friend Mike. Of an evening in Baltimore at a mutual friend's home. Of vodka consumed and books given conversational chase and perhaps not a small amount of hero-worship on my part as he accelerated into his chosen field and I languished behind a copy machine at the worst-performing Kinko's in the country. [^1] House of Leaves may have been involved.

And I am reminded of my friends David and Jeffrey. Of our many lunches together and how they would v
Mar 14, 2016 rated it really liked it
as I was reading this, I thought to myself that this book is probably the only programming book out there right now that I can read in less than two weeks (and I did end up finishing it in less than two weeks). this fact reminds me that I'm still way more interested in writing and expressing than grammar (of both programming and non-programming languages), although I often wish it was the other way around. I usually try to read a programming-related book and a non-programming related-book (usual ...more
Mar 18, 2016 rated it liked it
I loved this book at first--it seemed written especially for me, and I laughed out loud a number of times. Croll is an excellent writer, and he shows a deep love and appreciation for both literature and javascript. Many of the code samples are ingenious, and I usually learned a thing or two from each example. But too many code samples don't really work. They bear only a superficial relationship to how I'd imagine a writer might code, such as by using variable names from character names in an aut ...more
Jan 06, 2016 rated it it was amazing
Pick your favorite author, pick your favorite JavaScript interview question, then throw the 2 together. The result is delightful. It is known that computer programming is a science, but it's also an art, and rarely have the two facts been conjoined so lovingly.

You do not need my recommendation. Brendan Eich, the creator of JavaScript, said the book is cool. Marijn Haverbeke, author of Eloquent JavaScript, loved it.

Only 3 of the authors profiled were alive @ the time the book was published. That
Feb 23, 2020 rated it it was amazing
Feb 20, 2020 rated it it was ok
While the author has done their part of thoroughly understanding how those authors used to write, I still can't figure out what this book had offered me. ...more
Cole Simmons
Apr 07, 2015 rated it liked it
Because everything can be done in so many different ways, JavaScript is very reflective of the writer. Croll beautifully displays this by showing what various programs would look like if written by different authors. In total, 25 different authors - from J.K. Rowling to Lewis Carroll - are divided up among 5 different programs. Background is given for each author, and it is explained why their code would look like it does. Many of the programs are almost unintelligible - especially for the autho ...more
Piyali Mukherjee
Jun 27, 2016 rated it it was amazing
Recommends it for: coder-writers
To say that I love this book is an understatement. A collection of the best authors of our time writing JavaScript solutions to basic CS problems, this book does not fail to delight. Special mention to
-> Shakespeare: declares variables as dramatis personae and ends loops with exeunt
-> Sir Arthur Conan Doyle: Ends recursions with "whatever remains, no matter how improbable must be the truth"
-> Jane Austen: Equality comparisons with "It is a truth universally acknowledged that two values can only
Aug 29, 2015 rated it it was amazing
The combination of literature writer style and coding is so much fun. It can give u laugh, wonder smile and fun.
Books that combine classic-literature humor and programming-language humor are obviously meant for a niche audience, but as a longtime literature obsessive who recently learned how to code, I am presumably the reader Angus Croll had in mind for If Hemingway Wrote JavaScript. Still, I’m not yet at the point where “clean,” standard JavaScript (the kind Ernest Hemingway would write) is fully intuitive to me, so I kind of wish I’d waited to read it.

The book consists of 25 brief JavaScript programs
Jun 22, 2017 rated it it was amazing
This is what happens when a love for language in its most literary sense spills over into programming syntax. And the the oddities of Javascript lends itself well to these algorithmic flights of fancy. Angus Croll's passion for reading and Javascript are hard to miss. The illustrations are brilliant and the material providing background on each writer (Ernest Hemingway, David Foster Wallace, Jane Austin, Lewis Carroll, Tupac, etc.) is fantastic. I wanted to understand more about higher order fun ...more
May 10, 2019 rated it it was amazing
Shelves: read-paper
You need JavaScript familiarity to get this book.

That’s said, for such a niche market, this is a work of art. It’s absolutely hilarious and dances the knife’s edge between pretentiousness and flippancy. I found myself getting upset at the supposed authors for writing the JavaScript the way they did, it was very convincing and the commentary is priceless.
Sweemeng Ng
Mar 16, 2017 rated it it was amazing
While I don't recommend using some of the codes in the book in production, it does surprise me with the way code can be written in javascript.

The code is not always good, but it is always interesting.
Angel Garbarino
Jun 21, 2017 rated it really liked it
Enjoyable. This was a gift and it was well chosen. I found it light hearted, comical and yet oddly educational. It makes me smile to think a twitter programmer wrote this.

Well done.
Sep 29, 2017 rated it it was amazing
Amazing. It's the first software book doesn't make me open a code editor, and It's the first non-software book contains code blocks inside. Cool. ...more
Stephen Bennett
Mar 23, 2018 rated it it was amazing
A very clever and witty book that brings together two, what initially appear as fairly disparate, topics in a easy to read way. It also showed me how little I know of JavaScript!
Jerry Yoakum
Apr 17, 2018 rated it really liked it
Shelves: read-some
A fun book that mixes literature with programming by examining JavaScript written in a style that is similar to various authors. Much funnier if you have read books by the discussed authors.
Oct 25, 2018 rated it it was ok
Original idea. Funny. But the book doesn't add too much. ...more
Jul 25, 2020 rated it it was amazing
Very amusing and unique programming book (understanding of JavaScript is required!) which reminds us that programming truly is a form of art.
Doug Lautzenheiser
Oct 18, 2020 rated it really liked it
Imagine your school wants to rush through classes by combining two subjects. This would be your textbook for Literature and Web Programming.
Dec 13, 2020 rated it it was ok
Shelves: reference, read-2020
This review has been hidden because it contains spoilers. To view it, click here.
Wojtek Ogrodowczyk
Dec 26, 2016 rated it it was amazing
I loved reading this book. However, it requires you to have a basic understanding of JS syntax and programming patterns, and some basic literary knowledge, to fully enjoy it. If you do, it's a pleasant evening read of a beautifully designed book.

You might even learn a new trick or two!
Sep 12, 2014 rated it it was amazing
if Hemingway wrote JavaScript is a labour of love; of love for literature, for Javascript and for programming at large.
Much like Fernando Pessoa's heteronyms, Angus Croll manages to put himself in the shoes of some of the most famous writers in the history of western literature and answer a strange question: how would they write JavaScript?
Now, needless to say that finding the answer to that question wouldn't be possible without the ludic spirit of the author and a healthy disregard for the more
Tom Spruce
Mar 09, 2016 rated it really liked it
"If Hemingway Wrote JavaScript" is a whirlwind tour of the literary world and a creative exploration of JavaScript code. Even a non-programmer can enjoy the first half of content in this book by ignoring the code portion.

As a seasoned coder, it's best to restrain yourself during the introduction where the author preaches the looseness of JavaScript as some sort of creative virtue. I could be writing my own essay in counter to the author, but it's not appropriate.

The JavaScript here is not mean
Cihan Koseoglu
Feb 09, 2017 rated it really liked it
I think it was really funny, the whole thing can be finished under an hour, I skipped like 4-5 author examples, of authors I did not really know, but the book was fun.
Dec 03, 2014 rated it liked it
A neat idea and a nice bundle of literary lore for folks who may or may not have a lot of exposure.

It could use more thorough comparisons. Also, it would be nice if more of the approaches had value. There were times when I was like, "oh lord no." over the code when I really appreciate the writing of the proposed author.

I think the study of code as literature has merit and that in the future I hope we'll all be reading better code because its writer was influenced by the greats. I know I seek to
« previous 1 next »
There are no discussion topics on this book yet. Be the first to start one »

Readers also enjoyed

  • Devolution: A Firsthand Account of the Rainier Sasquatch Massacre
  • Code Complete
  • Sources of Power: How People Make Decisions
  • The Modern Russian Army 1992–2016
  • Chinese Soldier vs Japanese Soldier: China 1937–38 (Combat Book 37)
  • نادي السيارات
  • Sailor Moon Eternal Edition 6
  • Sailor Moon Eternal Edition 5
  • The Little World of Don Camillo
  • The Heroic Legend of Arslan, Vol. 1
  • Our Last Crusade or the Rise of a New World Manga, Vol. 1
  • The Legend of Dragon Quest: Creation - universe - decryption
  • The Quintessential Quintuplets, Vol. 1
  • Knights of Sidonia 1 (Knights of Sidonia #1)
  • Witch Hat Atelier, Vol. 1
  • とんがり帽子のアトリエ 3 [Tongari bōshi no Atelier 3]
  • とんがり帽子のアトリエ 5 [Tongari Boushi no Atelier 5] (Witch Hat Atelier, #5)
  • とんがり帽子のアトリエ 4 [Tongari Boushi no Atelier 4] (Witch Hat Atelier, #4)
See similar books…

Goodreads is hiring!

If you like books and love to build cool products, we may be looking for you.
Learn more »

News & Interviews

Looking for a fictional meet-cute in the new year? We've got some steamy novels for you to snuggle up with, including Casey McQuiston's...
46 likes · 11 comments