Adagrams - Valerie & Anibel - Edges#13
Adagrams - Valerie & Anibel - Edges#13anibelamerica wants to merge 10 commits intoAda-C10:masterfrom
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.
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.
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.
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
endso 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.
these are all really good edge cases that I would expect! Nicely done
Adagrams
Congratulations! You're submitting your assignment.
Comprehension Questions
Enumerablemixin? If so, where and why was it helpful?