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

Branches Vi && Steph #21

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

Branches Vi && Steph #21

wants to merge 5 commits into from

Conversation

Steph0088
Copy link

Adagrams

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
What are the components that make up a method? The signature and the block of code inside. It can have parameters but doesn't need them. It is a way to automate code and reduce repetition.
What are the advantages of using git when collaboratively working on one code base? You can save changes to different versions of a file and refer back to them as needed. If you make mistakes or want to refer back to a working piece of code, you can find them in git.
What kind of relationship did you and your pair have with the unit tests? We struggled and were not running them for the first part of our code. It wasn't until the last two waves that we realized that we should have been utilizing them. They actually turned out to be really helpful. The waves were checking conditions that we may have not thought of while testing our own code.
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? Yes, we used: each_with_index, slice, include?, split. We used them in our .each iterations, and they helped us sort and move variables from one array to a hash or vice versa.
What was one method you and your pair used to debug code? We often used puts statements, as well as finding the lines/error types referred to in error messages when we ran the program. We ended up using the test code in the end to look through our code and find our errors and fails.
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 would check in and let each other know when we felt lost or when we needed to slow down. We celebrated our success.

@tildeee
Copy link

tildeee commented Aug 23, 2019

Adagrams

What We're Looking For

Feature Feedback
General
Answered comprehension questions x
Small commits with meaningful commit messages x, instead of having commit messages that say "wave 2 complete" we would rather have commit messages that said something like, "implements the score_word method" or "refactors the letter data structure" etc
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

Fantastic work on this project, you two! Your submission has really excellent and readable code. You two made really good decisions about how to keep the code clean and logical. There are even small touches like how you had the comments in the file to describe the methods that were really good.

I have a few comments to point out places where your code could've been cleaned up a little-- this mostly is in some places where "dead code" remained.

That being said, great work overall! :)

end
all_letters << letters
end
all_letters = all_letters.flatten
Copy link

Choose a reason for hiding this comment

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

NICE! This ends up being so clean and clever!

[],['A', 'E', 'I', 'O', 'U', 'L', 'N','R', 'S', 'T'],
['D','G'],['B', 'C', 'M','P'],['F','H', 'V', 'W', 'Y'],
['K'],[],[],['J', 'X'],[],['Q', 'Z']
]
Copy link

Choose a reason for hiding this comment

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

Clever data structure!

end
end
puts letter_points
puts word.split("")
Copy link

Choose a reason for hiding this comment

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

Don't forget to delete your puts statements before you submit!


# Wave 4

def highest_score_from(words)
Copy link

Choose a reason for hiding this comment

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

Here, you have a first definition of a method named highest_score_from, and then below, you redefine a method with the same name. Ruby ends up using the later definition (because that's what gets defined last), but Ruby still gives a warning warning: method redefined; discarding old highest_score_from. Feel free to delete this method if it doesn't get used in the end!

top_word = ""
top_score = 0
tie_breaker_word = ""
tie_breaker_score = ""
Copy link

Choose a reason for hiding this comment

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

The variable tie_breaker_score ends up not being used anywhere else in the file-- is it safe to delete?

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