More than Binary

20 Sep 2018

Remmeber to floss

From my own experience with coding standards I have found that they are mostly binary or black and white. You either meet the standards or you don’t. Recently however, I have started to view them as a necessity. Obviously, they are a necessity otherwise everything would be a massive mess. What I am talking about is that coding standards are like a person’s daily routine, like making your bed, brushing your teeth. You can either do the bare minimum and brush your teeth for 30 seconds and have the dentist tell you to floss more or you can go the whole nine yards with floss and mouthwash. In the same way with coding standards, you can either meet the bare minimum and not give a second thought about them or you can make sure everything is well commented, proper spacing, etc. and when it’s time for a code review you don’t have to have someone tell you to floss for the 100th time.

It comes pre-packaged

When it comes to keeping code clean and neat having a few tools never hurt anybody. Specifically, IDE’s or independent developer environments are extremely powerful tools for keeping you code up to a standard. A few IDEs I have used are NetBeans, Eclipse, Brackets, Visual Studio, and InteliJ. InteliJ and Brackets are two of my favorite environments for very different reasons. I have only used InteliJ with ESLint and have not been using it for very long. However, I can appreciate the sheer number of features and robustness of the environment. It’s everything a person wants in an IDE. From various plugins for a wide variety of tools and languages, to a built-in debugger and file system. It has everything one might need for a full-scale commercial product.

Red, everywhere

Based off my personal experience from using ESLint, it’s fairly draconian with standards. This is sort of a double-edged sword for me. On one hand it makes sure my code is consistent but on the other it really disrupts workflow. Having to stop every so often to fix spacing errors with ESLint is a real pain. Of course, I could just fix them all at the end in one go especially considering InteliJ has a feature to do that for me. But seeing red underlines, and especially a lot of them, compels me to fix them as I go.