Skip to content

Earth - Jasmine & Ana Adagrams#13

Open
jasyl wants to merge 4 commits into
Ada-C14:masterfrom
jasyl:master
Open

Earth - Jasmine & Ana Adagrams#13
jasyl wants to merge 4 commits into
Ada-C14:masterfrom
jasyl:master

Conversation

@jasyl
Copy link
Copy Markdown

@jasyl jasyl commented Sep 18, 2020

Assignment Submission: Adagrams

Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.

Reflection

Feature Feedback
What are the components that make up a method? The name, optional parameters, a block of code, and a return
What are the advantages of using git when collaboratively working on one code base? We didn't really use it but it's useful so that we can both contribute separately and both have access to the same file. It's also great so we can save our work periodically and see the changes we've made to the files.
What kind of relationship did you and your pair have with the unit tests? It was fine, no issues.
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? we used .map and .each, it was useful to look through an array of hashes to access info.
What was one method you and your pair used to debug code? We implemented print statements, checked the tests to see what sort of error messages would occur, and looked at the hints!
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? Being able to ask questions and receiving leading questions to point in the right direction instead of saying something is wrong. Positivity and willingness to work together is key to get through the problems. It's okay to ask for help when both of us are stumped!

@jasyl jasyl changed the title Jasmine & Ana Adagrams Earth - Jasmine & Ana Adagrams Sep 23, 2020
Copy link
Copy Markdown

@beccaelenzil beccaelenzil left a comment

Choose a reason for hiding this comment

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

Adagrams

Major Learning Goals/Code Review

Criteria yes/no, and optionally any details/lines of code to reference
Correctly creates and calls methods with proper syntax (parameters, return statements, etc.) ✔️
Uses correct syntax for conditional logic and iteration ✔️
Practices git with at least 3 small commits and meaningful commit messages ✔️
Utilizes unit tests to verify code; tests can run using the command $ rake and we see test successes and/or failures ✔️
Practices pair programming; the reflection question on pair programming is answered ✔️

Functional Requirements

Functional Requirement yes/no
For the draw_letters method, there is an appropriate data structure to store the letter distribution. (You are more likely to draw an 'E' than an 'X'.) ✔️
Utilizes unit tests to verify code; all tests for draw_letters and uses_available_letters? pass ✔️
Utilizes unit tests to verify code; all tests for score_word pass ✔️
Utilizes unit tests to verify code; all tests for highest_score_from pass ✔️

Overall Feedback

Great work on this project! It is clear that the learning goals around manipulating data and writing methods were met. Your code is clear and clean. I've made a couple in line comments for you to review. Keep up the hard work!

Overall Feedback Criteria yes/no
Green (Meets/Exceeds Standards) 4+ in Code Review && 3+ in Functional Requirements ✔️
Yellow (Approaches Standards) 3+ in Code Review && 2+ in Functional Requirements
Red (Not at Standard) 0-2 in Code Review or 0,1 in Functional Reqs, or assignment is breaking/doesn’t run with less than 5 minutes of debugging

Code Style Bonus Awards

Was the code particularly impressive in code style for any of these reasons (or more...?)

Quality Yes?
Perfect Indentation
Elegant/Clever
Descriptive/Readable
Logical/Organized

Comment thread lib/adagrams.rb
letter_array = word.upcase.split(//)
word_score = 0
letter_array.each do |each_letter|
case each_letter
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

While this case statement works, it means that the information about which letter has which score is locked into this piece of code, and can't easily be used elsewhere. For example, if you wanted to display the value of each letter in a hand, you would need to repeat this work.

An alternative approach would be to store the letter scores in a hash, something like this:

LETTER_SCORES = {
  "A" => 1
  "B" => 3,
  "C" => 3,
  "D" => 2,
  # ...
}

Comment thread lib/adagrams.rb
return finalists[0]
end

min_length = 10
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice work with the logic for tiebreaking. Consider breaking this out into a helper method.

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