Improve Your Coding!

20 Sep 2018

Coding Standards

Coding standards have always been rather confusing to me. When I first started learning about coding standards, I wondered why they were even important. Things such as spacing errors always seemed uncesserary. However, after learning more about ESLint and exactly what standards my code needs to meet, I believe my code has improved dramatically. I no longer run into the simple syntax errors that I used to and now I’m starting to preemptively set up my code in the way it is supposed to be. I no longer need ESLint to tell me exactly what I need to change. I’ve been running into fewer errors in my programs and it’s been satisfying when the code I write already has the “green mark” in IntelliJ. In my opinion, ESLint has helped me the most in terms of learning the nuance of JavaScript syntax and writing cleaner code.

ESLint

ESLint has been the biggest and most important part of my learning process this year. ESLint is specific about what errors or problems your program may have. This helps me the most because I can understand exactly what I need to fix. I’m also able to look up the error ESLint provides to gain a more holistic view of my mistakes and learn more about "why" I'm receiving an error. ESLint also makes it much easier to keep my code consistent, and readable. I find this to be important as in the future, it will ease the p collaboration process with others on a project as they won't need to spend as much time figuring out what my code is doing.

Although ESLint has been a lifesaver for me, it does have some cons. Always making sure your code is up to standard can be quite frustrating. This is especially true when you’re rushing to get a project done and simple syntax errors can waste a lot of time. For me, seeing red error marks everywhere ruins my morale. I constantly say to myself, “Oh no, what did I do wrong now”. Finding out that the error was not including a new line towards the end of my code is frustrating. While there will be initial frustration when adopting a new standard, it's important to stick with it to reap the benefits. This is especially true for larger codebases.