Reflective Writing 2

  1. Coding Conventions are a set of organizational guidelines for a specific programming language.  Sometimes it can be just an informal rule to help with keeping code universally readable and sometimes they are fundamental parts of the language like with java and declaring new objects or casting variables of a specific type.  An example of an informal rule would be how blocks of code are tabbed once they are in a method or a loop you don’t need to do that in java but it is recommended so your code is readable.  This is specific to java I know that in Python that tabs actually do determine if code is in a loop or a method.  These guidelines are meant to give some standardization and help guarantee to some extent the structure and quality of code.


  1. What is the benefit of everyone in a team adhering to a convention like this?

Well there are a few obvious benefits for one communication.  In a project depending on the complexity people will need to delegate and people will have to develop different versions of the same code or parts of a bigger project.  In that context it makes sense to follow coding conventions to try and apply some standardization to the whole process.  Without it you would have to spend significant time just trying to get everyone’s code to work together.  Programming can’t really be improvised and I have had to finish more than my fair share of assignments on the day that they were due to know that it’s either a half an hour every day or so or a 6 hour coding session right before the deadline.

  1. Is there a benefit to sticking to a convention even when you’re working alone?

Yes for two big reasons.  One once you have developed your code and have released it out into the world depending on its purpose people will need to modify it to their own ends.  In that case it would be much more convenient if the code followed the coding conventions. If they had to spend a few hours trying to make sense of your coding style then I doubt they would really enjoy it.  Reason two is simply your own memory.  It is inevitable that you will forget something over time you are only human and by coding conventions you could follow your own train of thought and try to figure out how the program works after it leaves your mind.

  1. Is there any downside to coding conventions?

Yeah I went through the list and there were a lot of little conventions that I am already forgetting.  The point is the rules are dense and it is to be honest neither the creator or the user are going to remember them totally.  To steal a page out of Barborossa’s book the conventions are more like guidelines than actual rules.  Just make sure your code is legible and no one will really complain about some minor infraction.  

  1. What are the areas addressed in the Google Guide that you are most surprised that are specified?

The part about the 100 column limit I guess I had never encountered it when I was programming but I didn’t know that was a rule or maybe it is just more like a guideline than an actual rule in java.  Also I have no idea what unicode is.

  1. In what areas does your own code not meet these standards?

I definitely name my variables random names depending on whatever I’m listening to or thinking about.  I know that ain’t really a good idea but I find them funny so meh. 

  1. How would you feel about being forced to use this style for the programs you write?

Well it the site says so itself that these rules aren’t clearly enforceable.  Basically it isn’t really feasible to try and monitor every bit of code to follow all of these rules.  And to be fair they are pretty dense and long so I could understand trying to monitor every new program for mistakes wouldn’t really be worth the effort.

Leave a Reply

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