Sunday, March 29, 2009

Resume parsing score

I found this on Web. Being a programmer, I found it funny, but quite true.

 Resume Chart


Thursday, March 26, 2009

Wordpress and Unicode

You type some non-English character in Wordpress or Drupal editors. You save it only to find those characters have become ????. If this describes your problem, then you have an issue with Unicode. You need to turn on Unicode support for Wordpress and Drupal. It will require some change of code. Basically, both Wordpress and Drupal supports Unicode. However, by default, the databases are not configured to store unicode characters.


For Wordpres, the modification is straight-forward.

  1. Open up ‘wp-config.php’ from the root directory of your WordPress installation.

  2. Comment out the following lines by adding ‘//’ at the very beginning of the following two lines:
    define('DB_CHARSET', 'utf8');
    define(’DB_COLLATE’, ”);

So that section should now look like this:
//define('DB_CHARSET', 'utf8');
//define(’DB_COLLATE’, ”);



For Drupal, the change is a bit more involved:

  1. Go to to the root directory of your Drupal installation.

  2. Save the following code in a file named collate_db.php

  3. <?php
    # Do not change anything below this ( :-) <- Rewwrite Editors note.)
    $connect_url = 'mysql://user:pwd@server/database';
    $active_db = db_connect($connect_url);
    $sql = 'SHOW TABLES';
    if ( !( $result = db_query( $sql ) ) ) {
    echo '<span >Get SHOW TABLE - SQL Error: ' . $result . '<br>' . "</span>\n";

    while ( $tables = db_fetch_array($result) ) {
    echo $tables[0];
    # Loop through all tables in this database
    $table = $tables[key($tables)];

    if ( !( $result2 = db_query("ALTER TABLE %s COLLATE utf8_general_ci", $table) ) ) {
    echo '<span >UTF SET - SQL Error: <br>' . "</span>\n";


    print "$table changed to UTF-8 successfully.<br>\n";

    # Now loop through all the fields within this table
    if ( !($result2 = db_query("SHOW COLUMNS FROM %s",$table) ) ) {
    echo '<span >Get Table Columns Query - SQL Error: <br>' . "</span>\n";


    while ( $column = db_fetch_array( $result2 ) )
    $field_name = $column['Field'];
    $field_type = $column['Type'];

    # Change text based fields
    $skipped_field_types = array('char', 'text', 'enum', 'set');

    foreach ( $skipped_field_types as $type )
    if ( strpos($field_type, $type) !== false )
    $sql4 = "ALTER TABLE $table CHANGE `$field_name` `$field_name` $field_type CHARACTER SET utf8 COLLATE utf8_bin";
    $result4 = db_query($sql4);

    echo "---- $field_name changed to UTF-8 successfully.<br>\n";
    echo "<hr>\n";

  4. Look at the red line in the code in red (5th line). You have to replace that part with your installation-specific information.

  5. Open the file sites/default/settings.php under the same Drupal root directory. Copy the rest of the line of
    $db_url =

    and paste it after
    $connect_url = 

    in the above code.

  6. Save collate_db.php

  7. Open a browser window and request the collate_db.php from your browser.

  8. If everything is fine you would see something similar to this:
    access changed to UTF-8 successfully.
    ---- mask changed to UTF-8 successfully.
    ---- type changed to UTF-8 successfully.

    <--- Lines not shown --->

    watchdog changed to UTF-8 successfully.
    ---- type changed to UTF-8 successfully.
    ---- message changed to UTF-8 successfully.
    ---- variables changed to UTF-8 successfully.
    ---- link changed to UTF-8 successfully.
    ---- location changed to UTF-8 successfully.
    ---- referer changed to UTF-8 successfully.
    ---- hostname changed to UTF-8 successfully.

  9. Delete collate_db.php for security.

You are done.

[Source: ]

Thursday, March 12, 2009


I cannot claim myself to be any expert on Baul songs. I have heard my share of Baul songs, mostly from radio. However, I have been fortunate to have two coincidences working for me in this respect. First, I like wrtings of Sudhir Chakrabarti. He was a professor of Bengali, but his passion was Bangla songs. Though he started writing rather late, he has been relentless in churning out articles since he started writing popular articles with seriousness. These articles are not just nonsensical pot-boilers. There are goods and bads, but none is insignificant. Sudhirbabu's other passion is Bengali Folk culture. I think I have painted the description of the passion with too broad a brush, but could not find a better description than this. He doesn't do it as a paid occupation. It's his labor of love. I don't know whether he follows the right research methodologies or not. But I could not care less. His research produced books like ব্রাত্য-লোকায়ত লালন (Bratyo Lokayoto Lalon), বাউল ফকির কথা (Baul Phakir Katha). Through these books and other writings of Sudhirbabu I got interested in the Baul way of life, and especially the Baul songs, though I learned that Baul songs are part of the Baul way of life. Without understanding or experiencing the Baul way of life one can neither appreciate nor fathom the Baul songs.

My other, and possibly bigger, influence for Baul songs is my friend Sudipto Chatterjee. Sudipto teaches and works in theater and performace stidues. But he picked up a penchant for Lalon Shah pretty early on. I remember the day when I first met him, about fifteen years ago, he boasted that he had already collected all Lalon songs. Only later I could understand his pride in that posession. He (and Theater director Sumon Mukhopadhyay) travelled to Kushthita, Lalon's birth and workplace, in Bangladesh in 1997. The materials they collected there, and since then, finally bore fruit in the form of a Perfomance called "The Man Of The Heart". A performance on Lalon's life and work, writtent and performed by Sudipto and directed by Sumon. I have heard numerous Lalon songs from Sudipto, along with stories, anecdotes and explanations. I heard about Panju Shah, Duddu Shah first through him. These, Sudhirbabu's books, gave me a better idea about the journey of Baul culture through history, both social and political. In most case, these two were intermingled intimately.

Later, thorugh a Bangla folk band called দোহার (Dohar), I first heard Abdul Karim's song. And I was bowled over immediately. Later I tried to dig up information from the web about Abdul Karim, who uses Baul Abdul Karim as his bhonita in some songs. There is not alot of information about him on the web, at least not as much to satisfy my curiosity. However, I came to know that he is still alive and well, though he is over 90 years of age. He still writes songs. But he has already become an institution in Bangladesh. I could not figure out whether he leads a strict Baul life. But that does not matter to me at his point. You can check out some of his songs in Youtube by searching on his name.