Another my class has become a winner of PHP Classes Innovation Award – it’s the implementation of Binary Search algorithm. Yes, it’s the algorithm we all know from university – it’s strange for me, that it was considered as innovative.

I wrote this class as a test task while an interview for a new job. Results were so impressive for me, that I decided to share this piece of code: it finds result in 10Gb file for less than 5 seconds! File must contain key/value pairs (separator can be defined, by default it’s equal sign), and these pairs are sorted by keys. You define what key to search and get correspondent value very quickly.

For example:

Ann=5
Bob=3
Sandy=8
Zulu=1

If you search “Sandy”, you’ll get result “8″. Very quick :]

As a prize I selected an Apress book called “From Program to Product” – though I found it in PDF, it seems to be quite insightfull for me: we, developers, always think about code, and never about how to sell it. I have several product ideas, so I hope the book would help me to succeed.

P.S. Fun is that a few people emailed me to say how nice my new PHP Classes avatar is :] Thanks to Anton Dovgal for such a great picture of sad me.