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

Fire - Jing & Stacy #10

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

Fire - Jing & Stacy #10

wants to merge 5 commits into from

Conversation

Jing-321
Copy link

@Jing-321 Jing-321 commented Sep 17, 2020

Assignment Submission: Adagrams

Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.

Reflection

Feature Feedback
What are the components that make up a method? signature( include parameter ) and body
What are the advantages of using git when collaboratively working on one code base? Jing - Keep track on each change and keep collaborators up to date. // Stacy - It's easier to write what the person is thinking and leave comments, so they can be worked through together (if not already). You can see exactly what the other person has changed, so you both aren't doing the same thing
What kind of relationship did you and your pair have with the unit tests? Good relationship. It worked smoothly for us.
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? max_by, min_by, uniq, and each. They made our code very compact and readable. There is no need to use .each to iterate through each elements to find the max or min.
What was one method you and your pair used to debug code? Go through the code again and again. If it still does not work, we ask someone else to look at 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? We didn't have an ego, we were willing to have a conversation about anything that may not be clear. We tried to keep the workload balanced and have each person typing vs talking/brainstorming an equal amount.

Copy link
Collaborator

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

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

Nice work, you hit the learning goals here. Well done.

Comment on lines +3 to +4
##################### wave 1
def draw_letters
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

def uses_available_letters?(input, letters_in_hand)
input_letters = input.split("")
if input_letters.length > 10
puts "Oops, too many letters! You only have 10 :)"
Copy link
Collaborator

Choose a reason for hiding this comment

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

You don't need to do puts here. Just return false or raise an error. Probably raising an error makes sense here.

Suggested change
puts "Oops, too many letters! You only have 10 :)"


counts_input.each_pair do |letter, count|
if counts_input[letter].length > counts_letterinhand[letter].length
puts "Looks like you use #{letter} too many times."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
puts "Looks like you use #{letter} too many times."

Comment on lines +38 to +39
counts_input = input_letters.group_by {|letter| letter}
counts_letterinhand = letters_in_hand.group_by {|letter| letter}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Clever use of group_by

end

############################# wave 3
def score_word(word)
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Comment on lines +87 to +88
######################### wave 4
def highest_score_from(words)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice uses of select and max_by.

Comment on lines +117 to +118
######################### wave 5
def is_in_english_dict?(input)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Well done, you got the optional dictionary!

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