12 June 2013

SVN Merge: List Unmerged Revision Command

One disadvantage of RabbitVCS as compared to TortoiseSVN is that with RabbitVCS you cannot see which revisions have been and have not been merged.

A nice command that I found that can do the job is:

svn mergeinfo ^/calc/branches/development  --show-revs eligible

It will just list the revisions that are not merged yet. It is a nice command that you can use in case you want to merge a branch to trunk for example.

24 April 2013

MSc and BSc Projects

I've decided to open source my academic projects which I've done at BSc and MSc levels, which you can find below.

MSc: Internet Technology and Web Development

My MSc project was titled "Context-Aware Searching for Mobile Devices" and it is about finding affinities between users on Facebook and afterwards suggest products that might interest one user depending on his close friends products usage.

The Document: http://goo.gl/TC8W0
FacebookApp: https://apps.facebook.com/spotfinder/
Code for App: https://github.com/kervin/spotfinder
Android App: https://github.com/kervin/myspotfinder

BSc: Computer Science and Engineering

My BSc Project, which I co-authored, was titled "Suspend Behavior Recognition" and it is a program that, using a webcam, monitors activities at ATMs to sound an Alarm in case there is a suspension of theft or vandalism.

The Document: http://goo.gl/cpm3J

You can also find my CV online: http://goo.gl/jgZX9

12 November 2012

Fuel Consumption Conversion for Mauritius

Fuel Consumption Conversion for Mauritius

09 November 2012

Building Attribute Group Tree

Each product has a defined attribute set in Magento and which is set on creation of the product. Attribute sets consists of a number of attribute groups which in turn has a number of attributes.

Normally that is used only in admin, but I got a request to classify the attributes like that in a grid on frontend, which was a bit tricky. Below is the solution that I came up to.

$retValue = array();

/* @var $product Mage_Catalog_Model_Product  */
$product = Mage::getModel('catalog/product')->load(3224);

// Get the attribute set of the product
$attributeSetId = $product->getAttributeSetId();

// Get the attribute groups associated to the attribute set
$attributeGroups = Mage::getResourceModel('eav/entity_attribute_group_collection')

// Get the attributes of each group
foreach ($attributeGroups as $value) {
    $group['title'] = $value->getAttributeGroupName();

    $attributes = $product->getAttributes($value->getId());

    $attributeVal = array();

    foreach ($attributes as $attribute) {
        $att['title'] = $attribute->getFrontEndLabel();
        $attributeCode = $attribute->getAttributeCode();

        $data = $product->getData($attributeCode);
        if (!empty($data['values'])) {
            $attributeVal = $product->getAttributeText($attributeCode);

        if (!empty($attributeVal)) {
            $att['value'] = $attributeVal;
            $group['value'][] = $att;

        $retValue[] = $group;

echo '<pre>';
echo '</pre>';