If Hemingway Wrote JavaScript
Just when I thought I had finished all my blog entries, the book I’ve been waiting to arrive for weeks finally lands at my house! So here is another post please enjoy.
I feel like every post I write has something to do with coding, but because of this project it’s basically consumed my life and I don’t really mind that much. So, when I was having a look into research for a few previous posts about poetry and coding, I came across this book on Goodreads.
If Hemingway Wrote Code by Angus Croll reimagines the literary style if a range of writers into a short script of JavaScript code. The challenge in this text is to have each ‘writer’ to use JavaScript to solve several mathematical equations. And what we get is a pool of weirdness.
(Hemingway’s Fibonacci sequence)
The book itself is laid out very interestingly. With each different writer, Croll writes a brief intro on their individual writing styles, then lays out their attempt at writing this code, and then an analysis of how they wrote it.
It’s an incredibly interesting add on to the themes we’ve covered throughout this module and would have maybe been an interesting thing to look at when we were discussing intertextuality before the coding seminar.
“JavaScript has plenty in common with natural language. It is at its most expressive when combining simple idioms in original ways...And like natural language, it’s ready to write”
This brings me back to my previous blog post where I looked at the links between poetry and code as two very distinct, but shockingly similar forms of word and expression. This book does wonders to highlight this argument.
Take, for example, the above image. It is a script for writing prime numbers, written in the style of Borges (because we all love Borges). Croll notes how he combined Borges love of mathematical theory, the geometric arrangement of spaces, a suggestion of infinity, and a story within a story to create this set of code. Much like Borges style, this text is clean and well organised and free from unnecessary cleverness, however, maintains his well-known elements of mystery (with the ‘monstersAscendingAStaircase) and the mention of the over excited narrator.
Likewise, here is the name prime number challenge, as though it were written by Lewis Carroll. Croll uses Carroll to highlight how unconventional and quirky JavaScript can be - much like the language Carroll used himself in the Alice in Wonderland novels. The re-working of functions to become different characters from Wonderland adds this extra layer of authenticity to his piece, going out of his way to make his JavaScript as oddball as possible.
“The future of JavaScript language depends on the willingness of its developers to push the limits.”
The notion of literary programming books is such a unique genre in itself, and by no means is it intended to be any form of instructional text, unless you really want to code like Tupac or Chaucer (although that might be cool), it’s purpose is to integrate coding language into the world of literature, and show how closely related the two spheres are.
Coding is not always good. But it’s always interesting. It took me about 2 hours to read this from cover to cover and I’m really sad it’s finished because now I want to see different authors, different coding formats, different problems. As a supplementary add on that is actually pretty related to the module, it’s great to see some of the themes we’ve looked at in class put into action.
(I’m gonna miss these weird blog posts once this module is over)














