Who Even Cares About Coding Standards?

08 Feb 2022

Do Coding Standards Matter

I used to be one of those people that thought as long as my code had no errors and had a desirable output, it was good enough. Recently I have changed my mind because it looks better as well as makes the code easier for other people to read. Just because I understood the code at the time I wrote it doesn’t mean I would also understand it a few days later when I looked at it again. There are a lot of small things that kind of take the spotlight away from the more important coding standard benefits. Just looking nicer is a benefit, but it doesn’t really matter if results are all you care about. By following the same coding style as other people working with the same language, you can see what they write and know what they are trying to do. Coding standards make code easier to read for everyone, even the person that wrote it. You can even learn things from

First Impression on Intellij and ESLint

Intellij IDEA was a new IDE for me and it was definitely different from the previous IDEs I’ve been using. The most recent IDE I’ve used is vim in the UH Unix window and looking at Intellij after a semester of a black and white vim window made me feel like a caveman that got transported to the future. It was refreshing to see a modern code window, and at first I hadn’t even considered the shortcuts that IDEs could have. Using vim which had almost no shortcuts and couldn’t even use the mouse to navigate the code was a good learning experience, but it set my expectations really low. The first thing I noticed in Intellij was when you hover over parts of your code, there was a summary or options listed. When there was an error, I could just click on it and let Intellij fix the error for me. When I set up ESLint and turned off all the other errors and warnings, I started paying attention to the top right corner a lot more because it told me how many errors there were or if my code had no coding standard errors in it. The little red exclamation point in the top right corner made me want to fix my code before continuing to write more.

That Green Check Mark

The green check mark may seem scary to some people, but I actually think it’s nice because it’s like a goal to shoot for. At first when I was just testing out Intellij, my code had a bunch of errors and red squiggly lines all over the place. When I went to each error and individually fixed them, the green check mark finally showed up in the corner. To me, it symbolized that my work to fix coding style errors paid off and the green check was my reward. Having a solid goal to aim for like the green check mark encourages the programmer to actually follow the coding standard instead of writing their code however they want. A red error symbol in the corner of the IDE makes me think my code is incomplete which can be a bigger motivator than just wanting to see the green check mark. I would rather get rid of the error symbol than see a green check mark and I think most programmers agree. The green check mark is a sign that the code has no errors so everyone should be aiming to see it in every project they make.