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

jessie and Hannah adagrams #4

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

Conversation

jessiezhang2017
Copy link

Adagrams

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
What are the components that make up a method? A method has a method signature , return statement and invocation .
What are the advantages of using git when collaboratively working on one code base? We can work on different computers at the same time, and track the progress . Git keeps a copy of different versions, we can track what we changed.
What kind of relationship did you and your pair have with the unit tests? We used the unit tests to check if our methods are working correctly. We also created a few tests to run for wave 5. It was a good relationship with a couple of bumps.
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? Yes, it helps to solve the problem easier, and make the code drier. For example, max_by allowed us to find the maximum value hash pair without having to use loops and if statements.
What was one method you and your pair used to debug code? We referred to the error messages to figure out where the error was located to understand the error type. Once located, we could check the code and brainstorm solutions, followed by checking for errors again.
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? (1) We shared with each other if we were guess or ask culture, then developed actions that would allow us to work successfully. For instance, Hannah is ask culture, so she communicated she was going to check in with Jessie regularly to see what she thought on certain points. (2) We discussed learning styles. Jessie works best visually and Hannah works best by doing things, so we incorporated both. We planned out the solution on paper/whiteboard first talking about solution, and both had a chance to be hands on with problem solving on the computer.

@dHelmgren
Copy link

Adagrams

What We're Looking For

Feature Feedback
General
Answered comprehension questions Good answers!
Both teammates contributed to the codebase I take it on faith that you both made changes, but in the future do work on both laptops!
Small commits with meaningful commit messages 5 commits is too few! It's good to commit even if you just get the code stable but not working. If something was wrong with part of your code in real life it could give you a HUGE headache!
Code Requirements
draw_letters method It is probably the most random draw I've seen, but those shuffle calls can take a long time!
Uses appropriate data structure to store the letter distribution Using an array was a great choice!
All tests for draw_letters pass Pass!
uses_available_letters? method Smart use of RETURN!
All tests for uses_available_letters? pass Pass!
score_word method This is concise and delightful!
Uses appropriate data structure to store the letter scores A hash was a great choice!
All tests for score_word pass Pass!
highest_score_from method This takes really complex logic and makes it very readable, nice work!
Appropriately handles edge cases for tie-breaking logic Yes indeed!
All tests for highest_score_from pass Pass!
Overall This is really exemplary work, and you should be really proud of it!

individual_hand = Array.new(10)

individual_hand.each.with_index do |letter, x|
bag_of_letters = bag_of_letters.shuffle

Choose a reason for hiding this comment

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

This certainly makes the draw random, but do you need to do it on each stage of the loop? seems inefficient!

if individual_letters.include?(letter)
individual_letters.delete_at(individual_letters.index(letter))
else
return false

Choose a reason for hiding this comment

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

Nice! Don't do more work than needed!

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.

3 participants