Tuesday, July 27, 2010

All humans have the same intelligence

From a talk by Noam Chomsky : All humans have the same intelligence, it is known for example that if one took a child from Amazon tribals and raised the child in Cambridge, the child will soon be doing quantum physics in MIT. Apparently the converse is also true. This means that there is not much difference in the intelligence between people, it is only a question of how one gets brought up.

Misquotes

It was only a short while ago that there was a firing from the Obama govt. on the basis of a misquote. Another instance of it has appeared again : It can be found here.

I wonder why people misquote. With internet, it is so much easier to bring the truth to light, especially if the original version was made on a public platform. Dont they realize that they will lose their credibility when the real thing comes out? Are they doing this out of a habit thats hard to get rid of? Does this mean the people have been misquoting for a long time and that it is only coming out to the general public now?

Friday, July 23, 2010

Neetha's corollary to Sapir Whorf hypothesis.

My corollary to the Sapir Whorf Hypothesis posted here :

If you cannot articulate a particular concept, you dont understand the concept well enough.

Saturday, July 17, 2010

Connecting music and memories..

Ever noticed how some pieces of music simply bring back memories of certain places and people? It happens with me, all the time.... I am not a big music person, and I sort of like only one type of music. But whether or not I like the music, it always makes memory associations for me.

When I was growing up, my mother used to listen a lot to Abba.. She likes to listen to them while she cooks... and she almost always has it on while baking on Christmas eve. Years later, when I went away to hostel, simply listening to Abba would make me miss home and remember long forgotten events. While in IIT, perhaps the music I listened to the most was  from Deep Forest. Now when I listen to Deep Forest, the first image that comes to mind is my hostel room... Similarly, Metallica, or in fact any kind of rock music makes me remember my brother. Sometimes it brings back Saarang. And there are other pieces that bring back friends.

Isnt it wonderful, how the mind works? Exploring memories and remembering things with little effort, based on music suggestions... wonder why people havent thought of using this in teaching. I mean, will I ever be able to recite off Wurtz reaction just because I associated a particular musical piece with it?

Wednesday, July 7, 2010

Shopaphobic

I once happened to listen to someone extol the virtues of Morton Williams - she went on and on about how she loved walking through the aisles, how show loved looking at all the different things that were available, and about how she could stay in that shop for hours on end.

I loathe going to Morton Williams. And ShopRite. Or any other big shop with no one on the aisle to help out the poor shopper. I find it impossible to manage to locate all the things I need in a reasonable amount of time - I go with a list of things I need, never waste time looking at things I dont have on my list and it still takes me at least an hour and a half to get the stuff I need and walk out. Trust me, my lists are usually not very long. The time goes in locating the precise thing that I want to buy. I consider that a huge waste of time, and so cannot stop hating big shops.

It wasnt so bad when I was in India.. back home, when you shop, all you do is run to the little grocery store next to you and ask the guy there to find the stuff you need. All I had to do was tell him what I needed, and all the things I wanted appeared magically. If I said "sugar - 1 kg", he would take 1 kilo of sugar and pack it right in front of me. If I said "oats", he would automatically pick up the brand that I usually bought, because he knew which one I liked. It was all so simple...

After coming here, things have been nightmarish. It started with me looking for oats - I wanted plain oats. I went to the Mortan Williams store near us, and found the aisle with "breakfast cereal" written on it. Once there, however, things were hard. There was everything imaginable in that aisle, except what I wanted. I started out with a random search, looking on either side for anything with "oats" written on it. I found grits, "breakfast cereal", " granola", and God knows what else on that aisle. Each of these had at least 10 different flavors. And at least three different companies. And I was still to find oats. Finally I realized that random search wasnt working here, and decided to go sequential - I scanned the aisle from one side to the other. And finally found oats - but oh.. I found oats that already had maple syrup and apples in it, or brown sugar and cinnamon and some other stuff like that. I wanted plain oats, and that was nowhere in sight. I looked at every single packet that was near these packets of oats, thinking I might miss the only packet of plain oats if I didnt look carefully enough. After about a minute I realized I was still applying random search, on the packets that were arranged from the top of the shelf to the bottom. I decided on a sequential search again, and finally found the oats packet on the bottommost rack, almost hidden out of sight. The whole process took 15 minutes. Just to find plain rolled oats.

I have more such stories - about the time I went to buy spring roll pastry from shop rite - this time, I asked one of the people in the store if they could help me locate it. The poor guy came with me and searched, to no avail. I spent about 20 minutes searching, before deciding that if I didnt find the stuff in the next 10 minutes, I would stop searching. I finally went home without it. Another time, I wanted something for a fever, and was advised to buy Tylenol. when I went to the pharmacy, I found at least 10 different types of tylenols - AM, PM, pain relief, cold relief, for sore throat, for adults, for children, large packets, small packets... nothing however said anything about "fever". Imagine how irritating this is when you are running a fever and all you want to do is just get that damn pill and walk out the store. Finally I took the cold relief one. (It cost me $9.75 and didnt reduce my fever). It took another trip to the pharmacy, and some advil tablets to reduce my fever.

I have had a story similar to this each time I went to a new store. I think the primary problem is that there are too many choices here. Someone who is not familiar will end up making choices they didnt want to. Unfortunately, it appears that this is exactly what is intended, at least by some types of packaging.

I now avoid visiting new stores. I know the location of the things I need in certain shops, and those are the only shops I go to. The only items I am willing to experiment with are veggies. At least carrots dont come in ten different flavors, and they dont package radish to make it look like carrots. Not yet, at least. Thank God.

Update (26th July) : I just watched a talk on TED by Sheena Iyengar where she talks about choices and how people from a country where there are not too many choices and are thus not used to so many of them will find too many choices overwhelming. I suppose thats exactly what I have been going through. The talk can be watched here. What I liked best was how she named the grocery stores : "MonstroMart".

Wednesday, June 23, 2010

Applying Systems knowledge to Biology.

I worked as a Systems dev at Microsoft for a while.. There were many lessons to learn there - about software in general, and large systems in particular. I realized today that some of the knowledge can be applied to systems in general. This is a post on that...

Most of the software we know today involves a lot of code. Sometimes it is millions of lines of code. Needless to say, no one person can understand the entire thing. Thats natural, since our human brain can only handle a fixed set of things at a time. And that number is definitely not a million. So what is done is that a number of people work on these problems, and each person understands what he or she does and tries to enhance and modify that module. It is however important that the person modifying this piece of code has at least a basic understanding of all the ways in which whatever she is changing can affect other parts of the system. And that is hard, given the size of the problems we work on.

Now consider what happens when a new dev starts to work on such a system. They have possibly never worked with a new system their entire life (being fresh out of college). Most often they are therefore asked to fix bugs. Often, they end up making various mistakes while fixing the bug, and sometimes end up generating more bugs than what they really fix. The basic problem here is that they dont understand the system. Most bugs require change in less than 10 lines of code. However, what looks easy initially is so difficult, because one has to make sure that the changes to these 10 lines of code is not causing anything unexpected for the every other line of code in the system. (Sometimes in a well understood and modular system, your 10 lines of code will not really affect all the other lines... but the point is, your system has to be well understood for you to be able to say that there is really no effect.) This is hard to do, and most often, the effect is that new devs start introducing bugs while developing.

Microsoft (as do most other companies) has a stringent code review process in place, wherein every single change that is made to the system is monitored by someone who understands the system as well as the implications of the changes made to the code.

Now that the premise is set, it is time to come to my main argument. Earth is a very large biological system. Our knowledge of it is mostly basic, since we only understand how each part works separately, and have only just begun to understand how all the parts work together. We are just making baby steps with genetic engineering, and I think it is reasonable to say that we are new devs in that area. We definitely dont understand the entire system (having only recently sequenced the entire human genome). But despite this lack of understanding, we are tweaking the system in little ways here and there. And from my knowledge of systems, there is only one result for such kind of tweaking without full understanding - bugs. And worse sometimes - build breaks.

What I am saying is that our knowledge of genetic engineering is still too nascent for us to apply it to anything that really matters. Before a software company releases a product, they subject the product to a huge slew of tests. And that is not always random testing, there are analyzers that specifically look at every line of code that has gone into production to see if there are problems that can be caused once it is deployed. If one were to employ the same strategy for genetic engineering, there would have to be tests that checked what the effects of their modification was - long term. Considering the size of the biological system, and because effects take much longer to manifest, this would mean a very long period of testing.

However, we are already mass producing genetically modified crops and selling it to the masses, without looking at the implications it can have on the entire system. Each lab that works on these is independently modifying the system, without considering what the effects of its modification might be. There is no central authority who understands and can certify that the proposed change will not cause a problem to the system (code review). In all, we are sort of blindly modifying a very large and somewhat delicate system without understanding what we are doing. And my hunch is that this strategy is going to cause some serious problems (bugs) which are going to surface perhaps ten or twenty or perhaps even a hundred years later.

Extending the analogy:

One can extend the analogy further. A large software system usually has small parts that largely decide the most basic functions of the system. This "heart" will be what most of the rest of the system will be built on, and  changing the heart is risky, because it is going to affect the entire behavior of the system. For example, the kernel in an operating system forms a kind of "heart" of the operating system. Thus making even small changes in the kernel code can cause drastic changes in the OS, resulting in effects ranging from a kernel that cannot boot to something that shuts down mysteriously. All of that happens when one does not understand what one is doing. (At Columbia, there is a course on OS which requires that we make changes to the kernel. And that is reputedly the toughest course in the CS dept. most likely because it is hard to understand the effects that changing this piece of code has on the system.

Here is the argument on genetics : Genes control everything, apparently. We understand that much. Thus genes sort of form the heart of the biological system. So essentially,  with genetic engineering, what we are trying to do is modify kernel code for the biological system without understanding it. And the effects of this is going to be much larger than anything we tried earlier, because earlier, we had not started kernel hacking.

Now... does that give you a lot of confidence about eating genetically modified food stuffs?

An algorithm for mess allocation.

Applied algorithms for a very real world problem : 



Report on new Mess Allocation Algorithm:

The two objectives of the algorithm are

•  Efficiency
    To ensure that maximum number of people get their desired choices

•  Equality
    So that over time, the maximum regret of any individual is minimized

The Algorithm

The algorithm tries to make sure that maximum people get their first choices.
However in case of tie algorithm gives preference to those who register
first.Among those who are left out (from getting their first choice), we try
to allocate the second choices to the maximum number again. The step is
repeated for the third, and fourth choices too. If any (at all) are still
left, they are randomly allocated.

How It Works

The algorithm has six rounds.

In the first round, allocation is done for a student only if his first choice
is available. For each caterer, students who opted for that caterer as their
first choice is allocated to the respective mess, as long as the number
allocated to a mess does not exceed its capacity.

If the number of students who opted for a particular mess as their first
choice exceeds the capacity of the mess, the students with higher regrets are
given more priority. Among students having equal regrets, the time of
registration is given priority.

In the second round, the same procedure is repeated. Only this time, we
concider the second choices of those students who have not been allocated in
the first round. A student gets allocated to a mess only if his second choice
is available. Students are prioritized in the decreasing order or regrets, and
based on time of registration among students having equal regrets.

Similar, third choices of those who remain unallocated are concidered in the
third round, and fourth choices of those who remain unallocated are concidered
in the fourth round.

If any student who registered for mess did not get allocated in the first four
rounds, he is randomly allocated to a mess in the fifth round. Students who
did not regsiter for mess are allocated randomly in the sixth round.

System Of Regrets ( Subject to change for next month )

Each student has a value called regret stored against him/her in the database.
This value is a measure of how much disappointed he/she would be by the
allocation.
Initially (in the first month of allocation), the regrets of all students will
be zero.

If a student is allotted to the mess of his first choice, + 0 is added to his
regret
If a student is allotted to the mess of her second choice, + 1 is added to his
regret
If a student is allotted to the mess of his third choice, + 2 is added to his
regret
If a student is allotted to the mess of his first choice, + 3 is added to his
regret

For those dining in Himalaya, if a student does not get any mess of his choice
(if he gets randomly allotted to a mess even after registering as none of his
4 choices were available), +4 is added to his regret.

The regrets of each student keep on accumulating every month. Now, higher the
regret of a student, the more he is disappointed. To ensure equality, a
student with higher regret is given priority over a student with lower regret
during allocation.


Conclusion

The new algorithm is found to be much more efficient that the one presently
being used which is solely based on first come - first serve principle.

>  Maximum number of students gets their first choice. Among those remaining,
it attempts to maximize the number that gets second, third, and fourth choices
too (if any).

>  The regrets of students over time are balanced in an optimal way
Regards

{ New Mess Allocation Algorithm:
Developed by Hareesh R, Institute Web Operations Core 2009 – 2010 }