The Importance of Coding Standards

09 Feb 2017

The best applications are coded properly. Although this may sound obvious, I mean “properly”, in that the code does not only perform optimally, but it is also easy to read, add to, maintain, and debug. There is nothing worse than inheriting an application or program that requires more time and effort to decipher because it was written poorly. When looking at unfamiliar code, it is much easier if it is well laid out, spaced correctly, and neatly commented where needed. In my software engineering class, our professor has chosen to teach us coding standards with the Javascript linting tool ESLint. This essay will focus on my early experiences using ESLint with IntelliJ and why coding standards are so important.

I have only been using ESLint for a week and although it initally annoyed me, I am now starting to see why it’s so crucial. My professor has strictly enforced its use and has made it a requirement to produce the illusive ESLint green checkmark before we are allowed to turn anything in. The green checkmark only appears when the code adheres to all ESLint rules and this can produce quite a bit of stress when attempting to finish a timed, graded WOD in class. Any code that is turned in without a green checkmark is considered invalid even if the code does what its suppose to. At first this was frustrating as many of us had problems with the configuration of ESLint within IntelliJ, but I have found that it is rather useful once you adjust. Not only am I now coding in an aesthetically pleasing way, I am also making it easier for others to read and understand my code. I’m sure this also makes our TA’s grading experience less awful, which is always a good thing.

After reflecting on my previous computer science classes, I have realized that I never truly understood the importance of coding standards. While most of my other classes did require them, I would generally just write my code the way I liked and at the end I would use an IDE to automatically format it to the required standard. This was effortless as most instructors provided some sort of code style XML that could be specified within the IDE. This reformat option was convenient, and while IntelliJ does have something similar, it does not apply the ESLint rules. Instead, the error in the code is highlighted and the violated rule is outputted so that it can be manually fixed. I’ve found that this is far more effective as a learning tool because I had to go through all the errors and fix them one by one. Even in a short amount of time I feel as if I am starting to get in the habit of coding up to the industry standard and I truly believe that this will be beneficial as I progress in my career.