Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leaves - Hallie and Georgina: Adagrams #12

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

idhallie
Copy link

Adagrams

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
What are the components that make up a method? Method signatures, parameters, block
What are the advantages of using git when collaboratively working on one code base? This allows tracking of changes and version control. This is a way to prevent unintended conflicts when multiple people are working on the same file.
What kind of relationship did you and your pair have with the unit tests? At times, we had a strained relationship with the unit tests (haha). However, by using a combination of Pry and 'rake' for the unit tests, we were able to find errors and solve for tests one by one.
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? Yes! In Wave 4, we used max_by to identify the highest scoring word and min_by to get the lowest length word out of the "tied_words" array.
What was one method you and your pair used to debug code? We wrote small pieces of code and then used pry to pause the program and confirm that our code produced the output we expected (ex. casting an array to a hash).
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? We discovered that with complicated problems we needed to step away and brainstorm individually before coming together to discuss next steps. We found that we have a similar communication style and approached many code problems the exact same way.

@dHelmgren
Copy link

Adagrams

What We're Looking For

Feature Feedback
General
Answered comprehension questions Yes
Small commits with meaningful commit messages yes!
Code Requirements
draw_letters method
Uses appropriate data structure to store the letter distribution yes
All tests for draw_letters pass yes
uses_available_letters? method
All tests for uses_available_letters? pass yes
score_word method
Uses appropriate data structure to store the letter scores yes
All tests for score_word pass yes
highest_score_from method
Appropriately handles edge cases for tie-breaking logic yes
All tests for highest_score_from pass yes
Overall Great work overall! See my comments for a few small spots that could be clarified and cleaned up!

end

array_letters = array_letters.join("")
array_letters = array_letters.split('')

Choose a reason for hiding this comment

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

This is weird. What are you trying to achieve here? It needs a comment.

# Hash from hand - quantity of individual letters
letters_in_hand.each do |character|
hand_hash[character] += 1
end

Choose a reason for hiding this comment

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

Once you have this hash, do you need a second one? Or can you just iterate through the input and reduce the values on the hand_hash?


# Look up each character for score value
word.each do |character|
score += values_by_letter[character.to_sym]

Choose a reason for hiding this comment

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

Nice!

high_score_hash[:word] = highest_score[0]
high_score_hash[:score] = highest_score[1]

# TIES

Choose a reason for hiding this comment

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

Love the labelling.

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.

2 participants