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

Branches - Clara & Kelsey #16

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

Branches - Clara & Kelsey #16

wants to merge 4 commits into from

Conversation

kelsk
Copy link

@kelsk kelsk commented Aug 15, 2019

Adagrams

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
What are the components that make up a method? Method signature (which includes parameters if desired), body including any code to be executed and return statement.
What are the advantages of using git when collaboratively working on one code base? Changes can be tracked by which user made them, changes can be shared or stored separately, and everyone can use their custom machine settings for ideal code environment.
What kind of relationship did you and your pair have with the unit tests? We focused on the unit tests to drive our code creation. We ran the tests and worked backwards from our failures.
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? We used 'reject' and 'slice' in our code. We used both methods to manipulate the user's drawn letters and their inputted word, to ensure that the letters were available. (line 59)
What was one method you and your pair used to debug code? Rake and Pry were essential tools for us in debugging our code.
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? It was very helpful to discuss how we individually prefer to give and receive feedback at the very beginning of our partnership. While our partnership was happening, we continued to discuss our preferences with regards to the coding environment and make accommodations for each other. We also discussed not doing work at home: we agreed on the amount of work or time we would spend on the project individually, so that neither of us would feel like the workload was imbalanced. We also discussed mental management: being open about moods, hanger, needing breaks, positive feedback, and setting a timer in instances where we wanted to be sure we took a break/halted work at a specific time.

@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 complete" and more "implements score_word method" or "refactors data structure for score table" 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

Great work on this project, you two! I'm really pleased with the code I see here; it's clean, logical, readable, and does some really cool things.

I have a few suggestions on how to make Ruby like your code style a little more.

Other than that, overall, great submission. Also, great work on the optionals!

{ character: "x", quantity: 1, score: 8 },
{ character: "y", quantity: 2, score: 4 },
{ character: "z", quantity: 1, score: 10 },
]
Copy link

Choose a reason for hiding this comment

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

This data structure RULES! It's so clear what each value is! Nice

end
# restores the "used" letters to letter_bucket so they are not "used up"
letter_bucket << hand
letter_bucket.flatten!.sort!
Copy link

Choose a reason for hiding this comment

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

Turns out: You don't need these two above lines! You would need them if you did need to manually restore the letter_bucket value, but because of variable scope, every time that this method gets called, letter_bucket gets recreated to its original form.

end
end
# the length of the input checks that the user used only available letters
if input.length == 0
Copy link

Choose a reason for hiding this comment

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

Nice! This is clever!!!

return true
else
return false
end
Copy link

Choose a reason for hiding this comment

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

There's an opportunity to refactor here. Consider instead of this if ... else statement:

return input.length == 0 ? true : false

or even...

return input.length == 0

# wave 3

# manipulate user input
def score_word (word)
Copy link

Choose a reason for hiding this comment

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

Minor nitpick: You CAN define a method with a space between the method name and the input parens, but Ruby will give a warning, because it prefers it if the method signature looks more like def score_word(word)

end
end

return winning_hash
Copy link

Choose a reason for hiding this comment

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

Extremely minor: You lost your indentation on this line! Watch out!


# checks to see if input is in English dictionary
def is_in_english_dict? (input)
path = '/Users/kelseykrippaehne/Documents/Ada/hw/adagrams/lib/dictionary-english.csv' # deliberate absolute path
Copy link

Choose a reason for hiding this comment

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

We talked this through together in person BUT just wanted to share that to make it work on my machine, changing this line to path = 'lib/dictionary-english.csv' worked for me since y'all moved the file, but I didn't get it to work to go to the assets folder


it 'actual word is recognized by English dictionary' do
drawn_letters = ['T', 'H', 'E', 'A', 'R', 'C', 'H', 'I', 'C', 'X']
test_word = 'THEARCHIC'
Copy link

Choose a reason for hiding this comment

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

whoooooa :0

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