The Surprising Similarities Between Writing and Coding

Simon Pitt
Blank Page
Published in
6 min readFeb 8, 2021

--

Photo by J. Kelly Brito on Unsplash

Every day, for hours at a time, I sit at my computer and tapdance my fingers across the keyboard. Sometimes I type words for emails or articles. Sometimes I type a weird pseudo-language full of brackets and dots and semi-colons, telling the computer what to do.

When we write prose, there is plenty of whimsical advice. Think about your ideal reader, they say. Imagine them reading your words and write to them directly. Don’t use (pointless) adjectives. Passives should be avoided. Never use a five-dollar word when a fifty-cent one will do. But whatever we write, some people will enjoy it and some will not. We have no platonic reader who will get each reference and love every turn of phrase. When we write code, on the other hand, we do have an ideal “reader”: the computer. A reader that is simultaneously more forgiving and less forgiving than a human. Computers don’t care about style or clarity. They won’t try to start bad-faith arguments with you on Twitter. But they really, really care about typos.

There is plenty of whimsical advice about coding too. Use meaningful names. Don’t reinvent the wheel. Coding advice tends to contain more acronyms. YAGNI — “you aren’t going to need it.” DRY — “don’t repeat yourself”. SOC — “Separation of concerns”. They sound like verbs: dry your code out, soc it on the nose. Some advice is more…

--

--

Simon Pitt
Blank Page

Media techie, software person, and web-stuff doer. Head of Corporate Digital at BBC, but views my own. More at pittster.co.uk