Member-only story
8 Rules For Coding With Style
Tips for improving your coding style
As a new programmer, you may find it frustrating to have to consistently write grammatically correct sentences in order for the computer to understand you. This is because — unlike human languages — programming languages are unforgiving. A misspelling or misplaced punctuation can render an entire program unusable.
However, a programming language is a communication medium for both computers and humans. After overcoming the obstacle of making computers compile your code, you have to work on making your code legible to other programmers so that it is easy to extend and maintain. Your coding style reflects where you learned to program, what editor you use, which languages you favor, and how you collaborate with others. Whether you choose to use tab or space, comment or no comment, camel-case, or underscore-case, these decisions reveal who you are as a coder and become elements of your coding style.
In this article, we will study the advice of American novelist and essayist, Kurt Vonnegut, on how to improve our writing style with the following rules:
Find a Subject You Care About
Kurt Vonnegut urges writers to pick a subject that they genuinely care about so that their passion can shine through their work. You may have a preferred technology…