Parallels of programming and writing

Kristian Tuusjarvi
3 min readOct 15, 2022

As of late, I have been writing for my doctoral dissertation. While writing, I have noticed parallels between programming and writing. In this article, I share my thoughts about the two.

Background

For most of my life, I did not think much of writing. It is something that I did only in the face of necessity, mainly in schools forced by teachers. I am sure many of you can relate to the feeling. It was only when I was doing my master’s that I started to enjoy writing. Partly because I finally learned grammar rules and liked the challenge and creativity associated with writing. Especially technical writing. Since my master’s (2 years ago), I have been working as a developer and writing my dissertation simultaneously. This has opened my eyes to how the logical thinking of programming can be utilized in writing.

Parallels of programming and writing

Organized from small parts

As a programmer, you want to build your code base out of small functions, which are logically connected to form a larger entity. You code a function or many functions, organize the functions into classes, the classes into programs, and finally, the programs into a more extensive system.

The same logic works when writing text. As a writer, you want to write your text out of coherent, logically connected sentences to form a longer text. You write sentences, organize the sentences into paragraphs, the paragraphs into chapters, and finally, the chapters into an essay, report, or book.

Goal

Programming and writing aim to create a text-based, logically coherent, understandable text that describes either the desired functionality of a program (programming) or the message that an author wishes to relay to their readers (writing).

Understandability

Programming and writing force you to understand what you are writing from somebody else’s perspective. It is not good enough if only you can read your code or text. Other people need to understand it as well. For example, code reviews can be a humbling experience as reviews of your academic papers.

Iterability

Both programming and writing are iterative processes. Even though many programmers claim to write perfect code (myself included), the opposite is true. If you are a good programmer, chances are that you first write something half decent that just about works and then iteratively edit the code until it is coherent, understandable, and maintainable. The text should be written similarly. First, write whatever comes to your mind about a topic and then iterate over it until it is good enough. This is certainly how this article was written.

Creativity

There are a million ways of writing a specific program and a million ways to tell a story. The endless creativity that can be utilized in programming and writing feels very liberating. Think of all the things you can bring into being with a couple of lines of code; similarly, with a couple of lines of text, you can inspire others and be a change in the world.

Leave a comment or clap if you enjoyed it or want to give feedback. :)

Previous article: Flutter performance testing.

YouTube

Twitter

Website

GitHub

--

--