Professionals have standards

13 Feb 2020

When writing your traditional essay there are some stric rules you need to abide by in order to even make sense to the reader. These set of rules is called grammar and without proper use, what you want to say won’t be understood. This is similar with coding and proper syntax usage, but the person that needs to the syntax to be correct to understand it is the computer. Having this enables the programmer to have a little leg room when coding. As long as the syntax is fine, your code can be formatted in a number of ways and the computer won’t complain. But another human reading it might, and they often do. To circumvent this, there are some coding standards that have been made.

The coding standard that I am currently using when typing Javascript is implemented with ESLint, and in order to show my professor my code I first have to satisfy ESLint. This can be a very trivial task. While trying to make the CPU happy by making my program run correctly and not forgetting semi-colons, I also need to make ESLint happy by making the code look pretty. At first this may seem like a nuisance, but it in fact saves others the trouble of trying to figure out how to understand my code. Some of the code style of ESLint lays in appropriate spacing and tabs to make the code look pretty, but other aspects of it actually force you to code in a way that makes it easy to read and more importantly, easy to trace. I feel that this is very useful to know before entering a professional environment, because you’ll more than likely be working with a team, and if those people look at your code and can’t make sense of what they see nothing will get done. It’s like organizing a toolbox. The task may be a tedious task, but now anyone can look at it and find what they want, rather than only you.

In the quest of attaining the green check mark from ESLint, I go through many headaches to find what the check style is complaining about and how to satisfy it, but the struggle pays off in the end when the innevitable run-time error occurs and I, or anyone else, who tries to solve the issue and can easily trace the clean product of ESLint’s code style. ESLint seems like the standard for code style that is probably used professionally, so by me suffering with this tedious check style, whoever reads my code in the future will be happy I did.