Such Simple Standards

13 Feb 2020

Transitioning

After the big move from JSFiddle to IntelliJ, I felt like I was doing something completely new despite using the same language. Of course, it wasn’t the first time I used an IDE nor coding in Javascript. It was a very unclear feeling like everything was all too familiar and strange at the same time. After getting some practice in, I feel much more comfortable around using the program only to discover that we were required to use a coding style inspection known as ESLint.

Deja Vu

Prior to this class, I had only used a “coding standard” once and that was in my second semester in my first year of college. Before that, I had never learned of any sort of inspection script that would detect improper syntax in my code. All of my real knowledge of a “standard” came from classes that briefly went over how you should phrase your code in certain languages so that it looks better. I have to admit that it was so much easier to just type things out and not have to deal with all sorts of “red flags” along the way. After taking ICS 211, which introduced a similar coding standard expectation to Java in the Eclipse IDE, I was left wondering what the purpose really was to add extra guidelines for something so trivial. Now, my opinion has completely changed.

Current Thoughts

While it is inconvenient to have several errors in your code that are not directly related to how your code runs, I now feel that having a coding standard is a blessing in disguise. In some way, if everyone used the same coding standard for a language, everyone would have an easier time to look at their code or look at other people’s code. It shouldn’t be similar to looking at a foreign language when someone doesn’t follow the same style as you would implement. With that, it would create a uniform style that would be neat and organized in a way that makes it easy to understand and read. Similarly, having a coding standard means making programmers really take the extra time to be meticulous in their coding. The extra step of fixing their mistakes can build habits of rechecking their prior code to make sure that it not only works properly but also is presentable in its form. It also isn’t the case that a coding style inspection tool like ESLint is that much of an inconvenience either. While it is a bit jarring to see so many red lines marking your code, it contains a tool that tells you what kind of mistake you made, making sure you understand so that you can trivially avoid it the next time. ESLint also provides an option to automatically fix your error for you with the click of a button. So even though many may see a “coding standard” as something trivial and irritating, it really has some uses that could be beneficial to the larger scheme of things.