Today I discovered neat PHP extension named Gender: http://www.php.net/manual/en/book.gender.php. It determines gender based on name and country. Probably below code will be useful on some point of your software development career :-)