Week 12 (Module 3)
For the HW01 Hangman project, I reviewed my teammates (Will Walter, Brenden Woods, and Richard Alvarenga) code:
Reviewing Branden Wood's Hangman Code:
Branden's code is very easy to understand and read through. His commenting is particularly helpful, especially for someone who is still learning java. Reading through his code, I feel like we were on the same page as far as methods for executing the program.
- His variable names were all very clear and used consistent naming conventions.
- Nothing stood out to me as a shortcoming in logic efficiency.
- He used all of his imports.
- The code is very well formatted, I didn't have any issues figuring out where I was in the code.
- Props to Branden's commenting, as I mentioned above. The comments are very detailed and are helpful to someone learning Java. The in-method comments in particular are very helpful since learning the syntax has been hard for me.
- Does not appear that the unit tests were altered, and appear to pass.
Reviewing Will Walter's Hangman Code:
Will is also on my team, and I know he has much more code experience than I do. One thing that immediately jumps out at me when looking at his code versus mine is that he is much more efficient. He completed the assignment with fewer lines of code, and required fewer explicit imports. My review is as follows:
- His Variable names were clear and meaningful.
- This was the only thing I could give some feedback on--could change `isGameWon()` to `hasWon()`, and `isGameOver()` to `hasLost()`, only to have "lost" as part of the second variable name rather than just over, which might still mean they won--the game is just over.
- Regarding logic, I didn't have any critique--I'm learning from Will's code more than anything -- the use of `indexOf()` for `guessedWord` to determine the status is more efficient than my method.
- There were no unused imports.
- The formatting was great--I didn't have a hard time seeing where the different fields and constructors were separated.
- Each method was commented on. I think if I was reviewing it 3 weeks ago, I'd want more comments, but that is speaking as a very inexperienced Java user. I think the amount of comments now is fine, especially considering how efficient and streamlined Will's code is.
- Unit tests passed.
Reviewing Richard Alvarenga's Hangman Code:
Richard's code is extremely well-commented and is very easy to follow. I'm lucky to have a few experienced coders in my group. I do not have any criticisms or suggestions. It is interesting to see how Richard's code compares to my own and my other peer's code. Richard seems to handle problems a bit more simply than I did, and seems like he was more efficient with his time and lines of code.
- His variables are all named meaningfully.
- The logic of his code seems solid, and was very easy for me to follow--wasn't overly complicated to try and track what was happening (plus everything that wasn't absolutely obvious was explained in the comments).
- Every import was used.
- Format, like the comments, were all very readable and easy to follow.
Summary of My Code Reviews:
The only feedback I was received was that some of my methods did more work than they needed to, which makes sense to me. I am sure there were simpler executions for fulfilling the purposes of some of my methods. I have felt very behind in picking up Java in the last two weeks, and I definitely struggled putting the Hangman files together. Thankfully I'm feeling a lot stronger at this point. Now my big hurtle seems to be project setup/getting Gradle to play nice.
When evaluating the other team members’ code, I saw that several of us had similar approaches, while one seemed very different. To me it seemed that Will's code was much more efficient--he ended up using significantly fewer lines of code (I'm assuming it still passed the tests...). I know Will is much more experienced as a programmer than I am, so I tried to absorb as much of his code as I could to learn from it. Richard and Branden's code seemed a lot closer to mine in execution. Richard's code in particular was very well commented, and I thought that I should go back and document my code as thoroughly as he did in case I go back later to experiment/practice on the project.
Answers to the following
What improvements would you make to your code/what was suggested?
I would go back to review some of the math that is involved in calculating remaining guesses and that sort of thing. I'm not sure that I know off the top of my head how I could improve them, but since I'm feeling a little more comfortable with Java now, I think I could take another stab at it.
Which unit tests were the hardest to pass?
Nothing I can recall in particular--I had some difficulties getting LDPM tests to work, but for Hangman I think I still needed to look up a lot of things for most of the steps, nothing jumps out in particular.
How do the existing tests function and could they be improved?
Do the existing unit tests cover the full range of the sub classes?
In the Hangman project I don't think we had subclasses. Hangman had HangmanTest and GameLoader had GameLoaderTest.
How would you change the unit tests?
Keep in mind I do not want them to change but this doesn't mean I think they are perfect. Reading through the tests is a good way to learn what the code should do thinking about how to test the code is a good way to learn how to make tests.
I will keep that in mind, I'm finding little things make learning the new language easier. I can't think of any additional tests or changes to them personally.
What did you struggle with?
As I mentioned above, I had been struggling with picking up Java at all. Sob story: I got very sick the second week of class, and when I would have had a little bit of grace period with the class moving a little slow in week 0 and 1, I was parked on the couch with a headache for several days. I'm just now (at the end of week 3) feeling more confident and capable of reading through any of the Java code we've gone through in this class.
So my struggle on Hangman was having to look everything up, and I'm sure I spent twice as long as everyone else to complete the project.What did one of your teammates struggle with?
I personally didn't hear that they have been struggling with much except the time to get all of the projects done. I know they all had prior experience with Java, so I feel like they had a leg up on me there.
Was any part of the code a struggle for YOU?
Yes, most of it. ^^
Was any part of writing the code easy for YOU?
Toward the end of each project, I do feel a little more confident, and start to feel like I'm getting the hang of things. After finishing LDPM and the Strategy Pattern lab, I'm feeling much better.
What was your biggest HW1 victory?
Obviously getting the code to pass. At the beginning of the project, I was constantly falling behind and trying to keep up with the pace of the class, and opening the project for the first time gave me a panic attack--I had no clue what to do and really had to just take some time to break it down. It ended up not being that big of a deal, but looking back--not feeling super confident with Java, and trying to read through the code to figure out what was going on was a nightmare. I think I feel victory now, a week or two later, since the self-imposed trial by fire ended up getting me on the right track eventually.
Comments
Post a Comment