Skip to content

Conversation

mfunkemomo
Copy link

Adagrams

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
What are the components that make up a method? Signature Line [method name, parameters] and Block [the things we want the method to do]. The method must be invoked to run. To invoke you need the method name and to pass in any arguments.
What are the advantages of using git when collaboratively working on one code base? Multiple people can work on the same project at once, tracks changes and has version control, automatically merge any compatible changes, and handles merge conflicts
What kind of relationship did you and your pair have with the unit tests? We liked them, they were helpful in testing our code to see if it actually worked.
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? We used enumerables in the majority of our methods to help locate and relocate objects. Here are the methods we used them in: uses_available_letters? - include, score_word - find and include, highest_score_from - max and sort_by, is_in_english_dict? - include
What was one method you and your pair used to debug code? We used a lot of puts statements and we raked the adagrams file
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 that we both need to get better at giving feedback, for example using better terminology to explain our code and learn to read the other person's preferences for receiving feedback.

@tildeee
Copy link

tildeee commented Aug 23, 2019

Adagrams

What We're Looking For

Feature Feedback
General
Answered comprehension questions x
Small commits with meaningful commit messages x, I would probably prefer commit messages that were less "wave 2 completed," and more like "implements score_word method" or "refactors scoring table data structure" etc
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

Well done on this project, Brianna and Monick! You all have some great and solid logic, with readable code style. I can tell that you all wrote your solution and found interesting and awesome opportunities to use Enumerable methods.

I have a few comments on your code to help point out some places where I think things could be cleaned up if you had more time on this project. I could also see a lot opportunities of refactoring the highest_score_from method.

Otherwise, great work on this project.

end

return hand
end
Copy link

Choose a reason for hiding this comment

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

Nice work on this method! This is a good strategy. Actually, although you're right that sometimes you need to make a copy of variables, in this case, you don't need copy_of_letters. You can replace copy_of_letters here with letters and the tests still pass! Let me know if you have questions on that!

letters_array.each do |letter|
score = score_chart.find {|points, letters|
letters.include?(letter)
}.first
Copy link

Choose a reason for hiding this comment

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

Nice use of find!

end

winning_word = nil
sorted_words = winning_words.sort_by(&:length)
Copy link

Choose a reason for hiding this comment

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

Nice!

verdict = false
end
return verdict
end
Copy link

Choose a reason for hiding this comment

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

Nice work on this optional wave!

verdict = false
end
return verdict
end
Copy link

Choose a reason for hiding this comment

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

Here's an idea for a refactoring if you had more time on this project: Is there a way to take out the else ... verdict = false ? Hint: Could changing the initial value of verdict in verdict = "" to something else help?

verdict = false
end
return verdict
end
Copy link

Choose a reason for hiding this comment

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

Also, do you have any tests for this? ;)

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