Consistency in Coding: Is it important?

21 Sep 2017

Writing code is akin to writing essays: everyone has their own style. However, following standard writing conventions, such as a double space after a period, improves readability of your essay for others and allows your work to be more accessibile to others. The same can be said for writing code. By following standard coding conventions, it allows others to error check, understand, and comment on your code easier. The best source for improving code is from others analyzing and critiquing it, and by allowing your code to be readable, improvements to your code can be done quickier and more efficiently.

Coding standards also help others without knowledge of the coding language to understand the code and language easier. Aesthetically, it is more visually pleasing to look at code that is formatted properly and consistently than code that isn’t. Nice looking code is also a reflection on the coder themselves; putting effort into properly formatting code means you actually care about the code and how it looks when others look at it.

On another note, this was our first week using ESLint with IntelliJ. Setting up the environment and installing the necessary packages was a bit time-consuming, but I didn’t experience any fatal errors while following the guide. Others did report having difficulty with installing the programs, and there were a lot of steps, so I can see how it can be cumbersome getting everything working. I am excited to begin learning HTML, as I have no prior experience with it. Combining both Javascript and HTML should be useful for future applications both inside and outside the classroom.