Re:Luhn Algorithm for validating credit cards
by mdaniel on Thursday July 02, 2015 @11:57PM
(#9823363)
To implement it or describe what it's for?
[ Parent
| on HN ]
I was asked to implement it on a whiteboard for a developer gig at an ad agency in like 2009. I thought it seemed disproportionately hard compared to what the job was likely to require.
Re:Luhn Algorithm for validating credit cards
by InclinedPlane on Friday July 03, 2015 @02:46AM
(#9823921)
Really? It seems like a trivial programming exercise to me.
Re:Luhn Algorithm for validating credit cards
by cbd1984 on Friday July 03, 2015 @05:30AM
(#9824478)
It's trivial if you are told what the algorithm is. If you're expected to randomly remember it perfectly and implement it that way, it's hard.
Re:Luhn Algorithm for validating credit cards
by InclinedPlane on Friday July 03, 2015 @07:12PM
(#9828407)
Certainly. That's a very poor interview process.
Re:Luhn Algorithm for validating credit cards
by jarcane on Friday July 03, 2015 @03:38AM
(#9824097)
I've actually done it myself for fun in Haskell; it's one of the CodeWars challenges.
Re:Luhn Algorithm for validating credit cards
by justinzollars on Friday July 03, 2015 @02:42AM
(#9823910)
implement in both cases, after a clear definition.