Coding without using a coding standard is like a Febreze commercial. Random people are asked to volunteer in a Febreze experiment. If they agree, they are brought into a filthy room with a blindfold on. They then proceed to sniff around and explain what they are smelling. They all describe pleasant aromas because the room has been sprayed with Febreze. Finally, they take off the blindfold fold and are surprised to see all the dirt and filth.
Having a code that compiles and works as intended without using a coding standard is like a filthy room sprayed with Febreze. Once your collaborators or boss opens up your code, it’s like taking the blindfold off.
Remember all those times your code wouldn’t compile because you forgot a semicolon or a curly brace somewhere in your code? Ask any programmer and they would be able to relate to your struggles. When I first started writing code I almost always had this problem. I eventually typed both start and end curly braces first, then wrote the code block. I also made the end curly brace on its own line. Unintentionally, I made my own little coding standard.
Using ESLint on Intellij has been a bit painful, mainly because making sure there’s a space in all the right places is very tedious. Also, I no longer have errors such as forgetting a semicolon or curly brace. Other than that, I enjoy using ESLint because I end up with a code that is pleasant to look at. Also, it helps me stay consistent. I think I would have benefitted more if I was introduced to a coding standard when I first started coding to prevent small errors.
Coding standards benefit everyone. Think of a text, would you rather read one extremely long paragraph or multiple small paragraphs? Coding with coding standards make your code more appealing and easy to read. It would be easily maintained, updated, and debugged. Most importantly, others would be able to understand your code. Some codes aren’t only going to be yours. Whether you are working in a group or passing your code to someone else to work on, it is very important to use coding standards so others can understand your work. Coding standards result in code that is efficient in both time and cost. If you want your code to be praised, use coding standards.