Coding Standards

21 Sep 2017

After using ESLint and IntelliJ Idea for about a week now, I can confidently say that Coding Standards are very important and can definitely make source code look elegant and beautiful. When I was a freshman and had just started learning about coding, my eyes and brain were not able appreciate the beauty of elegant code, and whenever anyone would say that my code is “ugly”, I would retort with “As long as it works, I don’t see a problem.” But now, I see through the ignorance that I once had. Once the code is kept clean with a standardized and easy to read format, it becomes more than just appealing to the eye. It becomes simpler to understand, easier to replicate, and most importantly, easy to fix/change, because there will probably come a time where you may have to modify your code. One interesting question that pops up with coding standards sometimes is, “does it help someone learn a language any better?” In my opinion, I think it does, as many standards are based on “good” coding practices, and prevent programmers from doing unnecessary or lazy mistakes that can cost time, money, and effort. For example, in Javascript using let and const versus using var. Using var will make the scope of the variable confusing and cause unintended consequences, but when our coding standards focus on using const and let, it prevents those simple mistakes from occurring in the first place.

IDEs like IntelliJ are able to use and enforce coding standards like ESLint make writing code easier and more beautiful. Even though it has only been a week, I look forward to creating more beautiful code with IntelliJ and ESLint!