Skip to content

Conversation

@kanderson38
Copy link

Adagrams

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
What are the components that make up a method? The signature and the body
What are the advantages of using git when collaboratively working on one code base? You can work on the same code without overwriting each other's work, and it lets you use version control to keep track of changes
What kind of relationship did you and your pair have with the unit tests? They helped us be organized in our approach to writing methods and making sure they output the correct data. We feel like we have a good understanding of the testing process.
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? We used .max_by, .min_by, .include?, .sample, .merge, and .select. We used most of these enumerables in our highest_score_from method, because we needed to find the maximum and minimum of scores and word lengths and pull those values out of hashes.
What was one method you and your pair used to debug code? We mainly used puts statements to check our variables.
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 talked about how we didn't necessarily have a driver and a navigator most of the time, but two navigators, one of whom happened to be typing. It worked out well, but we want to think about dividing those roles up a little better. We also discussed our different approaches to debugging -- Kirsten ends up trying to find the issue by reading through the code, and Cyndi uses more puts statements to find variable values, and both seem to be effective.

@dHelmgren
Copy link

Adagrams

What We're Looking For

Feature Feedback
General
Answered comprehension questions Yes
Both teammates contributed to the codebase I take it on faith that this happened, but in the future please have both partners make commits.
Small commits with meaningful commit messages You could do better on this front. Think about committing whenever you get a small chunk working.
Code Requirements
draw_letters method Yes
Uses appropriate data structure to store the letter distribution See comment!
All tests for draw_letters pass Yes
uses_available_letters? method Yes
All tests for uses_available_letters? pass Yes
score_word method Yes
Uses appropriate data structure to store the letter scores Yes
All tests for score_word pass Yes
highest_score_from method Yes
Appropriately handles edge cases for tie-breaking logic Yes
All tests for highest_score_from pass Yes
Overall Hey y'all! Great work on this project. Your code fulfills all of the requirements and does it in a readable and reasonable way. The code is clean, and it passes all the tests!

letters_array = []
i = 0
until i == 10
char = LETTER_POOL.to_a.sample[0]

Choose a reason for hiding this comment

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

By this logic, you're as likely to draw an e as you are a z!

Instead, you might create an array containing all the letters, with code similar to this:

letter_counts = {
  # the hash you had before
}
letters = []
letter_counts.each do |letter, count|
  count.times do
    letters << letter
  end
end

Then you could pull a random tile with letters.sample and get a nice even distribution.

check = true
input.split("").each do |char|
if !popping_array.include?(char)
check = false

Choose a reason for hiding this comment

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

I'll leave this as a "vague thing" to think about... I think that while you iterate through input.chars, you can actually determine that uses_available_letters? can return false before the loop finishes.

Remember, when you use the return keyword, it will kick the program execution out of the method early, and return whatever value you give it.

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