Raise Your Standard With Pride

08 Feb 2018

As a programming general, I like to think of the code that I write not as mere text in a buffer, but as a fierce yet disciplined band of characters, marching down the page towards a common objective. What is that objective? To conquer the kinds difficult, real world problems that can only be defeated by products of algorithmic excellence.

For any army to succeed upon the battlefield, it is imperative that it remain in a well coordinated formation. Enter the standard. In the ancient Roman military, standards were used to identify the various legions comprising the larger force, and served as a means for directing the movements of troops. Standards also served as a shining symbol of Roman military pride and professionalism. Perhaps most importantly, the standard served as a reminder of the deeper purpose of the Roman legions, to serve and protect the senate and the people of Rome.

Just as standards were central to allowing the roman military to remain veritably unchecked for centuries, so too are coding standards a crucial tool which enable software engineers to lead their endless ranks of code to victory. Without standards, code devolves into a convoluted vortex of ASCII characters, fated to consume any unwary programmers who dare to gaze upon it. In contrast, code that adheres to a set standard maintains a level of professional aesthetic that any purposeful software engineer could have a sense of pride in.

When programming in a language like JavaScript–a true barbarian’s language, fraught with subtleties, a lax typing system, and little to no error control–one can be well served by coding standards and inspection tools. Over the past week spent learning to use ESLint along with the IntelliJ IDE, I have come to appreciate how enabling it is to have a linter automatically review the quality of my JavaScript code. While my JavaScript minions were at first an undisciplined rabble, after rigorous grooming at the temple of ESLint, under the tutelage of the Airbnb style gurus, they are now a well structured, coherent unit, ready to conquer even the most difficult of algorithmic tasks.

I find it empowering as an engineer to have the linter at my command, ready to whip my code into formation if needed. I feel confident that when I come back to review my code at a later time, it will take little to no effort for me to grok it. As the old axiom goes, code is read much more often than it is written. Even if the only person who ever reads your code is yourself 6-12 months from now, you will be doing that person a huge favor by emphasizing clarity and structure from the moment you fire up that IDE, and your fingers begin dance across the keyboard. I believe that the adoption and enforcement of coding standards is an excellent way to ensure that your code maintains a level of uniformity rivaling that of the Roman legions of old. Raise your standard with pride!