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 !

Tuesday, December 27, 2011

How to choose the republic's president ?

Reading through Dr. Ragheb's book How to choose the republic's president ? I believe it's worth sharing to everyone such that the benefit spreads out. The book is a small one which should take from 1 to 2 hours to finish it for the average reader. The book is available at several local bookstores in Egypt, so it shouldn't be a problem to get hold of it (I got mine from Dar Al Salam).

The book's sole target is to educate people on how to choose a proper president for their republic, especially that Egyptians are approaching the presidential elections which they have been practically deprived from for the past 30 years.

Reading through the book, you will come up with the characteristics of a decent president to look for when the elections come around. Consider it as a proposal to what should constitute a proper president for our country. I believe the current period is a good chance to start building our opinions.