You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Instructions for Resistor Color are misleading #833
I was surprised to see multiple solutions that tries to work with a COLORS array with colors capitalized in the Resistor Color exercise.
Finally, one student tell me that this comes from the instructions where color names where indeed capitalized in the paragraph starting with: "These colors are encoded as follows:"...
Can we change those instructions to have colors all lowercased as in the test suite?
No. The textual description of colour names can differ from the implementation in the test. The colors used to be a list, which caused students to just copy the list and go from there (almost always leading to an Array implementation). Having this manual work in place ensures that people are not biased in their approach. The students that use capitalised names simply have not taken the time to read the README properly and study the tests, OR think that they should apply defensive programming. Both make for a good mentoring opportunity.
However, we could absolutely add a hint that says something like this:
Although the color names are capitalised in the description, the function colorCode will always be called with the lowercase equivalent, e.g brown instead of Brown.
Please follow CONTRIBUTING.md and follow the instructions how to generate the README.md on how to add this hint. We will happily accept a PR.
Activity
Update instructions for Resistor Color
SleeplessByte commentedon Mar 7, 2020
No. The textual description of colour names can differ from the implementation in the test. The colors used to be a list, which caused students to just copy the list and go from there (almost always leading to an
Arrayimplementation). Having this manual work in place ensures that people are not biased in their approach. The students that use capitalised names simply have not taken the time to read the README properly and study the tests, OR think that they should apply defensive programming. Both make for a good mentoring opportunity.However, we could absolutely add a hint that says something like this:
Please follow CONTRIBUTING.md and follow the instructions how to generate the README.md on how to add this hint. We will happily accept a PR.