Skip to content

Instructions for Resistor Color are misleading #833

Closed

Description

@ghjk-code

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?

Activity

  1. SleeplessByte commented on Mar 7, 2020

    @SleeplessByte
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ Proxy