Ever since I’ve started programming I’ve adhered to a coding standard without me entirely knowing. Curly braces not on the new line, spaces between assignments but not comparators (==, >=, <=), camel case, and so on. While it may not be the Google Java coding standard, it was one that I stuck with for a while out of convenience and consistency to the rest of my programming. I didn’t intentionally write this way- to me, it simply made sense. It was efficient, easy to read, and of course, was aesthetically pleasing.
Soon after I took a few dabs at C# and found a lot of tutorials putting the opening curly brace on a new line, and including spaces after parenthesis and for comparators, and pascal case. I then began adapting to this style in all languages I would write in, with the exception of pascal casing since I believe the differentiation of class versus variable naming conventions to be important (pascal is for class names, and camel for variable). Again, it was out of efficiency, readability, and aesthetics.
It’s very common for companies to institute an official programming convention, whether it’s their own, Google, or Microsoft, and their reasoning has more to do than just efficiency and readability. It is a way for everyone’s code looking the same. Consistent code allows for other programmers to jump in and have an easier time reading through tens of thousands of lines because the code looks like it all came from a single author, rather than a copious amount.
Being consistent is especially helpful with debugging. While I, the author, may understand my own chaos of inconsistent programming, with new lines and spacing all over the places, that does not mean my senior or anyone on StackOverflow will take the time to understand my programming-equivalent of instructional chicken scratch. Whenever I see terrible style, my thoughts are immediately driven away from helping the person with their bug to just fixing how their code looks.
After programming with C# for a long time and following the same conventions I listed above, moving to the ESLint conventions reopened a scab for me. Every time I went to put a brace down, I would put it on a new line, delete the curly brace and line, put it back at the top, delete the curly brace again, put the space after the parenthesis, and then put the curly brace back. Then new line. My style has become a habit rather than a flexible tool, which is what style really is to me. I just never really had to change much.
I haven’t found the path to acquiring the green checkmark annoying so long as I could pass the initial setup which is a much greater annoyance. Once I get past that, it’s just some getting used to.
There are many conventions when it comes to programming, and most are pretty similar to another. After all, it makes sense that a programmer wouldn’t want to change their style too much while learning a new language. At the same time, it is inevitable that you will have to leave your comfortable style and conform to another. Whether it’s for school, a job, or because you plan on posting to a forum where the community is strict about their standards.
Above all, to me, it is most important to remain consistent. I among others would rather read through a different programming style over seeing an attempt at what I’m used to with a lot of inconsistencies.