Crafting Consistency: Navigating the World of Coding Standards

08 Feb 2024

Who cares right?

Have you ever watched a tv show, and halfway through the series, the show just becomes something completely unrecognizable to when the show first started? It’s almost like you’re watching a completely different show. A good example of this would be the show Lost, which is about a group of plane crash survivors who are stranded on a mysterious island. At first, it’s just a survival show that shows the backstories of it’s cast, but then eventually devolves into time travel and other nonsense. The show is awful after the first 2 seasons. This is what it’s like to have no coding standards. If someone likes to code with the open curly bracket on the same line and another person likes to put it on a new line, while the code itself might be the same, the code looks all over the place. It looks very unprofessional and makes it hard to read for the next person. That is the reason why there is a standardized way to write code.

Why it matters

One great thing about coding standards is the fact that it helps teach you how to code! Coding standards teaches new coders syntax and framework and what “proper” code should look like. Eventually, new coders will internalize these conventions without having to rely on ESLint allowing them to have a deeper understanding of the coding language and the many nuances that come with it.

What do I think

In my personal experience with ESLint and IntelliJ, I find that it’s both painful and useful. Initially, some of the rules seemed a little silly. Why do I need a new line at the end of the code? Why is it marking my variable as unused when I didn’t get a chance to implement it yet! I’m not ready!!! However, as I got more used to ESLint, I just ignored the silly errors that aren’t important at the moment and focused on my code. I no longer had to look at the errors because I already knew what coding standards look like. ESLint is like a set of training wheels that you eventually take off when you master how to ride.