Monday, September 14, 2009

Conforming to Java Coding Standards

After reading the Elements of Java Style I can't help but admit that my coding style is not that great. I have used one-line comments placed right next to the code, which I thought seemed convenient since it immediately follows the code it refers to. Instead I figured that it is better to add it before the code declaration since we are only allowed 100 characters per line, which is part of our class' own coding standard. Since I imported the Eclipse formatting template I didn't really have any problems reformatting my robots to conform with the assigned coding standards. All of the work was changing the javadoc to third person, making sure it ends with a period. Another thing that I had to do was to add <code>...</code> tags since I included method names in my javadoc.

My updated source code.

0 comments:

Post a Comment