TheOdinProject / ruby-exercises

MIT License
219 stars 1.06k forks source link

Bug - Exercise`hash_exercises.rb`:`favorite_list` should be renamed to `favorite_hash` #96

Open sometimescasey opened 8 months ago

sometimescasey commented 8 months ago

Complete the following REQUIRED checkboxes:

The following checkbox is OPTIONAL:


1. Description of the Bug:

Using the parameter name favorite_hash instead of favorite_list would leave the least amount of room for ambiguity.

It's not obvious that favorite_list is meant to be a hash, as opposed to a list of hashes.

It's also unclear because the first method to be implemented is called create_favorite_hash(), not create_favorite_list().

Everything was clear once I checked hash_exercises_spec.rb. But from the perspective of someone who is brand new to programming and doesn't necessarily understand how to read a test file, this may not be obvious.

(I do recognize that this is more of an opinion than a bug, as someone who is more familiar with Python and thinks of arrays as lists, and hashes as dictionaries.)

2. How To Reproduce:

Open ruby_basics/7_hashes/exercises/hash_exercises.rb.

3. Expected Behavior:

I would have expected the method argument to be named favorite_hash if the expected input is to be a hash.

4. Desktop/Device: N/A for this bug, but ok :)

5. Additional Information: