The Coding Standard

08 Feb 2018

I’ve always had mixed feelings about social norms. Of course, we have laws that are needed to promote order and prevent, or at least discourage, heinous acts. But what about when it comes to fashion and style. Are we just slaves to whatever society dictates looks “normal?” This is where I’d say that things go a little awry. When it comes to coding, it can be similar to that of a sense of fashion in which everyone may have their own unique taste. We can write a multitude of functions that all do the same thing and yet, they can be written in different ways depending on the coder. Even beyond that, the style in which we write can be different from others where, in JavaScript, someone may put a space between the parameters of their function while someone else may put them together to give something like

function (stuff, here) As opposed to function(stuff, here)

It’s the little things like these that can add personal flair to the developer’s work and yet, it could become confusing to another when it differs from their own sense of style. This is where ESLint comes in.

ESLint has a lot of rules of its own that we have to abide by when coding. It’s similar to that of a rubric by which we have to follow if we want a good grade or, in the case of ESLint, a green checkmark. It forces everyone’s code to be in the same style as that of a constricting office where everyone wears the same thing. Hawai’i however, differs in that we have Aloha shirts and slippers so we may vary a bit from this norm altogether but Hawai’i is an exception. Point is, we lose our little bit of personal flair in our code when we have to follow the same codes and put new lines at the end of our file. Now, this isn’t necessarily a bad thing because having everyone’s code be in the same style makes for much easier readability between files of different people and from a dictator’s standpoint, everything is as it should be.

Jokes aside, having everyone follow the same set of rules has many pros and cons. My biggest gripe would have to be continuously changing your code to follow the ESLint standard if you like to format your code in your own way. Whereas, what I like the most would be a much easier readability where problems or anything for that matter can be found nice and quickly with everything being written in the same way. All in all, I’m not sure if I’d want everyone in the world following the same style because it feels too restrictive and I really hate when I don’t get a green checkmark because I put an extra space somewhere as opposed to having an actual bug. But, in a classroom setting, I think ESLint ought to make it much easier to grade if everything looks nice and neat and any problems can be found fairly quickly.