Skip to content

Conversation

@MiraMarshall
Copy link

@MiraMarshall MiraMarshall commented Feb 22, 2019

Adagrams

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
What are the components that make up a method? Signature, parameters, code block
What are the advantages of using git when collaboratively working on one code base? You can work remotely and theoretically independently and eventually bring the project together. You can track changes from your partners and see how they made the changes.
What kind of relationship did you and your pair have with the unit tests? It was an informative relationship. It was nice to be able to track progress as we were going through the waves.
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? Yes, we used map, max_by, min_by, and include? We used .map to create a new array of hashes that stored the words and score values for each word in the original array of words. We used max_by and min_by to find the highest scoring word (max_by) and shortest word within the top scoring words (min_by). We used .include? to check if the letters used in the inputted word were available from the given letters, to check if a given letter was worth a given score value, and to check if the inputted word was in the English dictionary.
What was one method you and your pair used to debug code? We used the VS Code debugger to step through the code and watched a variable to see where the issue was.
What are two discussion points that you and your pair discussed when giving/receiving feedback from each other that you would be willing to share? 1. At the outset of the project, we discussed how we like to receive feedback and also how we process a problem to help facilitate communication throughout the project. 2. When giving feedback, seeing each other's workflows was helpful because we learned how each of us processes a problem. Now we can utilize each other's strengths going forward and incorporate those things we learned into our own individual work moving forward.

@CheezItMan
Copy link

Adagrams

What We're Looking For

Feature Feedback
General
Answered comprehension questions Check, I'm glad you were deliberate in how you went about your collaboration
Both teammates contributed to the codebase Check
Small commits with meaningful commit messages Good number of commits, but focus on describing the functionality you added, not the day or waves completed. Messages like, score working.
Code Requirements
draw_letters method Check
Uses appropriate data structure to store the letter distribution Check
All tests for draw_letters pass Check
uses_available_letters? method Check
All tests for uses_available_letters? pass Check
score_word method Check
Uses appropriate data structure to store the letter scores Check
All tests for score_word pass Check
highest_score_from method Check
Appropriately handles edge cases for tie-breaking logic Yes, but your indentation is a bit messy.
All tests for highest_score_from pass Check
Overall Nice work, you even got started on the extras. You hit all the learning goals for the project. Well done. Please read my inline comments for small suggestions.

return letter_array
end

letter_bag = create_letter_array("A", 9) + create_letter_array("B", 2) + create_letter_array("C", 2) + create_letter_array("D", 4) + create_letter_array("E", 12) + create_letter_array("F", 2) + create_letter_array("G", 3) + create_letter_array("H", 2) + create_letter_array("I", 9) + create_letter_array("J", 1) + create_letter_array("K", 1) + create_letter_array("L", 4) + create_letter_array("M", 2) + create_letter_array("N", 6) + create_letter_array("O", 8) + create_letter_array("P", 2) + create_letter_array("Q", 1) + create_letter_array("R", 6) + create_letter_array("S", 4) + create_letter_array("T", 6) + create_letter_array("U", 4) + create_letter_array("V", 2) + create_letter_array("W", 2) + create_letter_array("X", 1) + create_letter_array("Y", 2) + create_letter_array("Z", 1)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest having a hash with letters and the amount of each letter and using that to generate the letter bag instead of this. Less typing.

end

def uses_available_letters?(input, letters_in_hand)
new_array = letters_in_hand.clone

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very clever to use .clone that way you avoid destroying elements of letters_in_hand.

end

def score_word(word)
point_value = [

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent data structure!

end
if winners.length == 1
return winning_word
else # if there's a tie

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your indentation is a bit of a mess here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Chris, thanks so much for your review & all your feedback -- it's much appreciated! Could you clarify this comment a little more? I'm looking through and trying to see where the indentation could be fixed so that I don't make this mistake again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants