Learning Journal - Week 11

 

Jessica Sandoval

  1. Variable Names – are they meaningful and clear?

    1. All of the variables made were straightforward in their use case. Looking through the file, it was immediately clear which each variable and item achieved, even the temporary variables like scanners.

  2. Logic that could be more efficient

    1. Everything is quite concise and I couldn’t find anything immediately that would need improvement.

  3. Unused Imports or Warnings

    1. No unused imports and no essential warnings, just IntelliJ reminding of a typo!

  4. Clear Formatting

    1. Everything was formatted nicely, although personally I like to add space between attributes although I’m not sure if that is against Google’s formatting standards.

    2. Example:
      /**...**/
      private int score = 0;

      /**...**/
      Private int numberOfHints;

    3. Instead of:
      /**...**/
      private int score = 0;
      /**...**/
      Private int numberOfHints;

  5. Are there comments?

    1. Every line of logic, attribute, variable, and method is thoroughly documented! It was incredibly easy to see your line of thinking while you were implementing your solutions and it makes it simple for anyone to see at a glance what all of your logic is doing! It also made it a lot easier for me to review.

  6. Which unit tests pass?

    1. All unit tests were passing!





Emmanuel Garcia

  1. Variable Names – are they meaningful and clear?

    1. All local variable names seem clear and provide a straightforward understanding of their functionality.

  2. Logic that could be more efficient

    1. There wasn’t any logic I saw that could be made more efficient. Everything was about as concise as it could be, I didn’t see any extensive branching or nesting and only the appropriate amount of variables were created.

  3. Unused Imports or Warnings

    1. There was only a singular warning in the code, which was essentially just IntelliJ making assumptions on how the debug boolean worked, so that is quite good! And also there were no unused imports or errors of any kind!

  4. Clear Formatting

    1. The formatting was quite clear and easy to understand. Chunks of code were separated by a single line, which helps group together ideas of thought. There was only one method where this wasn’t the case which was the chooseWord() method. Every line was directly underneath the other with no separation lines, but that’s really about it. It’s a nitpick because I couldn’t find anything else that stuck out to me!

  5. Are there comments?

    1. Every user-made method was commented and documented thoroughly! The only thing I would recommend is to also add brief comments within the code itself to help describe what each chunk of code is doing. Currently, none of the methods have any comments inside of the code blocks themselves, which helps with the cleanliness of the code but could be a potential roadblock if you – or anyone else – needed to look at the code again in the future and needed a quick reminder what each section of code did at a glance.

    2. For example, turning:
      secretWord = word;

guessedWords.add(word);

remainingGuesses = secretWord.length() - 1;

numberOfHints =Math.floorDiv(remainingGuesses, 2);

guessedLetters = new ArrayList<>();

guessedWord = new StringBuilder(PLACEHOLDER.repeat(secretWord.length()));

if(debug){

   System.out.println("Chosen word: " + secretWord);

}

  1. Into:
    // Update the secret word and add it to the list of guessed words

secretWord = word;

guessedWords.add(word);


// Reset the variables used for progress tracking

remainingGuesses = secretWord.length() - 1;

numberOfHints = Math.floorDiv(remainingGuesses, 2);

guessedLetters = new ArrayList<>();


// Initialize the guessed word using the placeholder, and print it if debugging

guessedWord = new StringBuilder(PLACEHOLDER.repeat(secretWord.length()));

if(debug){

   System.out.println("Chosen word: " + secretWord);

}


  1. Which unit tests pass?

    1. All unit tests passed!








Jason Campos

  1. Variable Names – are they meaningful and clear?

    1. All of the variables are named meaningfully and it was easy to determine which variable did what function.

  2. Logic that could be more efficient

    1. Most of the code was quite concise and efficient, but I think something you could have done to make your code a bit more readable is to use the ‘+’ operator instead of .append() for concatenating strings. It helps save you time when you’re combining strings and also makes it easier for someone reading your code to see. Other than that, all the code was quite efficient!

  3. Unused Imports or Warnings

    1. There was only one warning and it was IntelliJ warning about the debug boolean potentially being redundant, but other than that there were no warnings or unused imports!

  4. Clear Formatting

    1. Formatting was very clear, and all of the line spacing made sense and helped group together chunks of code that were related! 

  5. Are there comments?

    1. Each variable and method has thorough comments, which is great! I would personally recommend placing single-line comments through the methods themselves to notate what each specific section of code does.

  6. Which unit tests pass?

    1. All unit tests passed!


Received Feedback

At the time of writing, I received feedback from Emmanuel. He pointed out that my tests are all passing and he said that my variable naming was clear and descriptive which helped with readability. He mentioned that because my code was quite readable, he felt the amount of comments I left were a bit excessive – albeit helpful regardless.


Problem-Solving Trends

One of the biggest things I noticed from my peers is that they had all documented all their variables, which is something I hadn’t put too much thought into previously. I mostly only commented on my methods and I made sure to lay out my thought process in the code; however, I now see how useful it could be to document the attributes themselves.


Something else I noticed was that we all generally translated the assignment requirements roughly the same, so a lot of our implementations looked very similar. 



Self-Reflection

  1.     What improvements would you make to your code/what was suggested? 

    1. I’ll add more documentation for my attributes/variables and I’ll make my code a lot more readable my removing excess comments.

  2.     Which unit tests were the hardest to pass?

    1. The hardest test for me to pass was the test relating to the makeGuess method. It was the heftiest part of the assignment and I wasn’t at first entirely sure where my code was leading. I also struggled with the chooseWord test because it failed the first time around due to me miscalculating the number of hints.

  3.     How do the existing tests function and could they be improved?

    1. From what I saw with the unit tests, everything seemed to be working well and it seems to cover most bases. The debug variable is quite an interesting concept, although I believe it was only used for one thing, so maybe if we worked on a more complex situation it could be worth it to have a debug variable that makes the testing outcomes more predictable. For example, when it comes time to test code that uses a lot of random numbers, it’s hard to use something like assertEquals() with random numbers, so maybe using the debug variable to return the randomly generated values can help us during testing.

  4.     What did you struggle with?

    1. My biggest struggle was just reading through the documentation and getting a full grasp of what the program was going to accomplish and fully grasping the purpose of each method. Luckily, I didn’t run into many logic or syntax errors along the way, so I was mostly concerned with actually ensuring my code followed the documentation and my comments accurately described the purpose of the code.

  5.     What did one of your teammates struggle with?

    1. One of my teammates struggled with the getHint() method and specifically knowing when to break out of the for loop.

  6.     Was any part of the code a struggle for YOU?

    1. I didn’t struggle with any particular piece of the code.

  7.     Was any part of writing the code easy for YOU?

    1. In terms of actually writing the code, it was actually quite straightforward. Despite my slight struggles with laying out the documentation into commented pseudocode I found the actual code-writing portion to be easy.

  8.     What was your biggest HW1 victory?

    1. I was able to get used to git and Java syntax quite quickly and I was proud of myself when it all finally clicked to me. I made commits frequently and I was happy to see that the code was mostly working upon the first test attempt.

Comments

Popular posts from this blog

Learning Journal - Week 2

Learning Journal - Week 4

Learning Journal - Week 4 INDUSTRY EXPERT