HACKER Q&A
📣 marttt

Works of fiction that have inspired you to solve programming problems?


Often times, programmers turn to music to get their brain ready for coding. Have you ever felt the same kind of inspiration after reading works of fiction by certain authors?

In other words, I wonder if the structure, language, composition etc in a novel might "open up" the reader's brain in a similar way that e.g. musical works by Bach or Philip Glass seem to get some coders "in the zone".


  👤 saeranv Accepted Answer ✓
The second part of your question is thought-provoking. There are a lot of works of fiction that have inspired me due to broad themes, but there are a lot fewer whose inherent "structure, language, [and] composition" have inspired. So I'll try and focus my answer on this latter idea.

Also, I'm going to list these from 1 to 2, but the first is an order of magnitude better then the second, so think of them on an inverse log scale.

1. David Foster Wallace's short story "The Awakening of My Interest in Annular Systems". DFW is a brilliant writer in general, but his writings on math and logic have always been so unique and powerful to me. This one is my favorite. There's this combination of melancholy, and mathematical precision that was one of the first times I started to think about the beauty of analysis, and in particular, abstracting n-dimensional geometric space.

2. Peter Watt's novel "Blindsight". Blindsight has a very different mathematical feel to it, compared to DFW's stories. It's almost the opposite. Very sloppy (stylistically, not in terms of accuracy), filled with jargon, and always slightly outside the limits of my comprehension, (actually a lot of times just plain outside the limits of my comprehension). But that layer of overwhelming, rapid-fire technical description ends up creating this very interesting, frenetic, cyberpunk/dystopian aesthetic, as the plot builds momentum.

Honorable Mentions/Other stuff:

- Watt's "Echopraxia" (sequel to Blindsight)

- Neal Stephenson's "Anathem"

- Arthur C. Clarke "Rendesvous with Rama"

- Greg Egan's "Permutation city" and "Diaspora"

Art/Architecture:

- Philip Beesley's Hylozoic Soil installations (my advisor in uni!)

- All of Junya Ishigami's installations/architecture.

- All of Rafael Moneo's buildings & writings.


👤 pjc50
This is the most interesting Ask HN I've seen in some time, but I'm afraid I have no good answer to it. I don't listen to Bach, I listen to absolute trash dance music while programming, and lately the pandemic has seemingly killed my desire to read fiction. I have no idea why.

I have occasionally wondered about writing a programming language optimised for spoken word; not just the basics of trying to avoid sigils and punctuation, and of course significant whitespace, but also trying to make it possible to write code that has "metre" and rhyme to it.


👤 abernard1
For what it's worth, the following three stories/novels have that effect on me. There's something about them that seems surreal and foreign, a little magical.

- The Machine Stops, E.M. Forster

- Erewhon, Samuel Butler

- The Alchemist, Paulo Coelho

The styles and formats are completely different. The only common thing I can think of is that there's this invisible guiding force in all of them, whether it's good or bad. The Machine Stops is a dystopia about technology in absence of a soulful humanity. Erewhon is wild. Truly wild. It has to be a genre all its own, something akin to Darwinian technopunk. The Alchemist is probably one of those novels you could riff on with a yoga instructor and have a good conversation :joy:. It's classical magical surrealism, but it's a good story about a person's lifetime journey. Nothing deep, but it's wholesome.

Edit: also will add A Canticle for Leibowitz by Walter Miller Jr., and Titus Groan by Mervyn Peake.


👤 berlinquin
I can recommend anything by the Argentine author Jorge Luis Borges. He's primarily an author of short stories. Of those, The Library of Babel is how I was introduced to him.

There's a cool programming project already based on this short story that I've enjoyed exploring: see https://libraryofbabel.info/

And looks like there's a link to the story on archive.org: https://archive.org/details/TheLibraryOfBabel/


👤 schwartzworld
White Light by Rudy Rucker illustrates set theory in a way I found very inspirational.

👤 jimmyvalmer
You might be thinking of nonfiction, particularly nonfiction about programming.