Exercise docs refer to another exercise that might not be implemented

This line only makes sense if a track has also implemented Crypto Square. If it hasn’t, this line is misleading. Are there other practice exercises that directly refer to another one? My problem is with another exercise being named, not an exercise touching on concepts related to another exercise.

The immediate thought for practice exercises that (may) reference others is the Amusement Park and Amusement Park: Improved that is on the Ruby track. If the exercise does not, itself, I often do.

Another set of exercises that may is the Resistor series of exercises.

Resistor Color isn’t referenced by Resistor Color Duo or Resistor Color Trio. Resistor Color Duo is referenced by name in Resistor Color Trio. I did a cursory check, and all 35 tracks implementing Resistor Color Trio also implement Resistor Color Duo. The three exercises form a series, and it seems odd to me that a track would only choose to implement the third exercise in that series. That said, it’s relevant.

In Resistor Color Duo you decoded the first two colors. For instance: orange-orange got the main value 33. The third color stands for how many zeros need to be added to the main value. The main value plus the zeros gives us a value in ohms. For the exercise it doesn’t matter what ohms really are.

If we don’t mention Resistor Color Duo, we probably should instead add an explanatory sentence describing how orange orange maps to the value 33.

Of the 75 active tracks:

  • only elm and pharo-smalltalk have simple-cipher but not crypto-square
  • only bash and pharo-smalltalk have resistor-color-duo but not resistor-color

It might be simplest for those tracks to add the exercises
.

2 Likes

The description is overly long for a math-focused problem, with too much non-essential detail. It needs significant simplification, and the extensions section should be left out. Based on my experience, many people might lose interest or feel confused and give up.

Also, I’m not a fan of exercises referencing other exercises. Resistor Color Trio assumes familiarity with Resistor Color Duo, which forces readers to pause and switch exercises, creating unnecessary confusion. If these exercises are meant to be completed in order, there should at least be a note at the beginning stating this explicitly.

I wonder why we did that in bash?

I did notice this last year but I didn’t do anything about it.

My guess if we figured it’s pretty simple and the deo version has more value?

I suspect Bash can’t implement Resistor Color without some retooling since we’re asking for both the value of a resistor color and a sequence of all the colors. The Bash test runner can only do one or the other at the moment. If we drop the second requirement, it’s basically Resistor Color Duo but with only a single band so I’m not seeing this as a priority except for maybe completeness.

bash now has Resistor Color :smile: . Glenn acts fast.

2 Likes