The Standard Is Not The Standard

10 Feb 2022

Learning to use a new IDE has always been stressful for me. As someone who can be resistant to change sometimes, it takes me a while to get comfortable using a new application to write my programs. I had the same experience with IntelliJ, and although it can seem daunting at first, using an inspector really helped in my understanding of coding style. Specifically, I used ESLint for writing my JavaScript program, and it has made my code much more readable and consistent.

Inspector Lint

IntelliJ utilizes ESLint, which looks for issues in code quality and style. It lets me know when I’ve typed something wrong, and warns me when I have unused variables and functions. You may be thinking, “I can just use spell check for that. Why do I need ESLint?”. Using an inspector like ESLint for Javascript will help save a lot of time in the long run. As I am writing my code, it is literally watching (or inspecting) me in the background constantly for possible bugs or errors. Although I have not written anything too complex yet on IntelliJ and have not gotten a chance to see ESLint’s full functionalities, I think it is really helpful to have something that makes sure I am not making any errors. I can only imagine how difficult it will be to find an error without an inspector when writing a program that is hundreds of lines long. I am able to put more effort towards finding and solving real problems with my code (eg. logic programs) as opposed to using that effort to find a typo or a syntax error. ESLint makes it easy for me to see exactly where my error is, and gives me suggestions for solutions.

Setting Good Standards

With coding standards, consistency is key and I think that having set standards for a language will help me write better code in a more consistent format. It is almost training me to look out for certain issues, to the point where I can sometimes predict a red warning line before I actually see it. If I keep using inspectors when writing programs, I will become a much more efficient programmer. ALthough coding standards are not uniform throughout the world, I think it is important to put more focus on code maintenance and just writing good code in general as opposed to stylistic coding standards, as those may vary more and it’s better to not get stuck on that. For example, in my ICS 212 class, we were instructed to use four spaces instead of using the tab button when indenting. This was definitely a shift that I had to make because instinctually I wanted to use the tab button, but eventually I adapted and made the change for a semester. Although it definitely makes readability easier, stylistic coding standards will often change and so I am not 100% committed to what I have already learned in terms of that.

Conclusion

At the end of the day, it is important that my program can be read easily by another person and if they choose to add to it or change it, coding styles become extremely important in order to keep the program consistent and uniform throughout. That is why it is important to be educated about coding standards and to be able to recognize what works for you and what does not.