Are Coding Standards Necessary?

07 Feb 2024

A trivial perspective

Coding standards are a double-edged sword, offering a sense of conformity for better readability and consistency across different programs, while to others, it may seem like a thorn in the side. For me, using ESLint on IntelliJ did not pose too much of a problem. I found the system simple to follow as it would check the current style of the code I had written so far and indicate what errors I made, major or minor. Although, at first, it did seem a little unpleasant that it would point out tiny details that did not affect the code’s functionality. However, further experiences with ESLint as a coding standard have given me a more nuanced perspective regarding its significance in both a personal and professional setting.

Linting the mess!

Writing code and immediately seeing red underlines and yellow warnings was annoying as it quickly piled up before finishing a line. Warnings and errors about having no empty lines at the beginning or end of the file and spaces between parentheses or semicolons were hassling. Acquiring the green check mark takes time, but seeing it appear provides a sense of relief and satisfaction as the errors clear up out of the editor. Although it is painful initially, getting the hang of the format and style becomes easier as the warnings are helpful in readily identifying the errors, with a speedy fix for them being available by hovering over the red marks.

A double-edged sword

As mentioned, coding standards may be a thorn in our sides, but they are ultimately beneficial. It is especially more so with regards to helping a programmer format and improve readability. For instance, following uniformity and having consistency across multiple projects makes it easier for others to understand another person’s work in cases of debugging or fixing other parts of the code. In this way, following these standards does not necessarily mean that a person adhering to a styling system will help them learn how a programming language works, especially if they are starting to learn a new one.

I think that in a professional environment, adhering to a particular coding style will become increasingly important. Working in teams and producing large projects will need a sense of uniformity and consistency among the group members to make it easier to collaborate when updating or maintaining code. Being more accustomed to the standards has made me more mindful of how I write and format code. Though the strictness of coding style is seen as a trivial aspect, it should ultimately play a factor in how we write code, as it is a valuable tool for ensuring readability and quality in future projects.