-
Notifications
You must be signed in to change notification settings - Fork 27
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
Adagrams - Valerie & Anibel - Edges #13
base: master
Are you sure you want to change the base?
Conversation
AdagramsWhat We're Looking For
Hi all! Wonderful submission for this project! I found the code readable and hitting all the requirements, but I also found some parts to be really clever and clean. I'm really impressed! Some lines of code show that you two clearly have a good grasp on how conditionals evaluate, how to compare and reassign, and how to use Also, great job on the tests you added for the optional wave! Overall, good job. I don't have too many comments on this submission, so let me know if you have any questions |
|
||
end | ||
|
||
return false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always returning false
if it gets to this point (aka hasn't returned true
beforehand) is great!
|
||
if score == best_word[:score] | ||
best_word[:word] << word | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this approach -- shoveling word
into best_word
hash on a tied score, or clearing it if the score is clearly better
end | ||
end | ||
|
||
return input_array.length == 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this -- returning true
or false
based off of this evaluation.
I think you could still have added above this
if input_array.include? letter
...
else
return false
end
so that the method could jump out of the iteration sooner than looping all the way through, but yeah, this is great!
|
||
expect(is_in_english_dict?('niugfdfl')).must_equal false | ||
expect(is_in_english_dict?('hippopotamus')).must_equal false | ||
expect(is_in_english_dict?('#&*123')).must_equal false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are all really good edge cases that I would expect! Nicely done
Adagrams
Congratulations! You're submitting your assignment.
Comprehension Questions
Enumerable
mixin? If so, where and why was it helpful?