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.
File | Lines | Violation | Comments |
MyRuler.java | 1 | ICS-SE-Java-1 | All code should be within the package hierarchy "edu.hawaii". |
MyRuler.java | 4 | ICS-SE-Java-2 | Wildcard "*" is used in import statements. |
MyRuler.java | 7,15 | ICS-SE-Java-6 | JavaDoc is separated in two parts. |
MyRuler.java | 7,8,42,* | ICS-SE-Java-6 | JavaDoc is not accurately written. |
MyRuler.java | 83,87,90 | ICS-SE-Eclipse-2 | There are 3 spaces instead of 2. |
MyRuler.java | 96,97,98,* | ICS-SE-Eclipse-2 | There should be indent. |
MyRuler.java | 101,102 | EJS-2 | Curly brackets should be used. |
MyRuler.java | 111,142,169,* | ICS-SE-Java-6 | Beginning of the sentence should be capitalized. |
MyRuler.java | 159 | EJS-9 | Meaningful 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:
Post a Comment