I don’t know why, but for some reason, I didn’t enjoy programming when I was an undergraduate student. I hated my identity as a student of computer engineering and the sole reason behind my hatred was my detachment towards the art of programming. The idea of a big computer program — in my eyes — was same as that of an illiterate man staring at the thick works of nineteenth-century authors. Programming — to me — was the science of mystery that only lead to unsolvable puzzles. It took me almost four years of my undergraduate life, and few more years after my graduation to realize programming is fun, and good poets, novelists, writers, musicians, and programmers — all of them — follow a similar route in life to achieve their artistic goals.
There are lots of attributes common in a good programmer and in a good writer. The path to be a good writer and a good programmer—both—starts with hit and trial: the writer with the natural language and the programmer with the language the machine can compile and interpret. The only way to become a good writer is to write a lot and read a lot. Similarly, a person can be a good programmer only by writing codes and reading the lines of code written by other programmers. All programming handbooks and tutorials are useless if you don’t sit down and write lines of code. All style guides and writing workshops are useless if you don’t try writing a good sentence. A shortcut never exists for writers and programmers.
Writers are guided by their own instincts, so are the programmers. Different programmers have different approaches to the same problem. An optimized program requires the least possible amount of resources to solve the problem, and a programmer’s ability is judged not by whether he is able to solve the problem, but by whether he is able to solve the problem using an optimized approach. I believe a good writer’s ability is also like that of a good programmer — conveying his idea to the readers using the least number of words and yet preserving the aesthetics of the work.
Programming is not beginner friendly to most of the people, especially with some languages like C, C++, and Java. It takes a lot of time to get your basics right, and once you are done with the basics, it gives you sheer pleasure. Writing a big computer program feels like writing a novel, and every time you write a new program, you can only get better with your craft.
It is not surprising to me to realize both — my heroes of the computer science world, and my heroes of writing and literature — live a similar life as an artist.