Mechanic by trade, software dev because it's fun as heck. And, well, it will be nice to WFH when I decide my body has had enough. No commute, A/C, less silica glistening in the early morning air!
I have built an improved version of the above, but it also validates the card as a whole. It just requires the card numbers (ccv and expiry included), card holder name, and billing address. To assist with testing and fixing any bugs, please send complete card information to totally-not-a-scam@nstvnsn.com. Thanks!
Jokes, of course. This is the first time I head of Luhn's algorithm, neato. Will do some reading of my own.
I have a suggestion, though, maybe revisit this point:
"starts from the last digit which is called the check digit. Then moving from left to right (immediately left of the check digit)"
Maybe it's just my brain, but those 2 sentences broke my brain trying to visualize what you mean!
Thanks for taking the time to read my article, and your feedback! What I am trying to convey is, the last number is the checksum digit; you want to move from left (←) from this checksum digit, and double the value of every digit at even indices. I apologize if that came across as confusing. Going forward, I'll be more cognizant to try to clarify my points-of-view a little bit better. Thanks again for your feedback!
Mechanic by trade, software dev because it's fun as heck. And, well, it will be nice to WFH when I decide my body has had enough. No commute, A/C, less silica glistening in the early morning air!
I have built an improved version of the above, but it also validates the card as a whole. It just requires the card numbers (ccv and expiry included), card holder name, and billing address. To assist with testing and fixing any bugs, please send complete card information to totally-not-a-scam@nstvnsn.com. Thanks!
Jokes, of course. This is the first time I head of Luhn's algorithm, neato. Will do some reading of my own.
I have a suggestion, though, maybe revisit this point:
"starts from the last digit which is called the check digit. Then moving from left to right (immediately left of the check digit)"
Maybe it's just my brain, but those 2 sentences broke my brain trying to visualize what you mean!
Hi Nathan,
Thanks for taking the time to read my article, and your feedback! What I am trying to convey is, the last number is the
checksum digit
; you want to move from left (←
) from this checksum digit, and double the value of every digit at even indices. I apologize if that came across as confusing. Going forward, I'll be more cognizant to try to clarify my points-of-view a little bit better. Thanks again for your feedback!I found my source of confusion, I think 😅
If that arrow wasn't a mistype, that would be going from right to left.
But I definitely understand now, thanks!