During our Wednesday class period I was very excited to see this implementation in action as Tyler and Daniel's blogs showed it to be very successful in their tests. Unfortunately it seemed to have encountered a problem during the demonstration and failed to successfully perform any moves. However testing on my own computer was fine and it was perfectly capable of performing up to the standards claimed. In fact it is the only of the implementations I saw that could compete and quite possibly surpass the implementation of Arthur Shum and myself.
Despite not being able to convince my computer to open the javadocs, they were luckily available right in the code and appeared to be thorough. The structure and methods used in the class made sense. Each method was dedicated to a specific task and each well explained. The orderSubjects method is simple and is able to delegate the complex tasks of the implementation to other methods but outlines the workings of the class. The inline comments within various methods help with understanding the logic of the program quickly, though some were redundant. Since many of the variables names consist of three or four words, the code for certain tasks get a bit unwieldy and a number of lines cross well over 100 characters in length. However the logic is quite solid and it's performance outside of the class demonstration is superb.
For the most part the formatting and style of the code is quite close to what is put forth primarily by The Elements of Java Style by Allan Vermeulen, et al. The following chart demonstrates the lapses in proper coding style I observed.
File | Lines | Violation | Comments |
MyRuler.java | 1 | Use of * in import. | |
MyRuler.java | 16-28 | Possibly excessive HTML code in javadoc comments. | |
MyRuler.java | 7, 60, 183, * | EJS-49 | Omit subject in describing methods. |
MyRuler.java | 54 | Explain empty method. | |
MyRuler.java | 82, 123, 130, * | EJS-7 | Closing bracket not on its own line. |
MyRuler.java | 87 | Possibly confusing end-line comment. End of if? or end of else? | |
MyRuler.java | 79, 84, 90 | EJS-7 | No space between for and (. |
MyRuler.java | 109 | No period ending description. | |
MyRuler.java | 120, 121, 127, * | Four space indent instead of two. | |
MyRuler.java | 120, 127, 134, * | EJS-61 | Unnecessary end-line comments. |
MyRuler.java | 210 | May want to use parentheses to seperate logic operations. | |
MyRuler.java | 211, 212, 215, * | Way over 100 characters in these lines. | |
MyRuler.java | 239, 365, 427, * | EJS-7 | Beginning bracket for else statement should be on same line as else. |
The errors found do not have a huge impact on the readability and reliability of the program. Most can be quickly repaired now that all of the members of the class are more aware of the strict style we should to be adhering to. There is ample commenting of the code, and perhaps too much in several areas where they do not really offer any additional information. Overall though it is an impressive strategy and implemented relatively cleanly and efficiently.
No comments:
Post a Comment