What if Hemingway Wrote JavaScript?

Share

What if Hemingway Wrote JavaScript?

It's unlikely Ernest Hemingway would have thought much of programming. Staring at a screen all day hammering out Perl doesn't seem like something Papa would have enjoyed. A typewriter in the Cuban sun was more Hemingway's bag.

But what would it have looked like if Hemingway had cracked open Vim and written a few web apps? Angus Croll, an engineer at Twitter, has one answer in a great post that looks at how some famous writers might have written code. Here's Croll's take on how Hemingway might have written JavaScript:

Code reduced to its essentials with no word or variable wasted. It's not fancy; maybe it's even a little pedantic – but that’s the beauty of Hemingway’s writing. No need for elaborate logic or clever variable names. It's plain and it's clear and it does what it has to – and nothing more.

The whole post is funny and well worth a read, particularly if you happen to have come to programming from a background in liberal arts. Other authors Croll covers include Shakespeare, Dickens, Bolaño and my personal favorite, surrealist Andre Breton. Also be sure to check out Croll's JavaScript blog.