My article about the queues

development, php, php classes Comments Off on My article about the queues

I wrote an article how queues can speed up your application and make your users happier.

Queues are everywhere. When you delete a photo on your iPhone, it goes to the Bin and will be deleted from there after 30 days. That is a queue. Without it you will not be able to recover a picture removed by mistake.

Read the full article here.

Quick CSV import with visual mapping

development, php, php classes 156 Comments »

Several years ago I created PHP class Quick_CSV_Import to import CSV files to a database table very quickly (LOAD DATA INFILE statement). I found that the class became quite popular in India due to feedback received :]

Now I want to share a little application on the basis of that class.

Quick CSV Import with Mapping” is a PHP example application that imports CSV file to a database table with visual mapping of CSV columns to table columns.

CSV Mapping Master - click to download

Of course, you can get a copy of the application source – just go to the SVN repository.

Don’t forget to send me your feedback and donations ;]

P.S. If you are having problems with going to step 2 while using the app, try the following:

  1. Open Quick_CSV_import.class and find “LOAD DATA INFILE
  2. change it to “LOAD DATA LOCAL INFILE

It’s connected with permissions at your Linux server. Thanks to Noel for the solution.

Using PHPClasses.org for marketing purposes

ideas, marketing, php, php classes 2 Comments »

Once upon a time I took a look at my Google Analytics account and found out that phpclasses.org is 5th source medium for two my blogs (this one and my russian blog).

I have 8 classes submitted. Calculation shows that 7% of my blogs visitors are my classes downloaders and viewers for all the time my classes and blogs exist, and 11% – for last week.

Take into account, that

  • I get these people to me without any move – I have just placed the links once.
  • in-bound links improve Google PageRank
  • count of links is limited only by your imagination ;]

To check that all my classes have all needed links in “Related links” section, I wrote a PHP script that adds a link if it’s not present on your class page. It was written fast so there not so much error checks; to use it, just

  1. type your login/pass,
  2. list IDs of your classes and
  3. define the list of links to be placed in “Related links” section of every class page.

Script supports more than one login/pass pair. If such link is already present, it will be skipped. CURL is required for your PHP server.

You can download it and use for free.

Another PHPClasses victory

php, php classes Comments Off on Another PHPClasses victory

September 2008 WinnerAnother 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.

Phonetic won!

development, php, php classes 5 Comments »

winner1.gif align=Yes, my class Phonetic won the first place of the PHPClasses Innovation Award.

Thanks to everyone voted for me!

You can check a demo here.

Vote for Phonetic class

development, php, php classes 1 Comment »

My PHP class Phonetic is nominated on phpclasses.org Innovation Award.

Vote for it!

The class generates words that phonetically are equal to the given one, but are written differently.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in