Coding Standards Are Necessary Evils

23 Sep 2021

At the time of writing this essay, my class had introduced how to use an IDE, like Intellij, to check and enforce coding standards on our own code. For this class, we would use and implemented ESLint to check and correct our JavaScript code. Alerting me about spaces, indentation, usages of variables/functions, and the like, it is pretty strict in enforcing proper coding standards. However I don’t expect other tools to be more lenient. This strictness results in a small amount of time dedicated to clearing out all the red highlighted sections of code for a green checkmark. Although tedious as it may be, I am able to easily use some shortcuts and the automatic solutions provided by the IDE to make my life easier.

My honest opinion about coding standards is that they are very important in some aspects, but the process to correct every mistake is annoying. Clarity is a problem I believe everyone should consider when coding. It’s already difficult enough trying to understand what the code is doing. So making it easier to read is beneficial for others. Along with this, having a standardized way of writing certain languages makes it easier for people working together. However, the process to actually correct your own code to fit these standards is tiresome and repetitive. Seeing the number of coding standard errors, alerted by the IDE, increase as you type your code is slightly annoying. Seeing the most miniscule of errors like changing a let to a const due to how a variable is used contribute to the what would be a large amount of errors is certainly a little annoying. I even have my own urges on how to wrte my code, like putting begining curly brackets in the next line after statements or functions, suppressed by the tyrannical IDE.

However, I must admit that with this strict system it does encourage the programmer to write code following the standard. Seeing the number of errors increase alerts the user of the potential trouble their future self will face when correcting their code. I think its safe to say people do have a tendecy to worry less about our future selves and perform actions that do harm later on. Luckily, the constant pressence of the error number and the knowledge that my writing of the code now directly effects how much work I have to do correcting afterwards incentives me to write within the standards at the moment. Even now, I consciously make sure to leave a space and curly bracket on the same line. And with enough conscious effort, I can build up a habit. Sure, I may not pay attention when I leave one variable as a let instead of a const. But by minimizing my mistakes, I am definitely making the time for corrections a lot less annoying.