OnSwipe redirect code

Tuesday, June 26, 2007

IBM Internship -- The Prolouge

Internship @IBM - The first productive period of my Engg student life.
THE PROLOUGE
The title clearly states that till this internship I have not done anything productive. On the academic front it was bound to happen considering the way college was being run, the competence of the people who imparted knowledge and the way exams were conducted. Had I been dependent just on these things then probably all that I would have been is a book-worm. But thank god, there is this world of open-source software which saved me. Thanks to a few seniors, a few peers and partly also my ego, a fire to learn things beyond the books was kindled and I started "wasting" my time on things not present in our textbooks. But it was all learning, a one-way traffic. It was never reflected back in any achievement. Though I and my friend Ashwin Biyani came up with a paper, we both know what research (re-search) we did for that paper.
I do not know what held me from doing anything. It was my laziness or probably lack guidance. But neither of these are reasons worth mentioning. All that matters is the outcome and what can be present in "white and black" and there was no such thing in my case. We did have certain failed attempts though. After our 4th sem we stayed back in holidays and learnt HTML. Of course the plan was to further continue it and come up with a project which of course did not succeed. Then probably in 5th sem, we tried joining GNOME, Bangalore with projects like Mono or Evolution. Again that too failed. We did try to knock the doors of Novell but backed out later, just because of laziness and lack of josh and passion.
It was so until the middle of 6th sem. I was at our university hockey tournament at Tumkur (I guess it was Tumkur). At the end of first half of first day we had won our first match against PESIT and were to play our second match later that day. It was a little late in the evening and we were getting thoughts that we will not be playing our second match that day as the first round was still going on. Around this time I got know (I do not remember how, I did not have a cellphone with me back then) that the very next day IBM-ISL was visiting our college for offering internships. I was a little disappointed considering that I will have to travel and reach hostel that night and the very next morning I would be attending the test and hopefully the interview also. I hurried without informing all of my teammates. Kushal, the team captain, was pretty reluctant and tried retaining me for the rest of the tournament. He said "VTU Cup maga". I said "Nanna career Maga" and he said no more. (I now realize that I was absolutely correct about what I said. This internship did shape my career as a s/w engineer.)
When I reached hostel I could feel the heat of the next day's test by seeing all my able friends gummed tight to OO - related books, mainly C++ ones. (It was revealed by a senior interning at IBM that selectors would concentrate on OO concepts) There were few BOOs and WOOs when people saw me back, as I guess they were expecting me to miss this internship opportunity. I was a bit tired because of the game and the journey. But I had to hold the books and I did. I started with Herbert Schildt's C++ and I started to realize that there is so much in C++ that I do not know. But this attempt for last moment preparation was in vain as I was very sleepy. I do not remember much about that night, but I am sure I would have had a few discussions with friends, both technical and non-technical. I would have narrated the hockey match and finally when we realized we were wasting time, few punters would have gone back to books and I would have gone to sleep.(of course with some hope - which I always like to carry)

Tuesday, June 19, 2007

FULL SLOSH - The day I realized (visualized) it’s meaning.

There is a saying in Sanskrit which tells us about the heights of mischief or hyper-activity. It deals with a MONKEY being drunk and later bitten by a scorpion. Well first of all it’s a monkey and over that the two additional treatments would take the monkey totally out of control. There was a similar condition back at the hostel. Though the animal involved was not a monkey but a much more decent and a LOYAL one. [:P].

It was during our last days of the hostel and as expected people had a lot of reasons to booze and dEOp and do any such similar thing in the name of parties and have fun until they would get high and later either become sentimental(most of the times) or comical(very rarely and only a select few). The day I am talking is also a similar one. It was with the grace of one of the funniest guys around, Mr.PETU, that a new kind of party was organized. Actually there was no organization. The right resources were there along with the right consumers at the right place, at the right time. (What more is required for a grand party..? [:D] ).

The location was the area in front of the Gym. There were around 15 people probably. The resource was Imperial Blue (IB). There were two candidates who were comparatively new to the boozing world and were still semi-pro if not amateurs. They were done with KF and Romanov but never touched anything of the order of IB. This day obviously they were excited (I believe) as there was no other option and hence no reason for them to avoid it. These two punters were the two strong V's of our class (and also group) --- Viggu and Vikya - The LOYAL one. They were partner in crimes like boozing (right from KF to IB) and eating chicken (and other non-veg dishes of which I have no idea at all). This blog entry mainly revolves around one of these two characters, to be precise, the animal involved.[;)].

Almost all were there in front of the gym at the said time and were waiting for the few missing ones. In the mean time, as I needed to EAT, went in search for a food place with PJ(Civil) on Koli's bike. Unfortunately we had to move around a lot and finally landed at Manu's. The peak time crowd still delayed my default long food duration. Moreover we had a Kannan stop for a Mango. While waiting for that I saw Kolya with Kudva and messaged him to go to gym. And finally when we were back the melodrama had already started and unfortunately it was sentimental one(as laughing is always preferred to crying). The loyal one was all set and was crying in front of Kolya(who is very popular as an all time NON-FUNCTIONING partner for boozers, though recently he started getting high with a few drops of beer). And Viggy was speaking his heart out in front of SI. After a very short stop there I and PJ went to hostel to give Anya's parcel. And by the time we wanted to go back we had all the crowd coming back to get ready to go for food. Casino Park was chosen and many rode off. Kolya was struggling a bit with Vikya and asked me whether I would like. I agreed almost readily as I was interested in seeing what circus these HIGH people would do.

/******* FACTS **********/

Vikya and Viggu were heavily drunk, much beyond their capacities. This was only known later after we got back from the awesome road trip described below.

/****** END FACTS ******/

So me, Kolya and Vikya started and as per SIs instructions we went to Metropol. There when Kolya was refueling his vehicle Vikya delivered his first output. It was one big Omelet(or whatever you call it). It polluted a big area and I finally had to put a bucket of water as the petrol bunk guy insisted on it. Meanwhile Kolya got an Aquafina bottle and Vikya cleaned off a bit. Then after a short pause Vikya started the second round. But this time it was mere sound(VVVyyyyaaaaaaaaaaakkkkkkk) and at the end a spit. After a bit of this he was ready to go and when told to sit on the bike he said: "Aye L**de Activa myaale karkond honti matta?" (Well god only knows which bike this Mahaan Rider wanted!!!). Finally we started moving, with Vikya between me and Kolya. All through the journey I was afraid that Vikya would pluke again and I would be bathed in that. Luckily that did not happen. Vikya tactfully spat a couple of time and it did not come near me. (Thanks buddy for that CLEAN ride.. [:P]). We of course had some kireek at the gate, but Vikya's VVVyyyyaaaaaaaaaaakkkkkkk and Kaju's fast words cleared the way pretty early.

Back at the hostel we threw Vikya in front of L-Block just to give him some more time to clear of the crap within. He looked like a devdas. Kolya got his Dig cam and I took Kaju's cell and a lot of snaps were taken. (I hope they are still available and not been deleted because of fear of parents seeing it). Vikya made any more sounds but nothing came out. It was very clear that he had consumed far beyond his maximum limit. The way Vikya was acting was very funny for me and I tried to take pictures from all the possible angles. After some time we took him upstairs and made him sit in front of his room. He was so much out of control that he could hold himself up and sit. He repeatedly kept falling down. Then there was a bathroom trip also. Finally he was thrown on his bed. Now that loafer put out some more Omelet here INSIDE his room after all that mere sound outside. I started video recording at this point. We took him out. I do not know how but his pants started dropping and we could not pull them up and tighten. He was now lying in the pathway in front of his room, with an old shirt tied around his neck as a napkin, by Kolya and a sheet of paper shielding some more of his body and clothes. Here he looked like a pakka drunkard lying on the roadside besides some Gutter.

Almost at that moment SI and others returned from Casino Park and was a bit taken aback (I think so) to see his good old LOYAL one lying like this.

/******* FACTS **********/

1) All this time Mr. RamanaMurthy, the L4x puppy was besides Vikya. A friend in need is a friend indeed. [:D][:P]

2) Vikya was not aware of any of these kaarnaame.
/****** END FACTS ******/

Then SI suggested carrying him to the terrace and we did so. Got his bed there and put him in the cool breeze and he was totally switched off there. No more sounds, no more inside-crap and no more actions. That was the glorious end of the drunkard Vikya’s best booze day. It was a day worth remembering and hence this writing.

There was a parallel hungama going on at the Casino Park, involving Megastar Raghu Moms, and also earlier in front of Gym. Those are described in another entry. If this was interesting for you then check that out also. It was a different story there, more interesting in fact.

Tuesday, June 5, 2007

HACKING - What it is?

HACKING is probably one of the most used terms in the world of computer science and surely a word used with the wrong meaning to the highest extent. AFAIK at least 80% to 90% of the people using this word do not know the correct meaning of this. I hear my friends telling me
"Hey teach me hacking man, I want to purchase some damn thing from a online shopping website."

"Man I want to steal his password and block his account, so teach me hacking man."

At times I feel like banging on that person's head. But I can't really expect everyone to know the real meaning because this "stealing or breaking in" meaning has been so prominent and publicized by the media and speakers alike to such an extent that it has become the standard meaning. This is what i get from www.answers.com
hacking (′hak·iŋ)
(computer science) Use of a computer system without a specific, constructive purpose, or without proper authorization.

which of course is pure crap. Of course initially I too was of the same opinion. Thanks to the good folks of the open source world, I have understood the appropriate meaning of Hacking to a fairly good extent. Good enough to write a blog article about it.

I would define hacking as anything that can be called as "out of the box" thinking. Some of the greatest computer scientists are hackers. The inventors of the 'C' programming language, K&R, they are hackers. The inventor of the WWW - world wide web, Tim Berners Lee is a hacker. They all thought out of the box, did things which people did not percieve as feasible. If the great scientists of physics and chemistry came out with inventions, then their engineering counterparts, whom I would call "Hackers" came out with "Hacks". These were the hacks which revolutionized the computer world. So hacking is not breaking into some computer system illegally, but hacking to achieve things which people think are impossible with the current scheme of things.

A simplest example of hack would be improving one of your simplest C programs. Any minor tweak to an algorithm which would improve its time/space complexity would be hack. If you can reduce a few lines from a particular code and yet achieve the same results then that is a hack. In all these cases you are just improving the current system or the current scheme of things. Now that is hacking.

Of course if you like the word very much the any improvement that you make can be called as hack, but the "hack value" associated with that hack would be very small. And hacking is not just limited to the world of computer science. It extends to any branch of engneering or technology. Here are 2 examples from non computer science field which I came across in an awesome website www.hackaday.com (A must see for every person who has the remotest relation with technology and has a desire to learn)

Example 1: A electronic communication hack:

A person had hacked into the circuitry of his Motorola cell phone to interpret the text messages (SMS) that he received as commands and execute a corresponding action. He had attached an extra chip which would read the message and and send out appropriate commands to the attached devices. This whole set up was placed in his house with quite a few electronic and electrical attached to this, and all that he would do control these devices was to send a text message to his cell phone at home. The rest was taken care by the "hack"

Example 2: Even more away from computers - A mechanical hack:

We all are familiar about the flames coming from the exhaust of super bikes. They are indeed costly and not all of us can afford those, but nevertheless the flames are something we would surely like to have. Now this guy came up with an idea, or rather a hack, to get flames from the exhaust in any damn bike. He had added a particular liquid (a compound containing nitrogen) to the fuel. He then placed a spark plug in the exhaust pipe and synced its ignition with the main spark plug used in the ICE. The additional liquid would come out without being burnt and when passing through the exhaust pipe it would catch a spark and result in a flame. So even you travel at a speed of 20kmph you can have flames from the exhaust.

These examples will surely drive the meaning of hacking that I am trying to present here. On the contrary, this breaking into system illegally or stealing passwords and related things are termed as "Cracking". This also involves intelligence, but instead of making the current system more usable, these bank on the weakness and vulnerabilities of the current system and make them unsafe and less usable.

So people lets hack this world, just to make it a better world. Hacking is research and a hacking bent of mind is something to be cherished and respected. Hackers are scientists who can think new and innovate and hence improve the current technologies. So lets all become scientists.. err.. sorry.. "Hackers".

My GSoC 2007 Story

I always had this desire to do something big and noticeable in my life as an engineering student. Right from the day I was introduced to C programming I have enjoyed programming like anything and I was pretty sure that if at all I had to do that 'something big' it will be in terms of a major software project. This desire never actually got me to work on or do something. Meaning it never materialized. Around me, I saw many people(seniors and batch mates alike) who were pretty complacent. (There were indeed exceptions). So the desire gradually was subdued by fun, until 6th semester when a friend of mine, Ashwin(Setu), forced me into coming up with a technical paper. We did come up with one on search engines which was not really that technical and hence was not what I actually desired. Then almost at the same time a few people started asking me:
" Hey are you not participating in a coding competition called Google Summer of Code? Vikas GP(A very big open source freak and a real good coder - a big shot in the college)is doing that. He is getting a lot of money for that".

At that time I thought it was just another 2 days or 3 days contest for people with ultimate coding skills who can work out magic, because of which the money appeared inaccessible, and I did not even bother to find out what the program actually was. It was eventually forgotten.

Again in March 2007, few days before the mentoring organizations started registering for SoC 2007, a talk was organized by IBM on open source software, in which it was mentioned that some Google APIs are available out there on the net. I started checking it out at http://code.google.com/ and there I saw this link to Summer of Code and the last year's scenario instantly came back to me. So I started having a look at that as to what this program is all about. When I read the program details completely I was baffled at the magnitude of the program and its quality. (The $5000 really stunned me for some time). At that moment I decided that I need to get into this program and this will be the fulfillment of my long standing desire.

I started looking into various organizations where I can poke my nose and hope to get noticed and eventually be selected. There were very few avenues for me as my open source utilization was very less and  open sourcedevelopment experience was close to nil. The organizations that I shortlisted for me were:

1) KDE - I am big fan of that and I have been using only KDE (no GNOME) for a few years now.

The following because my internship at IBM dealt with these things.

2) Mozilla Foundation (MoFo)
3) Dojo Foundation
4) Eclipse

Of all these places, the only place where I knew a few developers and where I was also a little known was in the Mozilla Foundation and that was the strongest contender.

Then I talked to Vikas GP and told him about my plans to participate in this. He gave me this fantastic idea which he had used. The plan was to catch hold of a mentor outside the program realms and impress him with your idea/code, so that when the applications go for review, we will have already mentioned a mentor's name and that person will pitch in for us. If our mentor is well known and popular in the community then we will surely be selected. :). GP had done this by catching hold of a college senior, an identified GNU developer, whom he knew personally. Now there was only one guy whom I knew properly in the MoFo and that was Mook. Then again I did not have any ideas either and the ones listed on the brainstorming page of the Mozilla wiki were all Greek and Latin to me.

Still I started looking at the ideas proposed at the brainstorming page and there was an idea to implement metalink support for the Firefox Download Manager. I thought of taking it up. In that proposal I found a link to the Firefox feature request page. The list was obviously too long, and metalinks was also listed there. But two other things caught my attention (as I had felt a dire need for those):

1) Implementing download resume across different sessions
2) Reducing the memory consumption for Firefox.

I did not find any material for metalinks and memory reduction, but found a MDC page related to resumable downloads by a person named biesi. I read that and got a small idea as to what all things are involved in implementing resumable downloads.

With this I entered the #mozilla on irc.mozilla.org from where I was directed to #developers by one nice fellow. I put up this proposal of metalinks in #developers and got bad response. Only a couple of people replied and also told me that the actual person who had mentioned it was not known to them. I was surprised and so happy to see biesi amongst the people replying. I was like - "Oh man he is the author of that MDC page and here he is talking to me directly.."
Then with the metalinks idea failing to impress I proposed the download resume idea. This got some good response, but nobody was ready to mentor me. I was pestering biesi but he told me that he is not free and does not have time to mentor me. Then when I was searching for Mook or Mossop (whom I had pestered previously about extension development) amongst the nicknames, when dmose pinged me saying "brahamana, if you are going ahead with download resume then I can mentor you". I was only partly happy as I was not aware of the credibility and popularity of dmose (With all due regards my Master, now I do know), but at least I had someone who was interested in mentoring me. But I was still hoping for biesi, (he was the author of page on MDC man)

Then dmose asked me what were the requirements for a mentor and I told him that he needs to be a respected member of the mozilla developer community and at that point biesi told me that dmose suits that description very much. dmose then told me that he will talk to his boss, mconnor, The Firefox project lead. (Wow man..) I was taken aback. I was like, "Whom was I doubting??!!! This guy talks to Firefox project lead directly in person and he is speaking for me in front of him". I thought this was my Jackpot ;-). But again dmose told me that he still can't promise me anything and will have to find out with mconnor. Well that much was sufficient for me at that time and I was literally jumping in my room (It was around 4 a.m in the morning. Yes, as usual a night out).

Then the killer waiting period started. I pinged dmose the very next night(starting of the day for him). He told me that he has mentioned the idea to mconnor and he is awaiting his response. I was growing very impatient. The last date for submitting the application to google was approaching and there was no response or growth here. I was stuck with two options, submit the application without any reference and prior approval and compete with several others as a normal application or wait for the reply till the last moment and submit it with prior approval so that there will be no competition. But the problem with waiting was that last moment applications are given less value. So that was a risk again. Meanwhile I had read many blogs, previous year's applications and several articles on "How to write a proper SoC application" and even things on "How not to write an application" and "What the mentors actually look for in the application". So with all this gyan I had realized that application has to be sent quickly or it should have a solid reference.

I pinged dmose again few hours later and this time I pissed him off and got scolded. He told me to be a little patient and wait. I was afraid of screwing this up and hence did not bother him anymore. I just hung around at #developers and made my presence felt whenever dmose was active in some discussions. I was reading that MDC page again and again and trying figure out what those terms meant so that I can talk something sensible in the channel. In that course I had discovered quite a few resources and gained some know how on Mozilla and download resume feature. I got impatient again the next day and this time to be safe I emailed dmose. His reply seemed to be calm and I was positive that I am on the right track. He had written that there was no reply from mconnor yet. This process of hanging around at IRC for a major part of the day continued for another day also. Then 3 days after the initial proposal, when I was having a discussion with dmose, biesi and probably Gijs, dmose said this as a very matter of fact thing: "brahmana, BTW mconnor has agreed for the SoC idea and you can go ahead with the project". I was very happy and started immediately asking him what is to be done, so that I could start immediately and make my position still safer. He then asked me to send any of my previous projects so that he can have a look at my coding skills. I did not have any project expect for the two academic ones. The IBM internship carried a lot of weight but no code was available as it was a proprietary thing. But the code was essential for him. And for my bad luck I was not able to find my IDE for C on Linux project anywhere. The computer on which it was stored was formatted and it was gone. It was 7 a.m and I told dmose that the project is in a repository on the college server and that I will get it to him later. Luckily he agreed. Then I was checking my cd collections to find this project and instead found another project which I had submitted. It was 2D Graphics Editor, a paint brush kind of an application written in C. It was a very big one and also a good one, but the problem was that it was not entirely written by me. We(me and my project partner Vikas Patil) had flicked it from a senior. Since I had no other option I sent that one to dmose. I do not know what he actually thought. All that he told me was: "yes, its fine. But here at mozilla you will have to write a lot of comments". Well man, that was not a problem at all. And dmose confirmed my slot. (Thank you dmose very much).

And luckily google had extended the last date for application submission. I built up a nice application from various sources, put in Dan Mosedale (dmose) twice and in a prominent way and submitted it. I was a lot relieved and very happy that the desire is indeed going to be fulfilled and something solid will materialize.

UUUuUOOoooffff... That was one herculean task man and I finally did it.

I told GP and others that a MoCo employee has agreed to mentor me. I showed them Dan's name in about:credits and told them this is the guy who will be mentoring me. It was a matter of pride for me.

Then with Dan's name in the application I did not have any problem in getting selected. No questions asked, no comments. The only notification was when I was selected.

This whole experience was awesome.

Thank you Google for conducting this program.
Thank you Mozilla Community for the guidance.(and also fun)