Error in JS exercise

In the Secret Handshake exercise, the test cases require the right-most bit to be seen first. However, in the second point in the example with the number 9, the instructions say “the digit farthest from the right…” when it should be “closest to the right”.

If approved, I’ll quickly submit a PR to fix this!

Another thing: the exercise says “the rightmost five digits of the number once it’s been converted to binary”. However, the provided number will definitely be between 1 and 31 (mentioned in the instructions), so there’s no need to look at the “rightmost” five digits: just the five digits.

This is what I’m seeing for the second point. Was it already changed? Are we seeing something different?

The digit that is farthest to the right is 1, so the first action is wink.

This isn’t wrong and it leaves room for other tracks to add tests for numbers larger than 31.

Hi Isaac,
Firstly, I pointed out the fact that the right most bit should be seen first, but the instructions tell you to first see the digit farthest from the right, that is, the left-most bit. This is contradictory, and it should be “the digit closest to the right”.

You’ve understood my second point correctly. No, it isn’t wrong, but it’s unnecessary and potentially misleading for beginners who don’t realize that 2 ^ 5 - 1 is 31 (I think this can be explicitly pointed out in the exercise, too) and might therefore think that they need to specifically extract the rightmost five digits, while they need not do anything of the sort as the provided number will always have at most 5 digits. Removing the word rightmost clarifies this, and again, we should perhaps explicitly note this point.

Please cite the relevant part of the instructions, or provide a line number. I cannot find it.

Here’s a screenshot with the part highlighted. For GH reference, it’s line number 21.

That part says «to», but you say it says «from».

My bad, sorry! The issue still applies, though.

Which issue now exactly?

If you are suggesting

- - The digit that is farthest to the right is 1, so the first action is `wink`.
+ - The rightmost digit is 1, so the first action is `wink`.

Then I agree.

That’s right, Matthijs! Or preferably, as we won’t repeat the same word, “closest to the right”. This will explain the same thing in two different ways, allowing people to understand better.

Not sure if you’re authorized to review PRs, but here’s the PR anyway.

You should send this PR to exercism/problem-specifications instead.

All else being equal, I prefer shorter to longer.

Done!

“Farthest to the right” means “rightmost”. “Farthest from the right” means “leftmost”. In the future, please do provide links and copy/paste when possible. “To” and “from” are in some way opposites and not at all the same :smile:

@IsaacG , we’ll discuss this in the PR. Thanks!

The forum is the preferred place for this type of discussion, actually :smile:

The PR should just be the fix, the the discussion around the issue.

Ah, OK. We’ll stick to here, then!