I’ve never heard the term “coding convention” before – or, if I have, I forgot that someone said that. According to Google, “coding convention” is a set of guidelines for programming languages that recommend certain coding styles and practices, which helps improve code readability and understanding.
Google has a Java Style Guide, which includes a lot of good tips on how to code in Java. When working in a team of programmers, it’s important for everyone’s code to be coherent and similar, so it’s a necessity to stick to style conventions so everyone knows what is going on in the code. The same applies for when you’re working alone, because if you come back to your code after awhile, it’s important to know what you’re coming back to, and make sure your code isn’t too confusing to look at. However, with coding conventions comes the sort of removal of having your own coding style. There are only so many ways to do things, and sticking with coding conventions really solidifies that.
I think the part about how to do line wrapping are interesting, because I do it differently than other people. I like have my brackets in their own lines, because I think it looks cleaner, but the style guide has it in the line of code (not on its own). I also thought it was interesting that they talked about white space, and what is permitted or not. I never really thought of that before. With what was said before, I definitely do not follow a lot of the standards the Java Style Guide presents, because I like coding in my own way and don’t like following things that have to do with line breaks and indentation. However, I do follow some of the conventions presented in the style guide, it just depends on what that thing is. If I was forced to use this style for the programs I write, I would be a bit annoyed because I would get burnt out by my programs always looking the same, since there would be no uniqueness in my code. Sure, it can set a standard, but coding could be fun and not a hassle.