Skip to content

Emily and Daniela - Leaves #8

Open
emilyvomacka wants to merge 4 commits intoAda-C12:masterfrom
emilyvomacka:master
Open

Emily and Daniela - Leaves #8
emilyvomacka wants to merge 4 commits intoAda-C12:masterfrom
emilyvomacka:master

Conversation

@emilyvomacka
Copy link

@emilyvomacka emilyvomacka commented Aug 15, 2019

Adagrams

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
What are the components that make up a method? "def", signature (with parameters), method block, "end" :)
What are the advantages of using git when collaboratively working on one code base? Version control, ability to see all changes made by your partner
What kind of relationship did you and your pair have with the unit tests? We discussed, then coded the method, test-drove the method using irb, then ran rake on the method when we thought it would pass.
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? We used .map to easily translate an array of words to an array of scores using our score_word method.
What was one method you and your pair used to debug code? "puts" statements...keeping it basic. We also entered test edge cases, which helped us find errors (ex, our uses_available_letters function was deleting all copies of a char from the pool the first time it was used. This did not surface with the rake tests, but was discovered during manual testing.
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) spend more time talking through logic and pseudocode before beginning to code, and 2) use more code comments during the coding process so driver and navigator can both visualize where we're at and what is coming next.

require "csv"

def draw_letters
letter_pool = ("a" * 10 + "b" * 2 + "c" * 2 + "d" * 4 + "e" * 12 + "f" * 2 + "g" * 3 + "h" * 2 + "i" * 9 + "j" + "k" + "l" * 4 + "m" * 2 + "n" * 6 + "o" * 8 + "p" * 2 + "q" + "r" * 6 + "s" * 4 + "t" * 6 + "u" * 4 + "v" * 2 + "w" * 2 + "x" + "y" * 2 + "z").chars

Choose a reason for hiding this comment

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

I've only seen this strategy twice, both in this group! Wow! Very succinct.

if letters_copy.include?(letter)
letters_copy.delete_at(letters_copy.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!

score_hash = {
"AEIOULNRST" => 1,
"DG" => 2,
"BCMP" => 3,

Choose a reason for hiding this comment

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

Oooh! This is pretty novel too! Clever!

@dHelmgren
Copy link

Adagrams

What We're Looking For

Feature Feedback
General
Answered comprehension questions yes
Small commits with meaningful commit messages I would like to see more and more detailed commit comments!
Code Requirements
draw_letters method
Uses appropriate data structure to store the letter distribution yes
All tests for draw_letters pass yes
uses_available_letters? method
All tests for uses_available_letters? pass yes
score_word method
Uses appropriate data structure to store the letter scores yes
All tests for score_word pass yes
highest_score_from method
Appropriately handles edge cases for tie-breaking logic yes
All tests for highest_score_from pass yes
Overall Excellent work on this. Your code really demonstrates thoughtful choices across the board when it comes to making efficient and readable code.

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