Problem-specifications: Proposal for new exercise: ResistorColor (Resistor Series #1)

Created on 10 Feb 2019  ·  12Comments  ·  Source: exercism/problem-specifications

Resistors have color bands. Each color represents a number. Resistor can have up to 6 bands, and together they describe the resistance value in Ohms, together with the tolerance and the temperature coefficient.

image

We're planning to have a series of Resistor-* exercises, that are building up to decoding 4-6 band resistor color codes.

1) The new exercise ResistorColor
The first and most basic one is just reading the (first) band's color from an array and return its numeric value.
schermafbeelding 2019-02-10 om 13 15 39

See PR #1457

2) This is supposed to be part of a series of Resistor related exercises, in ascending complexity:

  • Reading the first two bands and combine them to a number
  • Reading TriBand, and returning a value in Ω (Ohms) or K Ω
  • Reading 4 to 6 bands, returning the value in Ohms, the tolerance and the temperature coefficient. In those resistors, the meaning of the 3rd and 4th band is depending on the total number of bands.
    Coming soon!

Most helpful comment

  1. Will you be getting into combining resistors in series and/or in parallel?
  2. Will the solution of one exercise be required before proceeding to the next?
  3. Will this first exercise be recommended as a core exercise and then each of the follow-ons as a side?

Looking forward to learning more about what the forward looking plan might be.

All 12 comments

  1. Will you be getting into combining resistors in series and/or in parallel?
  2. Will the solution of one exercise be required before proceeding to the next?
  3. Will this first exercise be recommended as a core exercise and then each of the follow-ons as a side?

Looking forward to learning more about what the forward looking plan might be.

@rpottsoh :-))))
1) Not even thought of it. Great idea!
2) My thinking is: not in the first exercises. But in the more advanced ones, they can be, yes. Currently only core exercises can unlock other, so it also depends on how a track implements them. But for instance in Ruby, including one in the other can be a nice showcase for mixins.
3) Also, depending on the track. For instance for Ruby, the second one is more appropriate as a core exercise than the first one. I can imagine that it's good to have the second one as a core, if you want to have it included. On the other hand, it's also possible that the student writes the code to be mixed in at the moment that they need it in the later exercise. In general, I don't think we should force rules on how tracks implement such a series, but you're right, it would be nice to offer a optional plan. 👌

Thoughts?

2. including one in the other can be a nice showcase for mixins

I am not sure I follow your meaning for mixins.

I am doing this on exercism dart track, https://exercism.io/my/solutions/3e1b3f982e614293b36ed824f78821bc

I am not sure the objective of the exercise is very clear as it is stated.

@rdai what are your doubts? What isn't clear? Perhaps discuss it with a mentor on the exercise there? If there are still questions or a way to make it clearer, then a pull request could be made on this repository (this repository is currently "frozen" with the exception of bug fixes, though). That doesn't mean that the Dart track couldn't have the new improved version, in the meantime.

Thanks, I was able to complete it myself but running it and reverse engineer from the test results. I was not sure what the exercise is asking me to do. I see a lot descriptions but not a statement asking me to do something. Thanks. I will look at the pull request.

@rdal keep in mind that this is the first of a series of exercises regarding Resistors. So the minimal information, the incomplete specification, that is a "feature" of the exercise. Still, it should end up being clear, so if there are problems with it that we can fix, it would be a good addition.

@kotp I now see I am not the first one that reported this and this is even already merged into something, just not reflecting on the main site yet. https://github.com/exercism/problem-specifications/issues/1546

Thanks, I will leave this post alone now. 👍

On 20/09/17 09:42PM, rdai wrote:

@kotp I now see I am not the first one that reported this and this is
even already merged into something, just not reflecting on the main
site yet.
https://github.com/exercism/problem-specifications/issues/1546

Yep, frozen for now, only bug fixes. Thanks for linking that from here!

Hi! I want to make a request. In this provle, provided test have lowercase color names, but in explanation, first letter is upper case. In my opinion it confuses students.

Can we change problema explanation and show only lowercase color names?

Regards!

@sergarb1 Could you make a pull request to show what you would like changed?

Was this page helpful?
0 / 5 - 0 ratings