October 30, 2020

Coding Will Improve Your Writing (Vice-Versa)

Ravinder Deol
Reading Time: 4 Minutes

For several years, I had been writing technical articles, mainly covering the areas of cryptocurrency and blockchain technology. During this time, I was never motivated by the idea of learning how to code. I always thought that only those with a particular disposition could do such a thing as coding. As a challenge, I committed to learning how to code. And as I was learning how to code, I started to notice that many of the lessons that one learns when writing, can get applied to coding - vice-versa.

Before I challenged myself to learn how to code, I assumed that other than clattering away at a keyboard, there were little or no similarities. Oh, how wrong I was. Coding and writing alike involve manipulating words. And to do so successfully, one must have a fundamental understanding of syntax, structure and semantics. Though coding and writing share the characteristic of manipulating words, in my preconceived assumption, I considered writing art and coding not. That preconceived assumption reversed when I realized that both coding and writing get created to unravel a story. What's more, I assumed that the code is to be read by computers only. But, in both coding and writing, you are creating your work for readability by humans. The only difference is that coding is crafted for interpretation by computers, and writing is crafted for interpretation by humans. What aligns coding and writing more so, is that when there is a lack of logic, writer's block thrives.

Whether I'm coding or writing, I've found that it's important to think logically about what it is that I'm trying to deliver. Coding and writing alike, get interpreted from left to right, top to bottom (at least in the English language). As a result, the logic of your work is just as much about how your code-blocks and chapters flow. Using the example of J.K. Rowling, she is known to have used a spreadsheet to map out the plot of Harry Potter. That ensured the story flowed with logic. Both coders and writers should view their work as a map, ensuring there is some logic behind it, and that it precisely guides the interpreter.

Coding or writing, I've found it's essential to write with precision and communicate my message clearly, leaving little room for ambiguity. Computers need precise instructions to execute a program. And, readers of non-fiction books need specific instructions to implement the advice shared. Clear-cut writing can come in many forms. In coding, precision can come in the form of well-crafted comments. And, in writing, precision can come in the form of clear topic sentences. Whilst adopting a style of precision, its relative, brevity, should be embraced to help improve the readers' comprehension of the text.

Whether I'm writing a program or an essay, coding has forced me to write with brevity, so long as it doesn't impair the readability of my work. Brevity is essential in both coding and writing. It eliminates potential points of failure. Though it can be more challenging to write with brevity, it renders more rewarding for both the creator and the consumer. As the DRY principle (do not repeat yourself) in programming can apply to writing. George Orwell's lessons on writing can apply to coding. So much is the case that coding and writing are alike, Donald Knuth, the creator of the 'literate programming' methodology, describes a practitioner of literate programming as an essayist. Though don't get misguided into thinking that brevity must get achieved in your initial drafts, brevity comes later, often in the process of editing your work.

Any notable work that I feel I've created has seldom gotten achieved in the initial drafts. It's in the editing process where that work has taken a more refined form. Every writer, be it a coder or a novelist, will agree that to some extent, the editing process is one of the most challenging, yet rewarding aspects of their work. Because of personal attachment rendering the creator blind to their faults, peer reviews should get welcomed. In the editing process, a coder would be looking to crush bugs, and a novelist would be looking to fix grammar errors (among other things). It's in the editing process where all writers can ensure their work is concise. There should be no added fat. That doesn't mean that every code block or paragraph must be short and lacking in imagery. It means that each word you use must have a purpose for being there. Editing should always come after your initial drafts to combat 'writers' block'. And never edit in your head as you write. Though it continues to be challenging for one to become an exemplary writer, it'll be much more challenging if you don't take the time to read the great works in your field.

It has gotten said many times over, that you should go looking for ideas in a related field, and that's what I did with coding. Like many other crafts, coding and writing take a lot of practice to master. But the great thing about both of these disciplines is that you can shorten the feedback loop, allowing you to take strides in your ability. There's only so much theory that serves purposeful when you're honing a skill. So do as the great artists of bygone eras have done - learn by iterating. Start by imitating the work of those you admire. Benjamin Franklin is known to have honed his essay writing skills by imitating the work of those he admired. And the idea of reading more to get a better result is as valid as ever. Remember, the only way that people can hear from you is if you get started, even in the smallest way.

From my experience, I can conclude that coding and writing are more alike in my mind than they have previously been. And the skills learned in one can be applied to the other. Both remain challenging, as does with all creative skills (the Latin word for 'skill' being 'ars', relating to arts, skill and craft). At a time when we're required to wear more hats, combining two skills of a complimentary nature could be your growth path. And just as the act of coding makes you a coder, writing makes you a writer. But the best in both of these disciplines know never to stop learning. And they understand as you do, that there is no substitute for beating on your craft.

Ravinder's Newsletter

Join 1,000+ People Who Already Subscribed

Every week, I send out an email with the work I have shipped, and the work that has piqued my curiosity. Join 1,000+ subscribers.

You're in! Check your inbox for an email.
Something went wrong. Please try again.
Not convinced? Read this sample.