Showing posts with label Random Rants. Show all posts
Showing posts with label Random Rants. Show all posts

Sunday, March 16, 2008

Driver, where you taking us ?

Its a special day for me, my birthday :) ... nothing much happened today except I was able to pray in the famous Dakshineshwar temple here in Kolkata, after a long, slow walk from outside the temple premises to inside. It was a surprise for me as I had expected it to be an easy-going affair, I would be done in about half an hour, I had thought ... it took more than 2 hours, which I am thankful for, as it could have been more.

So, here I am, 26 years of my life complete today and I am in a strange state. I feel happy, I feel sad, I feel confused, hopeful and sometimes I feel blank. It seems that this has been triggered because of my thoughtful, introspective mood that I entered yesterday night. There are so many things I have thought about since. Family, friends, studies, career ... And each of these topics makes me feel a lot of things as I have said earlier ... happy, sad, confused, hopeful, blank.

I am not however, going to discuss (most of) my thoughts here. I rather thought of writing out some of the thoughts that I have for my blog though :)

Well, this is a summary of what I think I would do with my blog this year :
1) I feel like I need to write more articles that are geek-ish ;) ... what I mean to say is that, I want to write more articles that are not of a philosophical/intellectual mode ... I would like to put more concrete articles this year.
2) I would like to put a lot of small math posts that would be relatively easier for people to grasp and fun too.
3) As for programming, I would like to pick specific language features from those I know and discuss what I know and maybe that could help some new people ... maybe also invite the wrath of experts :D ... but I am ready for that, that's the way to grow !
4) Put more material on data structures as used in Linux, material on Linux scheduler and Linux memory management.
5) Some algorithms that are beautiful and less-known.
6) Cryptography - Posts introducing readers to basics of cryptography, encryption schemes, some practical and wonderful aspects of cryptography.

Hope, I can do justice to this list this year. Happy blogging to all of you and happy birthday to me ;-)

Tuesday, March 11, 2008

A whining post

Missed February 2008 in my blogging career, busy with exams and other stuff. I have three to four topics on which I would love to write something as soon as possible. However, it looks like even March is going to be unsparing. So, with not much time at hand, I thought of writing a post where I would list many of my recent dislikes (it feels so good to criticize ;) ... and hence I call this a whining post :)

Well, here they are in no particular order or importance :

1) Indian cricket team has created history in Australia with their sensational 2-0 thrashing of Australia in the triangular series finals. Moreover, they won the historic test in Perth which had become a holy grail of sorts for the Australians. And, the fact that India did this was even more breathtaking. The sad part is India could have won the test series also, had it not been some 'obnoxious umpiring' in the Sydney test. What irritates me now is the attitude of Indian media and some Indian fans. There are still a lot of people who dismiss Indian victory as fluke ... c'mon now, what do you want ? Indian team came back after a major mental setback in the Sydney test to beat Australia, in nowhere else but Perth ! isn't that awesome ? Beating world champs in ODI versions 2-0 in triangular series finals emphasized the domination of Australia by India. The drama by Indian media is sickening, ridiculous, irritating, over-hyped, emotionally exploiting and what not ... the post-victory shows on leading news channels like Aaj Tak and Star News was senseless. They were blowing things out of proportion, I mean let the team relax, don't play with the sentiments of people for your ratings ... these same channels will not leave a stone unturned the next time Dhoni and gang fail ... the way they projected the clash between Harbhajan and Symonds, Hayden was shameful ... yes, Australians are bad losers but you got to be sensible with national broadcasts. The Indian media looks to me like a bunch of a**holes who flush the ethics with their shit.

2) I love Ubuntu, this is the most satisfying Linux distro I've laid my hands upon (well, definitely some people won't agree but that's ok with me, you got your reasons to stick with your distro, have fun). However, there are somethings I would like to be improved. Firstly, and I am talking about Ubuntu 7.04, why is the shutdown so ugly ? On Windows XP, the application windows get closed one by one in a clean manner, the shutdown on Ubuntu is like a mad rush to wipe out the window graphics from the screen (you get white rectangles all overlapping, some colours too and then suddenly to the black screen, the sound is broken and sometimes there is no sound !). I have done a bit of searching and come across some links that I am not sure are talking about the same problem ... I would post about this if I can get it fixed. Secondly, why isn't there a group by name or group by type option in the Nautilus window manager in GNOME (even KDE doesn't have it) ... this is a comparison to Windows XP but that feature helps to make the folder view look more organized.

3) There's this hand gesture that I see all the time when I am at some rock band show (be it in Bangalore or Kolkata) that really irritates me. A lot of young people do it, this is done basically by closing your two fingers just before the little finger along with the thumb, so that the index and little finger are pointing forward ... it's meant to show your appreciation to the band, but I intuitively feel that most of these people are bullshitting, they don't even understand the music. I am not a big guru of music but I would rather stay calm and clap when I have enjoyed some good music from the band ... it makes more sense because you are more likely to be awed and happy by a good/excellent performance rather than 'yo man'ing the performance ;) ... and I find more support for my theory because you can find these people behaving in the same fashion over a crap performance.

4) The obsession of newspapers and media with politics and celebrities is disgusting ... what do millions of people who are working hard for their meals every day care about Britney Spears' baldness, Paris Hilton's exploits or Kareena-Saif romance ? Go to hell ... I wish there would be a lightning some day that would crack on each of these media people and these narcissistic celebrities who occupy unnecessary attention.

I feel like I would spit out a lot more whining if I continue ... so I am cutting it short now and switching to work.

Wednesday, December 12, 2007

On Happyness and Generators of Groups

It usually happens to me. There are days when all I can think about is completing the work at hand or about my course of action for coming days. So I just keep on reading stuff, finishing assignments, preparing for exams, working on some of my ideas, dreaming and day-dreaming about rosy career-prospects ;-) ... and then somewhere in the middle of it, I realize as if I am trying to run as fast as I can without enjoying what the 'present' has to offer to me. It doesn't look very good and then I try to take a sort of small break and as a result some funny ideas come to my mind. So, this is a recollection of one of the recent such moments I had.

I was trying to learn some functional programming few minutes before this break that I mentioned. I pondered over the reason of why I wanted to learn functional programming. I answered, "because that would make me a better programmer". Okay, but why do I want to be a better programmer ? I answered, "because I love programming and it's really cool to know that you have learned something important, you have enhanced your skill, you have a wider perspective". Fine, but then I questioned, why does it matter really that I have gained a broader vision about programming a solution to a problem. To cut the chase, it finally dawned on me that the reason was "Happyness" (yes, that spelling is borrowed from the movie). Moreover, it dawned on me that in fact, Happyness was the answer if you started to ask questions and reduce your pursuits to some fundamental reason. I am very sure on this that everyone of us can apply this method of reasoning to themselves and the answer will inevitably turn out to be Happyness. It may be studying maths, working hard on your tennis games, practicing new moves in chess, staying late at office to finish some task ;-) ... whatever.

Well, that's half the story. A remarkable characteristic of human mind is that it's working is strongly based on patterns and it learns a lot through drawing analogies. Surprisingly, a strange analogy struck me in regards to the above mentioned stream of thought. Let me now bring you to the topic of groups and generators which will help you understand my crazy analogy.

Algebra is a beautiful subject indeed. It represents an example of what the mainstream mathematics of today looks like, which is, abstract. Yes, modern mathematics is hugely abstract in nature. It may surprise some people as mostly it is thought to be involving calculations. In fact, this was the scene a few centuries back. However, over the course of time, the emphasis has moved from computing to understanding, which brings in abstractness. Don't misinterpret me in that there was no understanding involved in mathematics a few centuries back. It's just that mathematics then was mostly used as a tool to calculate answers to problems, mostly physics-related. What happened that mathematicians studied some related problems and then in the process of study, refined their results more and more to some basic essentials, which became the abstract theories of mathematics we have today. In Algebra, we study mainly algebraic systems (such as groups, rings, fields), which simply put are, a set of objects together with some operations for combining them.

Which brings us to Groups. Now, I am not going to bomb you with heavy mathematical definitions. I will try to explain to you in as much a layman-style as possible. Consider the set Z11={1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. Now, we will add an operation to this set ... it's multiplication (and you thought it was going to be some Lebesgue integral over the norms of the p-adic variation of this group !). Yes, plain old multiplication but with a little twist, it's called multiplication modulo 11 (in general modulo n). This is nothing complicated, all you have to do is that whenever you multiply any two numbers in the set Z11, you take the remainder of product divided by 11 as your result. For example, 2 x 6 = 1, because you take the remainder of 12 divided by 11. Similarly, 3 x 5 = 4, 4 x 7 = 3 and so on. Guess what? We have a group at our hands and it is the pair (Z11, multiplication modulo 11). Technically, there are some other properties this pair needs to satisfy to be called a group but, I won't be going into those and you can believe me here in that this pair is indeed a group.

So, with the group at our hands, it's time to look at the element 2 in the set Z11. 2 here has a special property as does the group Z11. I am going to denote power operation by ^. Observe now. 2^0=1, 2^1=2, 2^2=4, 2^3=8, 2^4=5 (not 16, remember we divide the result of multiplication by 11), 2^5=10, 2^6=9, 2^7=7, 2^8=3, 2^9=6, and 2^10=1 again. What we have here is that a single element (2 here) generates the whole set when the operation is applied to it repeatedly. The power thing is actually 2 being multiplied with itself again and again. Thus, 2 is special and it is called the generator of the group (Z11 itself is special since it is an example of groups that have generators, many groups don't ... in fact put any prime in the place of 11, say p, and you will see that 2 is a generator of Zp).

Okay, let me get to my crazy idea that I was going to talk to you after all. Probably you might have already got it or a feeling of what it is. To kill all the hyped suspense, the idea is:

Happyness is the generator of the "group" formed over the pursuits or actions in our life.

Crappy, isn't it ? Yeah, sorry to bother you all along but let me give some reasons as to why I think so. First, you can see the strong analogy between the questioning process I mentioned and the generation of group by a generator. What I mean to say is that, each of your actions fundamentally derives from the a desire to be happy. Hence, happyness when applied to itself through an operation (that I am not very clear about) generates all your other desires, actions and pursuits. Secondly, sometimes you find that at some stage of your questioning you may have more than one reason/answer for your question. This can also be explained in the analogy if you observe that 4^2=5, 4^3=9, 4^4=3. So 4 also generates some elements but not the whole group (try it, you will know why, it's not tough). It is 2 that generates the whole group. So is it with Happyness, it is the "fundamental" generator, or in other words, the generator of the (whole) group.

Now, you may pose a valid question ... if we consider one person's desire/actions to be a group and do the same for another person, is it the case that the happyness element that they both have in their groups are the same ? I mean to say that whether when you feel happy and I feel happy (when the happyness element is expressed), is it the same feeling ? Well, I should say that analogies when carried too far or stretched too much, usually break. So, I am doubtful if this one holds. On a different note, this question is a very important one in Algebra, as it is basically the question of two groups being isomorphic (and I don't have the time to explain that here, maybe some other post :-)

"This person has gone nuts!" ... must be the thought coming to your mind, so let me say goodbye and thanks for reading.

Monday, December 10, 2007

I didn't do it, Lord screwed me !

/* crap.c */
#include "screwed.h"

int main(void) {

/* At last it's over. I am really relieved. I had my Compilers final today. It was really terrible, I have messed it up really badly, but you know what, Lord Screwed Me ;-) ... How ? Here's how :

1) Lord has not given me the strength to wake up and attend classes, especially, those that take place at 9:00 am, which was the case with Compilers class. (additional weakness: sleeping at 3:00 am)
2) Lord has not given me the strength to stay awake and focus in classes as demanding as Compilers, I dozed off half the time in those lectures.
3) Lord has not given me the wisdom to go through such tough material at least once a week so that I can feel comfortable with the concepts. I really have to wait for the finals to come for my recovery action to get started.
4) Lord has not given me the wisdom to utilize a gap of two days before the tough final, so that I can still do it better than what I did, in fact could have been much better.
5) Lord, aaaaaarrrghh ... has not given me the HUGE WISDOM to pick up question papers from the past few years and try to solve them at least. Even that would have helped me a lot.

I am such a helpless guy ! ... Lord is a big, hidden sniper who enjoys playing "Shoot the Kid" game with me ;-) ... */

return SCREWED; /* haha */
}

You must have got the story by now. So, lame excuses aside, the real point of writing this post is that I wanted to communicate to you something I have realized in the past couple of days. Compilers is a very interesting, important paper and every computer science student should try to understand it as good as they can. Not convinced ? Steve Yegge's post might give you an idea. Personally, I have read the dragon book on Compilers (Compilers: Principles, Techniques and Tools - Aho, Sethi, Ullman) in the past couple of days and I must say it's been challenging, stimulating and enlightening. It's definitely not easy but it isn't meant to be, it's not Java ;-) ... I have made a resolve: To keep on reading the book and improve my understanding of Compilers.

Tell you what, I DIDN'T DO IT, LORD SCREWED ME ! ... haha :-)