Skip to content

Conversation

emaust
Copy link

@emaust emaust commented Aug 19, 2019

Adagrams

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
What are the components that make up a method? method signature, parameter, method body
What are the advantages of using git when collaboratively working on one code base? see updates that other person has made, keep track of versions made by each collaborator, accessible by multiple parties
What kind of relationship did you and your pair have with the unit tests? First and second wave weren't relied on, third and fourth we used heavily to check and modify code.
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? No
What was one method you and your pair used to debug code? we used put statements and pry to look at what was happening for each portion of the code as we worked through it
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 discussed how both partners were good at communicating during moments of confusion/misunderstanding, and that there should have been more attentiveness to directions and a more clearly delineated plan of action.

@jmaddox19
Copy link

Adagrams

What We're Looking For

Feature Feedback
General
Answered comprehension questions X
Small commits with meaningful commit messages X
Code Requirements
draw_letters method X
Uses appropriate data structure to store the letter distribution X
All tests for draw_letters pass X
uses_available_letters? method X
All tests for uses_available_letters? pass X
score_word method X
Uses appropriate data structure to store the letter scores X
All tests for score_word pass X
highest_score_from method X
Appropriately handles edge cases for tie-breaking logic X
All tests for highest_score_from pass X
Overall Great!

Great job! Your code for the uses_available_letters? method in particular is nice and succinct. Good job handling all the edge cases!

letters_in_hand2 += letters_in_hand
input_array.each do |char|
if !letters_in_hand2.include?(char)
result = false

Choose a reason for hiding this comment

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

We haven't gone over this very well but I want to name that a method can have multiple return statements in it.
This is kind of confusing because when any return statement is executed, the method immediately stops running but in a case like this, that's exactly what we want.
Because of that, we could just say return false here rather than setting result to false and waiting to return it until later.
This is considered standard practice because it means that (1) the program can finish without doing any extra work, once it's decided it wants to return false and (2) there's no longer a need for the result variable. (Any time we can do something with less code or less variables it's usually preferable.)

highest_score[:word] = word
elsif score == highest_score[:score]
current_highest = highest_score[:word].length
challenger = word.length

Choose a reason for hiding this comment

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

Love the names current_highest and challenger! Very short and clear for anyone to understand.

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