Monday, September 10, 2018

One True Sentence

I almost forgot that today is my blogging day as it is a public holiday. I spent the day at home, mostly doing some work while listening to some of my favourite podcasts. Work these days usually mean writing code.

I don't consider myself a very good programmer but I still seem to write better code than many of the people I hire. Which is why I end up doing most of the tough work myself.

Coding helps one to discipline the mind--it is an exercise of breaking down a large problem into smaller chunks. Each chunk is then constructed using building blocks available from the programming language. A good programmer ensures that these chunks are themselves building blocks, which can be reused to tackle future problems.

Re-usability, maintainability and simplicity are my goals whenever I code. They are not always achievable but I try my best. I consider programming a workout for the mind, very much like running on the treadmill. I am grateful that I have a job that allows me to keep myself mentally fit.

Coding is an easier job compared to writing. There are an infinite number of ways to express a thought using words and sentences. One could stare at a blank page for hours without any results. Coding on the other hand is logical--there's always a way forward. The programmer's challenge is to go about tackling it in the most efficient way.

Despite coding being an 'easier' task compared to writing, sometimes the task could be rather daunting. Especially so when the piece of software you are developing has many interdependent parts, and you are building onto something that's already running live. The migration of new code into production can be a nail-biting affair. Any carelessness will break a live-running service. This is one unique challenge that a prose writer will never have to face.

But whether I'm writing code or prose, I always remember Hemingway's advice in A Moveable Feast:

Do not worry. You have always written before and you will write now. All you have to do is write one true sentence. Write the truest sentence you know.’ So finally I would write one true sentence, and then go on from there.

This was exactly what I did when I started this post: one sentence at a time. There's always only one task to do: One sentence. A single line of code. Continue doing that, and you'll reach the finishing line.