Conversation
|
Oops. Incomplete answer on #4. We used enumerables in many places, it was very helpful for iterating through the data and methods like .map was helpful in reducing the line count. |
AdagramsWhat We're Looking For
Well done on this project, Caroline and Paige! Your code overall is extremely easy to understand because your submission has such clean, logical, readable code style and decisions. Great solutions! I've added a few comments about small refactorings I could imagine happening if you had more time on this project. That being said, well done overall |
| end | ||
| end | ||
|
|
||
| def draw_letters |
There was a problem hiding this comment.
Instead of the preliminary set up before the draw_letters method, would this work or could we change it so it would work?
| garbage_index = clone_letters_in_hand.rindex(input_array[index]) | ||
| clone_letters_in_hand.delete_at(garbage_index) | ||
| else | ||
| return false |
| return false | ||
| elsif input.length == 0 | ||
| return false | ||
| end |
There was a problem hiding this comment.
Nice! Catch some edge cases before doing the hard work.
| D: 2, G: 2, B: 3, C: 3, M: 3, P: 3, F: 4, H: 4, V: 4, W: 4, Y: 4, | ||
| K: 5, J: 8, X: 8, Q: 10, Z: 10 } | ||
|
|
||
| word_array = word.upcase.split(//) |
There was a problem hiding this comment.
Warning: Your indentation here is off, so it makes the rest of the file off in indentation!
| end | ||
|
|
||
| ####################### WAVE 4 ########################## | ||
| words = [] |
There was a problem hiding this comment.
You don't need this variable, and it's "floating" outside of any method, so feel free to delete this line
| end | ||
|
|
||
| return {word: winner, score: highest_score} | ||
| end |
There was a problem hiding this comment.
An elegant, clean, readable, straightforward, delicious solution for this method overall!
| all_words = CSV.read('assets/dictionary-english.csv') | ||
| input = [input.downcase] | ||
| return all_words.include? input | ||
| end |
| all_words = CSV.read('assets/dictionary-english.csv') | ||
| input = [input.downcase] | ||
| return all_words.include? input | ||
| end |
Adagrams
Congratulations! You're submitting your assignment.
Comprehension Questions
What are the advantages of using git when collaboratively working on one code base? | Multiple people can update & see the code. If you mess up, you can go back to a save point. If you want to branch out and try something new in the past, you can.
What kind of relationship did you and your pair have with the unit tests? | Great! We can see what went wrong and figure out how to resolve the bugs.
Does your code use any methods from the
Enumerablemixin? If so, where and why was it helpful? | .map, .each, .times,What was one method you and your pair used to debug code? | We used pry to fix a bug where the variable wasn't reassigning to the correct value.
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. We each see something that the other doesn't see, and that's very cool because it leads to new insights that we might not have had if we worked alone. 2. Being upfront about our own habits and interaction style before actual coding, helps us avoid communication problems and make the work come along much more smoothly than if we had to spend time hammering things out between ourselves.