Novelists vs Programmers

March 11, 2019

Spent today reviewing my notecards again and started Watch & Code premium.

Gordon shares an interesting comparison between novelists and programmers.

On Reading: Reading code is the most important and most difficult skill to require as a programmer. Without this ability, you cant learn from the programmers who came before you, because you wont have the ability to read any of their code.

This was an interesting and fair point - I never heard anyone emphasize the importance or value of reading code before - especially in the learning phase.

On Novelists and Programmers:

Without exception, novelists read a lot. There are three main reasons:

  1. To learn about new techniques that you can use in your own writing
  2. Reading can help you think about new topics or help you see things differently
  3. Reading helps you get a natural comfort and fluency in the written language

If a novelist took this approach to programming, theyd first learn about the simple building blocks of code, like functions, loops, if statements, and so on. From there, theyd read progressively more difficult programs, much in the same way a novelist might work from reading Dr. Seuss to reading Tolstoy. And during this process, theyd discover that the quality of code theyre able to write is directly correlated with the quality of code theyre able to read.

...At a local programming meetup, the common scene is the exact opposite of everything the novelist knows to be true. Regardless of experience, nobody reads code. Now they read books about code, but they don't read code directly, at least not by choice.

This seems to be the case - most programming advice emphasizes writing code along with coding book / resource recommendations rather than reading code itself.

The relationship between reading & writing

The relationship between reading & writing in novels is strong but loose. If you want a chance of writing something as substantial as War & Peace, reading it wont get you there.

In programming, the relationship between reading and writing is essentially one to one. Anything you read (and understand), you can certainly build something of the same quality.

Again, I've never heard this analogy highlighted in such a way, and I feel much more incentivized to spend the time and effort on reading existing source code.

Today's assignment was to spend at least a couple of hours reading through the source code of a sample app.

I briefly looked over it, but will actually take the time to dig into it tomorrow.

Changed my shift schedule at my job to start early mornings rather than in the afternoon. Gotta be up by 5:30 tomorrow!

← back to all posts