Picture this, you’re 8 years old and you go to the grocery store with your parents. You are now old enough, and tall enough to reach the handle of the cart. Your parents enter the store with you in tow. You feel great, you feel more mature, you feel almost like a grown up, carrying the responsibility of pushing the cart. Then almost as soon as you enter, they grab the cart by the front corner and start pulling the cart in the direction they want to go. You feel insulted and wonder “Am i not old enough to do this by myself?” “I can do this on my own without your help” you say in your head, but have been taught to not talk back to your parents.
This is what it feels like to code with a coding standard.
After a week of coding using ESLint with IntelliJ, I feel like i’m 8 years old again, pushing a cart with a parent pulling it along. Though I am fully capable of writing code, having ESLint constantly instructing me how to space this indent, how to add a space between the parentheses and curly brace, how to change “let” to “const” because the variable is never reassigned. I get it ESLint, you want things to be exactly the way you want it, even though my way works perfectly fine as well. But its your way or the highway I guess. Having to go back and re-do syntax to get the notorious green checkmark is quite a hassle. Thankfully, hovering over the red dashes provides you with the exact error that is caught and how to fix it, but it doesn’t make it any less of a hassle.
Going back to your 8 year old self in that grocery store with your parents. After a bit of shopping, you realize that the cart is getting heavier and heavier after each addition of grocery items. You then start to appreciate the help provided by your parents pulling the cart along. Though you are perfectly capable of doing it yourself, them pulling the cart to relieve some weight does make things easier. This is what I foresee myself saying about ESLint with IntelliJ the more I use it. It may seem like a hassle now, but once I get used to implementing the coding standard the first time around when writing code, it will seem like less of a hassle since there would be less red dashes marking errors. The help now while I am still not fully capable of pushing the cart when it’s full of groceries, will help me along until I can do it on my own.
A coding standard that everyone adheres by will help when coding larger projects where multiple developers are needed. Just like having more items added to the cart, having to collaborate with other developers will become more and more difficult as the number of developers increases. Having a uniform code that everyone edits with the same standard will make things easier. Keeping the same formatting regardless of who exactly is making changes.The little syntax changes that ESLint requires, such as the spacing, also makes the code easier to look at.
Though I already have an opinion on coding standards after only a week of using ESLint. I’m sure it will change the more I use it and the more familiar I become with the standard. Does it make it easier to learn a programming language? Maybe. Will it make coding easier in the long run? Only time will tell. But i’m sure, just like your parents pulling the cart along, you’ll appreciate it later on.