Programming and Writing
Published Thu Jan 25 2024Before writing for my personal site I did not see myself as a writer. Through writing more I have begun to see the parallels between writing English and writing code. There are some clear cases where a program has been created as both code and text such as Donald Knuth’s literate programming work. Literate or not, I believe we process code and text in similar ways. Can tools and techniques established for writing books or blog posts also apply to writing compilers or video games? Definitely.
Someone looking to author elegant prose faces many of the same challenges as a programmer aiming to write maintainable code. Basic writing advice such as: be concise, plan ahead of time, or studying other sources for inspiration can apply here too. Where a writer plans a story line a software architect creates user flows; instead of reading great books for inspiration we read documentation and other’s code to grow our programming vocabulary.
Programming is often viewed as a completely foreign process only understood by those who have devoted themselves to it. This is far from the case. Many of the skills that create great developers, engineers, and programmers have already been taught to you.
I think of myself as a writer. Sometimes I write in English and sometimes I write in JavaScript
— Douglas Crockford, interviewed by Peter Seibel in Coders at Work