Wednesday, December 28, 2011

The Luhny Bin Coding Challenge

Hans Peter Luhn
During my scarce free time I have decided to go through the recent coding challenge raised by Square which revolves around writing a log filter that masks any potential credit cards with placeholders such as XXXX-XXXX-XXXX-XXXX.

The neat thing about this coding challenge is that it's backed up by a test-suite which attempts several log patterns at your implementation. In order to satisfy them, you'll have to be careful in not missing any possible credit-card pattern.

The caught credit-card patterns need to be verified by the Luhn checksum as to whether they qualify as being credit-cards or not.

I have published my Java implementation which heavily relies on regular expressions for the detection of the possible credit card patterns, plus it's possible to further expand this implementation with further checksum algorithms as needed.

Go ahead, take your chance, fork their repository and get started !

No comments:

Post a Comment

What's your opinion on what I wrote here ?