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.

Search this site

Google