9/15/2008

CodeRuler Review

Overview
My task is to take a look at source code of other group "lau-sanchez", and check violations of Java coding and documentation standards. I should also take a look at how they implemented their strategy.

I run the code several times and their strategy was doing well against opponents. They won almost all. After reviewing their source code, I found some violations of Java coding standards.


FileLinesViolationComments
MyRuler.java1ICS-SE-Java-1All code should be within the package hierarchy "edu.hawaii".
MyRuler.java4ICS-SE-Java-2Wildcard "*" is used in import statements.
MyRuler.java7,15ICS-SE-Java-6JavaDoc is separated in two parts.
MyRuler.java7,8,42,*ICS-SE-Java-6 JavaDoc is not accurately written.
MyRuler.java83,87,90ICS-SE-Eclipse-2There are 3 spaces instead of 2.
MyRuler.java96,97,98,*ICS-SE-Eclipse-2There should be indent.
MyRuler.java101,102EJS-2Curly brackets should be used.
MyRuler.java111,142,169,*ICS-SE-Java-6Beginning of the sentence should be capitalized.
MyRuler.java159EJS-9Meaningful name should be used.


Summary
Although their JavaDoc is not perfectly accurate, there are enough comments and organized structures that make me understand what they implemented. I also thought their strategy is effective.

Following coding style takes some time but it is also important, because in a real software engineering many programmers work together and if they do not follow it, it will be hard to do maintenance later.

Fortunately, now we have a useful tool such as format function of Eclipse. Some violations will be fixed with that. Eclipse also has a plug-in called Checkstyle, and it will help us follow coding styles more.

No comments: