Journal Entry - Week 3 (CST 338)

Code review:


  1. Tim Shaker

    1. The variable names are clear in my opinion. I can immediately tell if a variable is likely a boolean, string, or holding a number. The logic seems efficient, though I think that Tim should consider using an enhanced for loop especially in makeGuess where he could shave a few lines of code. The formatting is good with good use of indentations and his comments are good. I wish that Tim would consider placing comments throughout the method instead of in one chunk.

  2. Glenn Bale Carreon

    1. The variable names are easy to follow and follow the camel case format. I like that Glenn used good logic, however, I wished that he removed the todo comments or marked them as finished once completed. One recommendation would be to simplify the hasLost() method to use the getRemainingGuesses() method. Glenn’s comments are good but a bit simply and usually in a chunk rather than inside the methods themselves. 

My feedback:


My teammates have offered limited but helpful feedback on my code. Tim told me that while my code was great and functional, I could’ve condensed it a bit especially in makeGuess(). Overall, I received mostly good feedback.


Trends I noticed:


One trend that I noticed after reviewing Tim and Glenn’s code is the varying complexity of readFile(). I noticed that our logic differed a bit. With mine, I put the while loop inside the try statement while Glenn for example put his while loop after the try statement. While both are good approaches, it was one difference that stood out to me.


Answers to the following:


  1. What improvements would you make to your code/what was suggested? I would try to simplify my code. For example, I would remove the else statement in exit() as I didn’t need it.

  2. Which unit tests were the hardest to pass? For me, the hardest unit test to pass was Gameloader.

  3. How do the existing tests function and could they be improved? To my knowledge, the existing test functions use asserts and error handling among other techniques to test the code in Hangman. 

    1. Do the existing unit tests cover the full range of the sub classes? No, HangmanTest.java doesn’t cover the getScore() or getCountWordsRemaining() for example.

    2. How would you change the unit tests? I would make sure that the unit test will test every method in Hangman.java.

      1. 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 codeis a good way to learn how to make tests.

  4. What did you struggle with? I struggled with makeGuess() the most as it was the most complex in my opinion.

  5. What did one of your teammates struggle with? I would say they also struggled with makeGuess() too.

  6. Was any part of the code a struggle for YOU? Yes, I would say that coding makeGuess() was a struggle for me.

  7. Was any part of writing the code easy for YOU? Yes, some of the methods that return simple booleans and variables were easy for me.

  8. What was your biggest HW1 victory? For me, my biggest HW1 victory was submitting it a day early. While not a coding achievement directly, it marked an important pivot for me to not procrastinate.



Comments

Popular posts from this blog

Journal Entry - Week 4

Journal Entry - Week 2

Journal Entry - Week 5