Home » Programming, for writers

Programming, for writers

Us programmers often say that we write code. Code is also expressed in terms of number of lines written.
However, it was when I was talking to a writer friend of mine the other day that I had the chance to explore the many parallels between writing and programming.
Here are a few of the similarities as I observed:
  • Both text and code are written.
  • Writing means you have to follow a set of rules called grammar, programming means you have to follow a set of rules called syntax. Interestingly, syntax does tell you where you need your commas and brackets and full stops and the like. 
  • When writing, you are God in the universe you create. You are restricted by your genre, but that is about it. Anything can happen as long as you ate willing to write it within the confines of your genre. It is similar in programming, with the the program being restricted by the hardware it has to run on, and the language it is written in.
  • Writers have plots and subplots, we have classes and methods.
  • Writers have characters, we have constants and variables.
  • The length of the text and the code both normally define how complex it is.
  • There are word processors, and there are code processors, but both can be written on a notepad, and the program MS Notepad.
  • One requires an editor, the other a compiler.
  • Lastly, they are both immensely fun to do. 🙂

Feel free to add some of your own.
Ps, wrote this on my train in to work, so this classifies as the first of such blog posts.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *