Do We Need Coding Standards?

09 Feb 2017

Those are some pretty high standards.

I think that coding standards are an important aspect of software engineering. Coding standards should be what they were meant to be, standards. These include the number of whitespaces after you press tab, where to start and end a curly brace, and how many blank lines are allowed. They help improve readability to minimize the amount of errors one might make while writing code. It would also help others to help diagnose what may be wrong when they look the code. If it was code with no coding standards, the person may take half their time helping you trying to figure out the format of the code so they don’t get confused at what the code actually does.

My code hurt someone’s eyes

When I was taking ICS 211 (Intro to Computer Science II), I asked the assistant teacher assistant to help me out with my code on the Eclipse IDE. The first thing he always told me to do even before looking at the contents of my code was to press ctrl + shift + f to format the code. This made me more aware how I should write my code so it becomes more readable for others. Every extra bit of whitespace can make your code very hard on your own and other people’s eyes. Don’t you think we need coding standards?

Something seems off about the code… Quickly! Use ESLint!

ESLint with IntelliJ is something I look forward to using more of. It is a bit frustrating to finish writing your code and not seeing the little green checkmark on the upper right corner that indicates your code follows all the standards and guidelines. On the other hand, it is very satisfying to see the little green checkmark and knowing you got everything perfect. The only thing I would improve about it is if there is an error and I’m not sure what it means, it could provide more information about that error. With a spell checker, code checker, and format checker all in one, ESLint is a very powerful tool that everyone should take advantage of. ESLint reminds me of a lint roller. A lint roller picks up all the lint on your clothes like ESLint cleans up all the little things in your code. ESLint sure lives up to its name!