RW2: Coding Conventions

The benefit of everyone adhering to coding conventions is that everyone’s code should look the same and be legible to any user. This is beneficial when you are asking for help on a problem set within the code or even when giving advice to another person. When the guidelines are used it is easier for someone else to spot errors in your code. You never know who will end up using or seeing your code so having it organized and up to standards alleviates any confusion and allows the reader to follow along smoothly. While sticking to the convention, even while alone, keeps your code in line with those around you. This also reinforces repetition and solidifies the rules to where they become second nature. The only downside that I can think of with coding conventions is that it forces someone to stay within a certain parameter while writing, then again this is the foundation of writing and not taking away from creativity. I was most surprised by the Google guide at 3.3.1 No wildcard imports, whether static or otherwise. The rules for line-breaks makes sense but I didn’t think it would be as precise as stated in the guide (4.1.2). I attempt to try line-wrapping when able to make it more legible but didn’t know there were actual rules to the case. My code tends to waiver from compliant with line-breaks and line-wrapping to not compliant at all. It is usually based on where I am at in my head about the code but will attempt to clean the code up more. I believe my methods are also hit or miss on following the lowerCamelCase.I feel as if being forced to use this style in my programs would help create that baseline for coding and further reinforce good habits going forward.

Leave a Reply

Your email address will not be published. Required fields are marked *