Monday, September 15, 2008

CodeRuler

Overview:
After going over everyone’s CodeRuler code in class, we are given the task to example another team’s code to find any inconsistency with the coding standard of “The Elements of Java Style” and “ICS-SE-Java”. By examining other team’s code, I would be able to point out proper coding faster and to learn how others solve the same problem.

Review:
The JavaDocs in Kaneshige and Ly's code are clear and concise. It gives a short explanation of what the code does for each class or method. It helped me locate the exact code that controls the knights, peasants, and production. The methods are created and listed in a logical matter following the author’s hierarchy.

Conclusion:
Over all, the code was nice and clear. The strategy for the decoy peasants is clever and effective for simple “hack and slash” strategy. Production strategy seems to run into problems if the enemy goes after the peasants first. One thing that particularly caught my eye was when I was looking for improper coding format. I was able to see two distinct style of coding. For short codes, this would not matter, but I can see the importance of following one style when there are larger codes to review.











































FileLinesViolationComments
MyRuler.java7EJS-46@author and @version
MyRuler.java20, 54, 131, * EJS-56Documentation on precondition and post condition
MyRuler.java15, 18EJS-62End line comment
MyRuler.java49, 50, 51, *EJS-64Label highly nested structures
MyRuler.java59EJS-69Smaller methods
MyRuler.java105, 114, 148, *EJS-5Else statement should be on new line

No comments: