Daily life

We have won a programming challenge

I am extremely happy to inform that we (Avani Lodhaya and me) have won the programming challenge organized by an NGO –  Wise Earth Technologies. Its only due to Amma’s grace and the guidance of Bithin Alangot that we were able to complete the challenge (of course! winning requires a special bragging rights) within time even though we have started working on it just 2 weeks before the deadline. We will receive a cash prize of 1000 Euros for our contribution which I will be handing over to Bithin for his living expenses as he is moving to USA (we worked on the project only for humanitarian purpose and boosting our resume). We have developed Crisis Communicator, an open source disaster management communication information system. The system consists of mobile communication stations, running on cheap open source hardware (Raspberry Pi connected to a 5 inch TFT display), supported by a web application that uses the Django web framework. In order to guarantee the peaceful use of this application, while ensuring that the military can use it for rescue operations during disasters, the system is released under the Peaceful Open Source License. The expected cost of the device will come around $50 – $100 per communication station, enabling its large scale deployment in disaster hit areas. The Crisis Communicator allows the rescue volunteers to connect to other volunteers using APRS (which has no ground infrastructure unlike other communication means like GPRS, 3G, CDMA etc) to obtain live updates about refugees, refugee camps, resource availability, condition of the roads, missing and deceased persons. All the features of the crisis communicator are embedded with the offline OpenStreetMap enabling its use on smart phones or PCs and the response team can add situational awareness and updates by simply tapping on the phone or simple mouse clicks. The application is capable of detecting the positions of the other volunteers using Global Positioning System. A complete user manual of the application can be found here. Here’s the link to the announcement of the winner in the organization’s website.

Below is a screenshot of the application

Below are the news articles published in local news papers (Indian Express and Kerala Kaumadi):



Semaphore vs Mutex

As a part of my Operating System course, my professor asked me to find out the differences between Semaphore and Mutex. First of all let me show you how a Semaphore and Mutex works using a toilet example:


Is a key to a toilet. One person can have the key – occupy the toilet – at the time. When finished, the person gives (frees) the key to the next person in the queue.

Mutexes are typically used to serialise access to a section of re-entrant code that cannot be executed concurrently by more than one thread. A mutex object only allows one thread into a controlled section, forcing other threads which attempt to gain access to that section to wait until the first thread has exited from that section.


Is the number of free identical toilet keys.  Example, say we have four toilets with identical locks and keys. The semaphore count – the count of keys – is set to 4 at beginning (all four toilets are free), then the count value is decremented as people are coming in. If all toilets are full, ie. there are no free keys left, the semaphore count is 0. Now, when  one person leaves the toilet, semaphore is increased to 1 (one free key), and given to the next person in the queue.

A semaphore restricts the number of simultaneous users of a shared resource up to a maximum number. Threads can request access to the resource (decrementing the semaphore), and can signal that they have finished using the resource (incrementing the semaphore).

PS: A mutex is really a semaphore with value 1.

These are some other important differences between semaphore and Mutex:

  1. A semaphore can be a Mutex but a Mutex can never be semaphore. This simply means that a binary semaphore can be used as Mutex, but a Mutex can never exhibit the functionality of semaphore.
  2. Both semaphores and Mutex (at least the on latest kernel) are non-recursive in nature.
  3. No one owns semaphores, whereas Mutex are owned and the owner is held responsible for them. This is an important distinction from a debugging perspective.
  4. In case the of Mutex, the thread that owns the Mutex is responsible for freeing it. However, in the case of semaphores, this condition is not required. Any other thread can signal to free the semaphore by using the sem_post()function.
  5. A Mutex, by definition, is used to serialize access to a section of re-entrant code that cannot be executed concurrently by more than one thread. A semaphore, by definition, restricts the number of simultaneous users of a shared resource up to a maximum number
  6. Another difference that would matter to developers is that semaphores are system-wide and remain in the form of files on the filesystem, unless otherwise cleaned up. Mutex are process-wide and get cleaned up automatically when a process exits.
  7. The nature of semaphores makes it possible to use them in synchronizing related and unrelated process, as well as between threads. Mutex can be used only in synchronizing between threads and at most between related processes (the pthread implementation of the latest kernel comes with a feature that allows Mutex to be used between related process).
  8. According to the kernel documentation, Mutex are lighter when compared to semaphores. What this means is that a program with semaphore usage has a higher memory footprint when compared to a program having Mutex.
  9. From a usage perspective, Mutex has simpler semantics when compared to semaphores.

Host your project in a public repository

As a part of my SoK project. I have had to host my project in a public repository. I went through several tutorials and Wiki pages, but i was not able to get a complete, compact and precise solution to start off. Bit-bucket is a web-based hosting service for projects that use the Mercurial revision control system. Mercurials major design goals include high performance and scalability, decentralized, fully distributed collaborative development, robust handling of both plan text and binary files, and advanced branching and merging capabilities, while remaining conceptually simple. I’ve used Debian based operating system – Kubuntu. The first step is to install Mercurial. This can be achieved by:

sudo apt-get install mercurial

Your next step is to get a Bit-bucket account. In order to add a repository you have to click to the + sign or you can add from + Create Repository, under the ‘Repository’ menu.

Using vim/gedit/kate or any other text editor. Open a file ~/.hgrc

vim ~/.hgrc

Add these line into .hgrc which is ‘newly’ created.

Mercurial is built with the intent that you will share your work with others, and as you create new branches it adds comments and your name and email to each change. If you don’t specify this information, it will use the login account name and your computer’s DNS name to auto-generate an email address which will likely be wrong.

Make sure that the email address you use is the same one that you configure for your public Bit-bucket account.

Specifying your name and email is done by adding these lines to the file named “.hgrc” in your home directory:

; editor used to enter commit logs, etc. Most text editors will work.
username = Firstname Lastname

An Example:

; editor used to enter commit logs, etc. Most text editors will work.
editor = vim
username = seshagiri prabhu

I prefer vim. You can give any other text editor.

Using your basic UNIX skills reach at your project’s root folder in your local machine and clone your Bit-bucket repository.


For example:

hg clone https://seshagiriprabhu@bitbucket.org/seshagiriprabhu/collage

Add files to the repository using hg add YOUR_FILENAME

When you add a file will open up in your preferred text editor. Then save it, each time when you do hg add

Commit the changes to your local machine using

hg commit -m "YOUR MESSAGE"

Unless you specify a message in the commit you may not be able to push it to your Bitbucket repository.
The last step is to push it to YOUR_REPOSITORY in Bitbucket using this command.


Each time when you push/pull, the system will ask you Bit-Bucket password.

The Sacred Act of Eating: A Hindu Foodie’s Daily Ritual, a post by Deepa S Iyer

In my great grandmother’s house in Thanjavur, a small town in Tamil Nadu, every meal represented an elaborate ritual. Each night, she washed a fresh set of clothes for the next morning (always a colorful nine yards sari and its blouse) and hung them atop the highest clothing line on the balcony, to prevent anyone from inadvertently dirtying them. The following morning, she rose at 4:00 AM, while the rest of the house still slumbered, and took a bath to cleanse before cooking. Prior to touching any ingredients, she prayed, sitting in the main hall beside a faded wall covered with frame after frame of Hindu iconography. Only then would she start to prepare the meal.

When we sat down to eat, in a cross-legged row on the floor across from the prayer wall, the meal itself was systematic. First, someone laid plantain leaves, used as (biodegradable!) plates in rural South India, on the cleaned floor. Then, the men recited Sanskrit prayers, pouring a little water into their right palms and circling their palm leaves with it to signify cleansing the mind and heart before approaching the food. Somebody took a little food and left it outside for the crows — a ritual called “kaka shadham”, or “crows’ rice”, in Tamil, to return part of the food to nature. Normally, I was designated as the crow feeder.

After all this, the meal would commence with a clatter of sounds, colors, textures, and tastes. We ate deftly, using our right hands to gracefully sweep food across the plantain leaf into our mouths. When the last morsel disappeared, several family members would say aloud “Annadatha Sukibhava,” an old Sankrit saying meaning “May the ones providing this food be happy and healthy.” The customs, and the food, contributed to a celebration of community and utter deliciousness.

Today, I try to think of my food in this context. I love how truly delicious food can engage all five senses at once. Ripe, bright vegetables, their lush skins just begging to be chopped. The smell of spices — cumin, turmeric, saffron, coriander, mint — dancing lightly across the air. The inquisitive tang of my grandmother’s freshly churned butter. Crispy, warm pain au chocolate, or the sweet, slightly acidic tenor of fresh mango sorbet.

I could play with adjectives to describe food for hours. In fact, I’ve developed this skill as a mental hobby over the years when confronting boredom. Instead of suffering through an especially apathetic meeting on retirement options, I take refuge in quietly devising fragrant soups, towering sandwiches and mountain ranges of ice cream topped with Maraschino cherries. I confess: I love to eat. There’s a reason why Pixar’s “Ratatouille” is my favorite film.

For me, eating is not just about sating a hungry stomach. It’s about taking the time to prepare a varied meal and presenting it in an aesthetically pleasing way. I always eat sitting down, and try to eat unhurriedly, really tasting each bite. It’s a way to ground myself in the evenings after work: a near-meditative experience. After a long day, I’m eager to come home, kick off my shoes, and dedicate evenings to achieving deliciousness.

Food wasn’t always such a spiritual experience for me. As a child, I ate to live — a finicky eater in a very food-oriented Indian American family. I resorted to craftily concocting various ruses, like spreading leftovers around my plate to make it look sparser, gathering food in a corner of the plate to rest invisibly under my hand, and shifting food onto my father’s plate when he wasn’t looking.

Hindu culture has an extensive culinary theology that ascribes ritual and mystical importance to food. Food is a manifestation of Brahman, the supreme energy motivating the universe. “Food is God,” my mother would tell me, as I pushed curry moodily around my plate as a child. At the time, I couldn’t relate: eating quickly was a ticket to getting outside.

Although I didn’t revel in food, I always loved the rituals. They made meals more interesting for a child who would rather be playing with friends on the block. Though we lived in America, my mother still sent me outside to leave a little rice in the backyard for the crows.

Hindu scriptures point to three forces that influence food’s nutrition: pathra shuddhi, the cleanliness of the cooking vessels, paka shuddhi, the chef’s cleanliness and mental attitude, and pachaka shuddhi, the quality of ingredients. Because “you are what you eat,” Hindus believe that these three shuddhis, or purities, directly transfer to the eater.

Hindu traditions also place importance on the eater’s experience. A Sanskrit saying from the Taittreya Upanishad — “Annam Brahmeti Vyajanat” — summarizes several scriptures on the topic. A mystic, meditating on his food, notices a subtle life force permeating the entire cosmos.

The practical message? Eat like it’s your last meal, and be thoroughly aware of every bite. In Hindu culture, eating is a ritual: a sacrifice to the Supreme, unified by the recognition that process (cooking), object (food), and individual are all inextricably connected.

Eventually, once I left home, I learned to appreciate good food a lot more. Coming across scrumptious vegetarian food in cafeterias was rare: the food tended to be boiled until it died. I became a real foodie when I started cooking for myself. Today, creating a new dish after a long workday, I feel a connection to my (now deceased) great grandmother, who also viewed cooking as a daily ritual.

I’ve noticed that we tend to collectively push the seemingly mundane tasks that are critical to survival, like eating, into the background. For many, food is a steady, often mechanized habit. Yet, it has a depth that cannot be ignored. The next time you see something yummy, turn it into your own ritual: sit down, dig in, and enjoy every bite.

An ample letter to Rahul Gandhi by an IIT’ian

Dear Rahul,
But don’t be disappointed, I would give you ample reasons to feel
ashamed… You really want to feel Ashamed..?

* First Ask Pranav Mukherjee, Why isn’t he giving the details of the account holders in the Swiss Banks.
* Ask your Mother, Who is impeding the Investigation against Hasan Ali?
* Ask her, Who got 60% Kickbacks in the 2G Scam ?
* Kalamadi is accused of a Few hundred Crores, Who Pocketed the Rest in the Common Wealth Games?
* Ask Praful Patel what he did to the Indian Airlines? Why did Air India let go of the Profitable Routes ?
* Why should the Tax Payer pay for the Air India losses, when you intend to eventually DIVEST IT ANYWAY!!!
* Also, You People can’t run an Airline Properly. How can we expect you to run the Nation?
* Ask Manmohan Singh. Why/What kept him quiet for so long?
* Are Kalmadi and A Raja are Scapegoats to save Big Names like Harshad Mehta was in the 1992 Stock Market Scandal ?
* Who let the BHOPAL GAS TRAGEDY Accused go Scot Free? (20,000 People died in that Tragedy)
* Who ordered the State Sponsored Massacre of SIKHS in 84?
* Please read more about, How Indira Gandhi pushed the NationUnder Emergency in 76-77, after the HC declared her election to Lok Sabha Void!

Dear Rahul, to refresh your memory, you were arrested/detained by the FBI the BOSTON Airport in September 2001. You were carrying with you $1,60,000 in Cash. You couldn’t explain why
you were carrying so much Cash.
(Incidentally He was with his Columbian girlfriend Veronique Cartelli, ALLEGEDLY, the Daughter of Drug Mafia. 9 HOURS he was kept at the Airport. Later then freed on the intervention of the then Prime Minister Mr. Vajpayee.. FBI filed an equivalent of an FIR in US and released him. When FBI was asked to divulge the information, by Right/Freedom to Information Activists about the reasons Rahul was arrested … FBI asked for a NO OBJECTION CERTIFICATE from Rahul Gandhi. So Subramaniyam Swami wrote a Letter to Rahul Gandhi, ” If you have
NOTHING to HIDE, Give us the Permission” HE NEVER REPLIED!)
Why did that arrest not make Headlines Rahul? You could have gone to the Media and told, “I am ashamed to call myself an INDIAN?”. Or is it that, you only do like to highlight Symbolic Arrests (like in UP) and not Actual Arrests (In BOSTON)
Kindly Clarify…..In any case, you want to feel ashamed, Read Along… YOUR MOTHER’S SO CALLED SACRIFICE OF GIVING UP PRIME MINISTERSHIP in
According to a Provision in the Citizenship Act, A Foreign National who becomes a Citizen of India, is bounded by the same restrictions, which an Indian would face, If he/she were to become a Citizen of Italy. (Condition based on principle of reciprocity) Now Since you can’t become a PM in Italy, Unless you are born there. Likewise an Italian Citizen can’t become Indian PM, unless He/She is not born here!
Dr. SUBRAMANIYAM SWAMI (The Man who Exposed the 2G Scam) sent a letter to the PRESIDENT OF INDIA bringing the same to his Notice. PRESIDENT OF INDIA sent a letter to Sonia Gandhi to this effect, 3:30 PM, May 17th, 2004. Swearing Ceremony was scheduled for 5 PM the same Day. Manmohan Singh was brought in the Picture at the last moment to Save Face!! Rest of the SACRIFICE DRAMA which she choreographed was an EYE WASH!!! In fact Sonia Gandhi had sent, 340 letters, each signed by different MP to the PRESIDENT KALAM, supporting her candidacy for PM. One of those letters read, “I Sonia Gandhi, elected Member from Rai Bareli, hereby propose Sonia Gandhi as Prime Minister. “So SHE was Pretty INTERESTED! Until She came to know the Facts! She didn’t make any Sacrifice, It so happens that SONIA GANDHI couldn’t have become the PM of INDIA that time.
You could be Ashamed about that Dear Rahul!! One Credential Sonia G had, Even that was a HOAX! THINK ABOUT YOURSELF. You go to Harvard on Donation Quota. ( Hindujas Gave HARVARD 11 million dollars the same year, when Rajiv Gandhi was in Power) Then you are expelled in 3 Months/ You Dropped out in 3 Months…. (Sadly Manmohan Singh wasn’t the Dean of Harvard that time, else you might have had a chance… Too Bad, there is only one Manmohan Singh!)
Then Why did you go about lying about being Masters in Economics from Harvard .. before finally taking it off your Resume upon questioning by Dr. SUBRAMANIYAM SWAMI (The Gentlemen who exposed the 2G Scam) At St. Stephens.. You Fail the Hindi Exam. Hindi Exam!!! And you are representing the Biggest Hindi Speaking State of the Country?
Sonia G gave a sworn affidavit as a Candidate that She Studied English at University of Cambridge According to Cambridge University, there is no such Student EVER! Upon a Case by Dr. Subramaniyam Swami filed against her, She subsequently Dropped the CAMBRIDGE CREDENTIAL from her Affidavit. Sonia Gandhi didn’t even pass High School. She is just 5th class Pass! In this sense, She shares a common Educational Background with her 2G Partner In Crime, Karunanidhi. You Fake your Educational Degree, Your Mother Fakes her Educational Degree. And then you go out saying, ” We want Educated Youth into Politics!” WHY LIE ABOUT EDUCATIONAL CREDENTIALS? Not that Education is a Prerequisite for being a great Leader, but then you shouldn’t have lied about your qualifications! You could feel a little ashamed about Lying about your Educational
Qualifications. You had your reasons I know, Because in India, WE RESPECT EDUCATION!
But who cares about Education, When you are a Youth Icon!!
You traveled in the Local Train for the first time at the Age of 38. You went to some Villages as a part of Election Campaign. And You won a
Youth Icon!! … That’s why You are my Youth Icon. For 25 Million People travel by Train Every day. You are the First Person to win a Youth Icon for boarding a Train. Thousands of Postmen go to remotest of Villages. None of them have yet gotten a Youth Icon. You were neither YOUNG Nor ICONIC! Still You became a Youth Icon beating Iconic and Younger Contenders like RAHUL DRAVID. SURNAME Shakespeare said, What’s in a Name?
Little did he knew, It’s all in the Name, Especially the Surname! Speaking of Surname, Sir DO YOU REALLY RESPECT GANDHI, OR IS IT JUST TO CASH IN ON THE GOODWILL OF MAHATMA? Because the Name on your Passport is RAUL VINCI. Not RAHUL GANDHI.. May be if you wrote your Surname as Gandhi, you would have experienced, what Gandhi feels like, LITERALLY ( Pun Intended) You People don’t seem to use Gandhi much, except when you are fighting Elections. ( There it makes complete sense). Imagine fighting elections by the Name Raul Vinci…
You use the name GANDHI at will and then say, ” Mujhe yeh YUVRAJ shabd Insulting lagta hai! Kyonki aaj Hindustan mein Democracy hai, aur is
shabd ka koi matlab nahin hai! YUVRAJ, Itna hi Insulting lagta hai, to lad lo RAUL VINCI ke Naam se!!! Jin Kisano ke saath photo khinchate ho woh bhi isliye entertain karte hain ki GANDHI ho.. RAUL VINCI bol ke Jao… Ghar mein nahin ghusaenge!!!
You could feel ashamed for your Double Standards. YOUTH INTO POLITICS. Now You want Youth to Join Politics. I say First you Join Politics. Because you haven’t Joined Politics. You
have Joined a Family Business.
First you Join Politics. Win an Election fighting as RAUL VINCI and Not Rahul Gandhi, then come and ask the youth and the Educated Brass for
more involvement in Politics. Also till then, Please don’t give me examples of Sachin Pilot and Milind
Deora and Naveen Jindal as youth who have joined Politics. They are not Politicians. They Just happen to be Politicians. Much Like Abhishek Bachchan and other Star Sons are not Actors. They just happen to be Actors (For Obvious Reasons) So, We would appreciate if you stop requesting the Youth to Join Politics till you establish your credentials… WHY WE CAN’T JOIN POLITICS! Rahul Baba, Please understand, Your Father had a lot of money in your Family account ( in Swiss Bank) when he died. Ordinary Youth has to WORK FOR A LIVING. YOUR FAMILY just needs to NETWORK FOR A LIVING If our Father had left thousands of Crores with us, We might consider doing the same. But we have to Work. Not just for ourselves. But also for you. So that we can pay 30% of our Income to the Govt. which can then be channelized to the Swiss Banks and your Personal Accounts under some Pseudo Names. So Rahul, Please don’t mind If the Youth doesn’t Join Politics. We are doing our best to fund your Election Campaigns and your Chopper Trips to the Villages. Somebody has to Earn the Money that Politicians Feed On. NO WONDER YOU ARE NOT GANDHIs. YOU ARE SO CALLED GANDHIs!! Air India, KG Gas Division, 2G, CWG, SWISS BANK Account Details… Hasan Ali, KGB., FBI Arrest..
You want to feel ashamed..?
Feel Ashamed for what the First Family of Politics has been reduced to… A Money Laundering Enterprise. NO WONDER YOU ARE NOT GANDHI’S BY BLOOD. GANDHI is an adopted Name. For Indira didn’t marry Mahatma Gandhi’s Son. For even if you had one GENE OF GANDHI JI in your DNA. YOU WOULDN’T HAVE BEEN PLAGUED BY SUCH ‘POVERTY OF AMBITION'(Ambition of only EARNING MONEY)
You really want to feel Ashamed?
Feel Ashamed for what you ‘ SO CALLED GANDHI’S’ have done to MAHATMA’S Legacy.. I so wish GANDHI JI had Copyrighted his Name! Meanwhile, I would request Sonia Gandhi to change her name to $ONIA GANDHI, and you could replace The ‘R’ in RAHUL/RAUL by the New Rupee Symbol!!!
RAUL VINCI : I am ashamed to call myself an Indian. Even we are ashamed to call you so! P.S: Popular Media is either bought or blackmailed, controlled to Manufacture Consent! My Guess is Social Media is still a Democratic Platform. (Now they are trying to put legislations to censor that too!!). Meanwhile, Let’s ask these questions, for we deserve some Answers.

B. Tech, IIT Bombay

World Cocunut Day

Tomorrow is being observed as World Coconut Day as part of the steps to focus global attention on the importance of the coconut. It is the founding day of the international agency, the Asian Pacific Coconut Community, the headquarters of which is in Jakarta in Indonesia that is being observed as the Coconut Day. The slogan of the year relates to the protection of nutrition provided by the coconut. As the slogan implies, steps will be taken to popularize the benefits of the coconut and coconut products.