Sunday, May 27, 2007

Human Computation

There are several cases where humans excel computers at computation. This is harnessed in Luis von Ahn's work on Human computation.

http://video.google.com/videoplay?docid=-8246463980976635143

If you want to see a demo, you can see here: http://images.google.com/imagelabeler/

I now see that some other implementation of the same thing, which is much more interesting and pragmatic:
http://bmaurer.blogspot.com/2007/05/recaptcha-new-way-to-fight-spam.html

Interesting indeed.

Friday, May 18, 2007

Save Trees - Creative Advertisement

A very creative advertisement that I saw at MG Road, Bangalore.
It tells that "No one ever attained enlightenment under a lamp post, Please plant trees. -WWF".



Thursday, May 03, 2007

Letter Writing

From,
xxxxx,
xxxxx,
place - zipcode.

To,
The Inspector,
Some Police Station,
Place - ZipCode.

Respected Sir/Madam,
Sub: Request to find lost bicycle - lost on 3rd May 2007.

I bought a new bicycle from (The proof of the same is attached to the letter). I lost it on 3rd May 2007, morning. On 2nd May 2007, I locked my bicycle at the basement. It was last sighted by Mr.XXX at around 11 PM on 2nd May. On 3rd May morning, when I came to the basement to start my cycle, it was not there. The watchman has no clue of anyone having come to the building after 11 PM, nor he says he heard any sound of someone opening the gates. The details of my bicycle are below:
  1. Detail 1
  2. Detail 2
  3. Detail 3
I kindly request you to find my bicycle. I m having a tough time commuting without it. I would be very grateful to you for the same.

Thanking you.
Yours Truly,
Varun.

====================
How was the letter writing exercise?
Sadly my "lost bicycle " letter writing skills seems to have some use now. :(

Monday, April 16, 2007

what Math and life have in common

I recently (around an year) saw a quote which said , life is like PI (3.141592654), Real but irrational. Recently I saw another contender for a similar quote :), but this time its PI and the imaginary number (i) who are fighting with each other.

The link is here
http://www.mightywombat.com/toons/numbers.gif

if you are lazy visiting the link, here is the pic:





Friday, March 02, 2007

Debugging AJAX and HTTP Requests for Web Applications

You have an AJAX based or just plain old HTTP based Web Application. You want to see some way to know what transpired between the Server and your web client. There are several reasons to know this,
  • first in that case you can avoid printing lot of Logs in your server thus less burden on your server.
  • Another reason is quicker Code-Debug cycle, its lot more easier to finish off all the test/pick logs/correct in one system..and the deploy your code in server.
  • You really want to know if your request reached the server, what parameters you sent in your GET/POST query, what other HTTP headers you sent along (such as session Id/cookie info) in addition to whatever you want to know, such as when is the Content Expiration date..
  • You plainly have no idea what the application you have taken responsibility does, you want to know what URL your application launches, what it does, and use the URL to continue to debug, so that you can quickly reach the spot where your HTTP request hits the server and what process/whatever is called from there...
There are several tools that you can do.. with increased efficiency and productivity. All of the tools mentioned below are Free and mostly Open Source (Free!=Open Source)..

Lemme start from the most lame ones to the more specific ones and tell you which could be a good one..
1. Ethereal -http://www.ethereal.com/
Ethereal is more a network Packet capturing tool, however, it can be used to capture HTTP traffic alone. In the filter option choose the HTTP as the protocol. If you know which URL/port your client calls, it can make things more specific. Once you get the result, you start scratching your head about how you comprehend the packets that have been captured. You need to select all the packets captured and then choose the HTTP Response Data option (donno where its , but basically it appends the packets in sequence (even if they are out of sequence) to get the response data as a stream that you can copy somewhere and continue debugging). This is a good option, but over time, you will understand that, you need to have all your other applications that use HTTP to be out of the capturing system (by setting proper filter mechanism) or close all applications that use HTTP. Also, that makes things slow, because I assume Ethereal patches the actual TCP stack files in your system and would painfully process every packet coming to your system (or sent from your system), then apply the packet filter and then show in the window it has.
Time to grow up for a better tool


2. IE HTTP Headers and its clone in Firefox called LiveHTTP Headers: www.blunck.info/iehttpheaders.html & livehttpheaders.mozdev.org/

They basically sniff whatever traffic is sent from or sent to/from your browser. IEHTTPHeaders has a distinction for HTTP and HTTPS with colors and you can choose the colors. That way its a good tool. What its bad at is that, it contest with McAfee Virus Scan for the same API when sniffing Browser traffic and can cause your IE to crash randomly sometimes and usually when you exit IE (you will forget when you last closed IE without a crash)...
Live HTTP Headers seem to be good, I haven't had issues with that, but neither have I worked in a great deal with it to certify that it doesn't have problems. Both IE HTTP Headers have questions when a request comes early but its HTTP response is late and between that time window, some other smaller request is answered. There is no intuitive way to know that. Atleast in Live HTTP Headers, it seems to be better with a horizontal line. Its tough in IEHTTPHeaders.

Overall comment is: Well, this looks cool , better than just sniffing logs... but this too can be overwhelming at times, when you have quick several requests... Also I have seen Firefox Freeze (run at 100% for a long time ) a few times and I cudnt pin point on LiveHTTPHeaders, so I leave that to you to decide.

Time to pick a better one..

3. This was called Firebug. http://www.getfirebug.com

Its a Firefox plugn. It helps people to know whats the status of the curretn request(same as previous ones). But the best part starts when you have too many requests from the server, it can show the time frame window in it (for the requests for /from the client in server which could be concurrent or that 2 of them are waiting.. something will happen that way....This one shows the Firebug Sniffer logs only for the browser window its associated with. Hence, that way its quite useful. The more interesting ones are that can see how much time a particular request has taken. Also this gives you a picture of whats happening in client at any point of time..It also shows a DOM tree, you can use that to run through the DOM for the page, which is an effective tool for debugging fro the server for the web clients.

and quite a few other options. You can quite obviously see that I m interested more about the third one(Firebug). One bad thing is that its not available for IE. but the better part is that its available in Firefox... IE has a similar tool, but not as good as this (its more matured one, but at the same time, its kind of either missing or .. Its called IE developer toolbar. I see that it has the best options such as resolution, clearing cache for a particular domain etc. But its not a matured product, in which case, its wise to think 2wice before you used it(with occasional internet explorer crash event for free).

I will paste screen shot as and when I find time...

PS: I wrote this in half sleep towards end, if you find any mistakes do comment and let me know, I will change that

Tuesday, February 20, 2007

Random Snaps

Evening Sunset



Typical Bangalore Gully



Temple and mosque.

Monday, February 19, 2007

Not my post: Bangalore Mail and Dreadful Journeys!!

The text below is copy pasted from a fwd mail I received from Priyadarshni of my class. The original writer apparently is "Kartik". I was unable to find his actual blog, in spite of my googling it out.. If anyone can provide the actual link, it would be really really great.. this whole post is so so so close to what I m experiencing in terms of "Bangalore Mail" :-)

< start copy >
First thigs first.. I owe a big apology to all those ppl who have taken some time from their busy schedules , read my blogs and had commented "don make it too personal..". coz this onez the final bit of personal stuff i have with me.. and without this i won be doing any justice to my blog theme (banglore mail) at all.. Read on..
So there was yet another "S/w Engineer in the m(oc)aking" at banglore and it was none other than meee!! Initial days at office were all perfect and just like what i had always dreamt off. Days passed in a jiffy and i had made quite a number of pals by then. At last training ended and along with it our fundoo times too..It was show time then, we had to pack our bags an move on to projects... A bunch of us were interviewed by a PM and were successfully 'hardlocked' to a proj. Now for ppl who wonder whatz all this hardlock is abt.. Its yet another jargon used in this IT industry with which the PM'S glue u on to a seat in the project and make sure u are no more visible to the HR (an that expands to Highly Ridiculous), who usually are in dire straits looking for resources and are so desperate that they start locking evrybudy,be it the floor warden or the bay sweeper,never mind!!
Right then, First day at project and i realised that my dreams of becoming a "hardcore developer" were shaken up a bit and had underwent a li'l transformation by then. It now read "Hardware Keeper" .. That waz what the jobz nature, precisely was.. "AM GONNNA BE A SYS ADMIN, DEALING WITH HARDWARE !!!" Whoa.. Doesn it sound great, if not atleast for the first spell out!!!
What was more gloomy was i had persuaded my mates too, to take up this new assignment, citing that "this is going to be a gr8 challenge. We will get a lot of learning opportunities.. we'll hve helluva development work..blah blah" .. Poor ones , they had got convinced by tat speech , which usually a PM manages to give everytime, during indcution of rookies into proj and they do listen agaped and of course thrilled..

So a bunch of clowns aka sys admins were brain washed and were trained to become effective sys admins !!! To make situations more worser we were scoffed and ridiculed by some (not all, though) experienced ppl who were already present there .. Tougher times were those and some hom we managed to grit them out all with a steely resolve..

Days rolled on , we had slowly accustomed ourselves to the new environment and we were no more 'rookies'.. Boy, we did almost everything that even a few senior guys didnt try. Sooner those ppl who were laughing at us earlier and made a farce, now termed our bunch as "the backbone of the operation".. Its really funny when u realise how pplz perception change as time does..

So i was really engrossed during the weekdays and it was the weekends that put me down. Since i wasn living with anybody, weekends were damn boring , to say the least !! Just had the TV for my company plus the 4 walls.....After spending a few morose weekends there at bang , i finally took a decision. "I am not gonna stay here for the weekends, watever be the case.".. . Thats where it all started. I began to frequent the banglore mail and weekend speicalz , sparing those odd weekends where in i was bugged by my TL who forced to come for weekend works (crap !!)..

U won blv me , i wud have spent almost all my sal for weekend travelz.... Friday night was the best that i cud ever get and the sunday nightz were the worst.. Coming home on sat morning , freak out with friends, taste ur home food , meet all ur college pals , continue all those late night phone talks ..all these became a routine , rather !! On the contrary the sunday nigthz killed me..There were times when i really din wanna go back so much that, i used to check NDTV & headlines today constantly, hoping to hear something like "Rains lash banglore.. all trains leaving from chennai to bang cancelled indefinitely.." ....

But since we don dwell in a fairy land, where all ur dreams come true.. i'd pack my bags at snail pace and with not even the slightest of a smile , i wud leave for the station.. Through out the way i'll just be cribbing and dreaming of a transfer.. More agony would be waiting for me there at the station where i'd bump on a romantic pair who wud really be excited, unlike me, to travel together.. I'll let out a big sigh (what else can i do !!) and move on.. When i travel with mates , i wud rather be ok since we always had snippets & hot news to ruminate on ..

This became a vicious cycle then.. banglore-chennai-banglore.. Hold ur breath , u havta blv me . outta the total 1 year and 4 months , almost all weekends I_WAS_AT_CHENNAI , except for a coupla them (or +1 , thats the max). I had booked so much tickets between chn - bang , that the Indian railways later decided to issue a special railway pass for me (of course with concession!!). Go to the url irctc.co.in and i'm sure that , those chaps wud have mentioned my name somewhere in the site or atleast in the disclaimer.. sumthing like "Accept.. if over 18 years of age, first name not like 'Kartik' & travel plan definitely != chn - bang :-) ".. for the amount of transaction that i had performed over there.. Also If u had tried booking a ticket last year at the irctc and should u have experienced a "server busy error" ..hang on.."I_AM_THE_CULPRIT .."

As in a fable ,where everything ends on a positive note.. this blog is also gonna do.. After constant pestering , bickers and 'I_AM_GONNA_QUIT' threats , i managed to obtain a TRANSFER... Know wat, the first draft of the letter that i was abt to send to my HR , giving a reason for a transfer read some thing like ..

"Hi,

The reason for the exigency in my relocation to chennai is that, i am exhausted, boarding the
banglore mail and all possible special trains , that southern railways had introduced for
reducing the congestion between the 2 cities and have exceeded the quota for maximum
number of tickets that can ever be booked by a individual bet 2 stations. As a result of this i
have been denied a ticket to my home town. Sensing the ultimate danger that i could never
board a train back to chennai , i request you to kindly gimme a relocation asap..

Regards,
Kartik

p.s : I have attached a mail from the Chief station master, banglore city with this, that will give
ya more insights into the issue..


< / end copy >

Search this site

Google