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

Katrina and Hayden's Adagrams #17

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

Conversation

haydenwalls
Copy link

Adagrams

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
What are the components that make up a method? Method signature (includes parameters, if necessary), code block, and return value.
What are the advantages of using git when collaboratively working on one code base? Git helps track and manage different versions of code, and even helps resolve conflicting codebases written by different developers via the merge function.
What kind of relationship did you and your pair have with the unit tests? Delving into the tests while writing our code gave us insight into certain bugs that we did not foresee. The tests also allowed us to experiment when refactoring the code, ensuring our refactors did not break something that had previously worked.
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? Our code used the .include? method several times to confirm whether a given array of letters (e.g. uses_available_letters? and score_word) contained a particular letter. Much easier than iterating over each element of the array!
What was one method you and your pair used to debug code? We used binding.pry several times to pause the program and test various variables at particular points in the file/loop/conditional/etc.
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 both feel we did a good job of switching roles (driver/navigator) at regularly scheduled intervals, as well as committing our changes via git before switching. We celebrated almost every single small victory with high fives, which facilitated a strong spirit of collaboration.

@tildeee
Copy link

tildeee commented Aug 21, 2018

Adagrams

What We're Looking For

Feature Feedback
General
Answered comprehension questions x
Both teammates contributed to the codebase x
Small commits with meaningful commit messages x
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

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!

I'm making a few comments on this assignment about some suggestions on how to refactor, but they are all optional ways of looking at this code again. Overall, you two have done a great job. Good work!

By the way, nice job with adding the tests for the optional wave!

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.

Is there a way you could shorten this set of if/else conditionals with a postfix conditional or a ternary?

it 'verifies that invalid word input returns false' do
input = "poopydiscoopscoopdiddywhoopwhoopdiscoopdipoop"

expect(is_in_english_dict?(input)).must_equal false
Copy link

Choose a reason for hiding this comment

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

👍

expect(is_in_english_dict?(input)).must_equal true
end

it 'verifies that first entry in the dictionary CSV file is read properly' do
Copy link

Choose a reason for hiding this comment

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

me being nitpicky: this test is not named accurately!

temp_letters_in_hand.delete_at(temp_letters_in_hand.index(letter.upcase))
letter_match_counter += 1
end
end
Copy link

Choose a reason for hiding this comment

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

Clever way of realizing that counting all "successful matches" with letter_match_counter should be the same size as the input!

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.

if word.include?(input)
verify = true
end
end
Copy link

Choose a reason for hiding this comment

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

Similar to a comment above but...

"Vague thing" to think about...While you iterate through dictionary, you can actually determine that is_in_english_dict? can return true 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