I just finished Simple Cipher and was a bit surprised that it’s listed as an easy exercise. Compared to other easy exercises, it takes a lot more code to solve and the problem domain is generally also more difficult to understand.
I’d suggest listing this as a medium difficulty exercise, just like in the C# track.
Exercise difficultly is notoriously hard to measure.
Given that all exercises get grouped into easy, medium or hard, “easy” exercises have a range of difficulties from very easy to borderline medium.
Different maintainers might draw the line between easy and medium at different places.
Exercises can be challenging for different reasons. Some people might find modulo math really hard, while others might the idea of shifting letters tricky. Some people might have trouble with figuring out how to group chunks of a sequence, while others might find that trivial. As such, difficultly can be very, very subjective and different from person to person. That makes it really hard to capture as easy to hard. Whatever bucket you put it in, some people will likely disagree.
Of course have a different, subjective difficulty for everyone. I realize that. That doesn’t mean we couldn’t reconsider the classification of an exercise though, right?
But my first post doesn’t explain why I think of it as a medium exercise, so I’ll have a go at that here:
Research required
Typical easy exercises can be solved with the info in the Overview text. Not so with Simple Cipher.
There is some explanation of the Caesar and Shift cipher, but it’s not great IMHO. In step 2, the text talks about introducing a key, without really explaining:
that this is the Vigenere cipher
how a key can be used to transform input → output when encoding/decoding messages. There are just 2 example that say “input X encoded with key Y lead to output Z”
So people will either Google for information (which is not required with other easy exercises) or they’ll spend quite a bit of time studying these examples.
Lines required to solve the exercise
LoC is not a perfect measure, but can indicate how much logic an exercise needs to be solvable, especially when looking at the shortest solutions the community has come up with.
A typical easy practice exercise (so not from the learning track) has ~15 lines of code in the most submitted answer and usually less than 10 for the shortest.
The 5 most submitted versions for Simple Cipher have 95, 36, 76, 67 and 94 LoC respectively. The shortest solution has 27 lines, more than double the length of an average exercise’s shortest answer.
(My) Conclusion
Considering the two things above, it makes sense to mark this as ‘Medium’. If someone new would first solve Two Fer and Raindrops, there’s quite a jump in effort if they try to solve Simple Cipher next.
It’s pretty hard to rank an exercise difficulty by comparing it to only the easy exercises. Have you done most of the medium exercises, too? If you complete the easy and medium exercises and rank their difficulty on a scale from 1-10, that could be very helpful.
I’ve done 6 of the medium exercises now, so maybe the sample size is not big enough.
But Simple Cipher just feels like the same amount of work (coding and/or understanding the problem) as those medium exercises I’ve done (except maybe for Resistor Color Trio)
If you complete the easy and medium exercises and rank their difficulty on a scale from 1-10, that could be very helpful.
I wonder if this will work well in practice. It’ll still take me a while to complete everything. And when I get to that point, I’m not sure how well I can judge the effort that went into exercises I solved a few weeks/months before.
That’s why I posted this now, because I just finished this exercise.