The Eloquent Programmer
Clean code is simple and direct. Clean code reads like well-written prose.
- Robert C. Martin
While most of us would agree with Uncle Bob, that code should read like well-written prose, we usually fail to achieve it. Being able to write code that reads like well-written prose implies that one is capable of writing decent prose in the first place, which is far from true for most programmers.
Wordsmith, or smith with words
Code, to put it very crudely, is just a bunch of words. So, the pre-requisite for writing beautiful code is to write beautiful words.
In order to write cleaner code, one needs to excel in transcribing their thoughts into the most beautiful & simplistic words possible. This requires a disambiguation of code & prose, both on an individual and organisation level. Code encompasses prose rather than being orthogonal to it.
It’s imperative to understand what beautiful prose is, and be able to truly appreciate well written prose before one can begin to write well worded, meaningful statements that clearly express intent.
Mastering the Ink
Writing well-worded statements is quite literally an art. Excelling in writing, like any other vocation, requires study & practise. Writing a journal or a blog can significantly improve one’s ability to drown out the noise, think clearly, and put those thoughts into succinct, purposeful words.
Reading is part and parcel of writing better. Reading more books/articles/blogs give you insights into the minds of other authors, expose you to new phrases/terms/expressions, and gives you better tools to frame your thoughts.
Novice to Master
While I wish there were simpler ways of improving one’s skillset, the only foreseeable way to be better at writing, and everything else for that matter, is by deliberate practise.