Goodreads helps you keep track of books you want to read.
Start by marking “If Hemingway Wrote JavaScript” as Want to Read:
Blank 133x176
If Hemingway Wrote Jav...
Angus Croll
Rate this book
Clear rating
Open Preview

If Hemingway Wrote JavaScript

4.15  ·  Rating details ·  298 ratings  ·  54 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
ebook, 192 pages
Published October 1st 2014 by No Starch Press (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

This book is not yet featured on Listopia. Add this book to your favorite list »

Community Reviews

Showing 1-30
Average rating 4.15  · 
Rating details
 ·  298 ratings  ·  54 reviews

More filters
Sort order
Start your review of If Hemingway Wrote JavaScript
عمرو صبحي
Follow your heart, but take Javascript with you.
Dec 03, 2014 rated it did not like it  ·  review of another edition
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
Jigar Brahmbhatt
Jan 11, 2017 rated it really liked it  ·  review of another edition
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 ...more
Oct 24, 2014 rated it it was amazing  ·  review of another edition
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
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
Mar 14, 2016 rated it really liked it  ·  review of another edition
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 ...more
Mar 18, 2016 rated it liked it  ·  review of another edition
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 ...more
Jan 06, 2016 rated it it was amazing  ·  review of another edition
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
Cole Simmons
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 ...more
Piyali Mukherjee
Jun 27, 2016 rated it it was amazing  ·  review of another edition
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
Aug 29, 2015 rated it it was amazing  ·  review of another edition
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  ·  review of another edition
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 ...more
Elijah Fry
May 10, 2019 rated it it was amazing  ·  review of another edition
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
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.
Sep 29, 2017 rated it it was amazing  ·  review of another edition
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.
Stephen Bennett
Mar 23, 2018 rated it it was amazing  ·  review of another edition
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  ·  review of another edition
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.
Jun 21, 2017 rated it really liked it  ·  review of another edition
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.
Oct 25, 2018 rated it it was ok  ·  review of another edition
Original idea. Funny. But the book doesn't add too much.
Wojtek Ogrodowczyk
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  ·  review of another edition
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  ·  review of another edition
"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
Cihan Koseoglu
Feb 09, 2017 rated it really liked it  ·  review of another edition
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.
Sep 13, 2016 rated it really liked it  ·  review of another edition
Shelves: humor, geekery
If you’re not a programmer, you’re not this short book’s target audience. But if you think that programming and software engineering are straightforward linear sequences of “find problem, solve problem”, with no creativity, fun, or poetry, then you ought to at least borrow it at the library, and see for yourself that there are many ways a problem can be solved.
If you are a programmer, then you know that there’s creativity involved, and will appreciate how Croll translates various authors’ quirks
Dec 03, 2014 rated it liked it  ·  review of another edition
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
Alasdair Craig
Oct 02, 2015 rated it it was amazing  ·  review of another edition
Shelves: programming
I was expecting something completely whimsical. Instead I found it quite brilliant, so clever and creative with laugh out loud moments. With informative introductions to the various writers and their written style, I found myself reading up about books and authors that sound intriguing. I'm so impressed by the creativity of author Croll in thinking this out, and also impressed by the Javascript language for the variation in structure and expressiveness it allows, as wonderfully "demonstrated" by ...more
Aug 21, 2016 rated it really liked it  ·  review of another edition
This is quite a good exposure book to the literary world for developers. Has valid javascript written in queer ways depending on the author. It is a good change in perspectives, not really practical, but theoretical. It exposes the different writing styles of the author in a way that is relatable to me as a programmer, an author of codes.

Overall would recommend to those who have feet in both the lit world and the programming world. But then, I may be biased because I feel all authors should be
Dec 29, 2014 rated it it was amazing  ·  review of another edition
Shelves: read-novels, on-shelf
Bending javascript in all possible and impossible ways, this book makes you smile, wonder and laugh (in any order) to finally leave you surprised or not, over the code served in the style of famous writers. Another contribution of this great book to the world of literature could be to make you curious to read some of the authors' masterpieces, if you didn't do that yet.
Aug 24, 2016 rated it really liked it  ·  review of another edition
Javascript aside, the Angus Croll gives an excellent analysis of notable writers' and poets' writing style and personality. Each writer conveys their unique approach of writing a javascript exercise. It was fun reading each and a few even gave me a chuckle (William Shakespeare, Dan Brown, Franz Kafka).
« previous 1 next »
There are no discussion topics on this book yet. Be the first to start one »

Readers also enjoyed

  • Inherited Disorders: Stories, Parables, and Problems
  • A Book of One's Own: People and Their Diaries
  • Men Without Women
  • The Wondrous Workings of Planet Earth: Understanding Our World and Its Ecosystems
  • In Our Time
  • JavaScript: The Good Parts
  • The Imperfectionists
  • Carthage Must Be Destroyed: The Rise and Fall of an Ancient Civilization
  • The Social Tutor (Branches of Love #1)
  • Rescuing Lord Inglewood (Inglewood #1)
  • Discovering Grace (Inglewood, #2)
  • Martha's Patience (Branches of Love, #0.5)
  • Mr. Vertigo
  • Stuff Matters: Exploring the Marvelous Materials That Shape Our Man-Made World
  • In the House in the Dark of the Woods
  • De forsvundne nazidokumenter
  • A Deepness in the Sky (Zones of Thought, #2)
  • Supertrends
See similar books…

Goodreads is hiring!

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