Code is written for humans, not computers

Last updated: Jun 10, 2025
Created: Jun 04, 2025
#public/announce
State of the note
This came as an extraction from Code is an act of rhetoric. As of Wednesday Jun 4 2025, I am happy where this is, but wouldn’t be surprised if I were to come back and expand this out significantly in the future.

Although it’s important for a computer to understand my program, it’s far more important, and far more difficult, for another human to understand what I wrote. As such, my primary focus when writing code is human-to-human communication, rather than human-to-machine.

Obviously, it is still important for the machine to understand what I’m saying, or else the program just doesn’t work, but that’s not my main goal. You might think this differentiates code from prose, but I don’t think it does.

Notably, anything written in English also follows many rules. Ascend tense writ then like this is hard two reed. There are also many ways to grammar a mess up. We just have a tremendous amount of practice writing correctly so these mistakes are less frequent.

However, we still mess up sometimes. We have all written a sentence we’re unhappy with, or even something that straight up didn’t make any sense. The same thing will happen with code.

I find that many new programmers struggle with this: it’s okay to have code that doesn’t run, or that prints an angry error, we just have to fix it. I guarantee you’ll write and say something that doesn’t make sense today, that’s okay! It’s wild to expect perfection when learning a new language, be it computer or human.

Backlinks: