Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Luhn algorithm] Replace _ with arrows #2466

Merged
merged 2 commits into from
Aug 3, 2024

Conversation

masters3d
Copy link
Contributor

[Luhn algorithm] Replace _ with arrows

@masters3d masters3d requested a review from a team as a code owner August 2, 2024 12:42
Copy link
Contributor

github-actions bot commented Aug 2, 2024

Hello. Thanks for opening a PR on Exercism 🙂

We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.

You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.

If you're interested in learning more about this auto-responder, please read this blog post.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

@github-actions github-actions bot closed this Aug 2, 2024
@ErikSchierboom ErikSchierboom reopened this Aug 2, 2024
@@ -22,7 +22,8 @@ The first step of the Luhn algorithm is to double every second digit, starting f
We will be doubling

```text
4_3_ 3_9_ 0_4_ 6_6_
4539 3195 0343 6467
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please implement @kotp 's suggest of using an odd number of digits?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @kotp's suggestion makes it less clear. The bit everyone misses is "starting from the right" not "every second digit". If we make it odd number of digits, then we double the second one from the left and from the right, which I think makes it confusing again.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was exactly what I was indicating with the "starting from the right" as that is what I see people miss as well.

So having a second example that shows this, with an odd number of digits, makes it apparent that it is not "start from the right".

It shows them side by side (or vertically) together, and visually shows the difference.

I agree, if we make it odd number of digits, and that alone, it would definitely be confusing, but along with the example of the even number of digits, this helps (to me) clarify visually, that there is something different going on on the left hand side.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it is already in. So it does not matter, if this matters it will eventually come in. So do not sweat it. I did not recognize that it was already merged and so the point is moot.

@IsaacG
Copy link
Member

IsaacG commented Aug 2, 2024

Forum discussion here

@masters3d masters3d requested a review from iHiD August 2, 2024 22:31
@ErikSchierboom ErikSchierboom merged commit 685ec55 into exercism:main Aug 3, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants