Welcome to my blog.

Sunday, September 14, 2008

Code Ruler Peer Review [Flestado]

| |

When I first opened the MyRuler.java file from Mari-Lee Flestado I did a quick scan over all the code to get an overall impression of it. At first glance I found the code to be clear and organized. I saw lots of clear, logical statements and many single line comments. It took slightly longer to realize the strategy the code implemented but overall I had a really easy time understanding the specifics of the program. Her ruler worked very well for what it was when I tested it out. It implemented exactly what her strategy specifics outlined. When I first started coding out my codeRuler I thought of some of the same strategies she used like creating more knights and peasants when the opposer has more. 


The javadocs throughout the code were there but weren't too specific. The single method added had a simple overall description that outlined what the code basically did, although it was not formatted correctly.

The overall structure of the class was done quite well. If I were to code something out like this I would hope to have it organized in this same manner. Its clear, concise, and easy to read. The logic of it all was simple and the strategies implemented were clearly done.

After scouring the code for any sort of violations I found a few that were not up to the standards outlined in The Elements of Java Style (many violations occurring in the example IBM code borrowed). Here is a table of my findings.

CODE/FORMATTING VIOLATIONS FOUND
File Lines ViolationComments
MyRuler.java44, 53, 57, *EJS-7no whitespace included in line between () and {
MyRuler.java38, 79, 87, *EJS-7no blank line between logical sections of code
MyRuler.java1,2,3, *EJS-8Tabs used, not converted to whitespace
MyRuler.java109EJS-9'np' is not a meaningful name
MyRuler.java38, 43, 52, *EJS-37comments repeat code, does not add useful information
MyRuler.java105, 110, 120, *EJS-76Expression statements used instead of block statements
MyRuler.java20, 98ICS-SE-Java-6Does not start with a capital and end with period. Should be a more complete sentence.

Overall, I found Mari-Lee's code to be very clean and easy to read. With a little bit of time editing, her code will be looking top-notch and up to standards.

0 comments: