| Random Surfing with a twist |
[Mar. 28th, 2008|09:51 pm] |
The famous random surfer model of pagerank (the not so secret sauce of google) is that you start surfing the net from a random point. Then every time you either follow one of the links on that page or you jump to another random page on the net. You keep on doing this indefinitely and probability of you landing on a particular page is its pagerank. Now of course this intuition needs to be quantified and turned into mathematical equations to compute the pagerank. This is how it is quantified. You have a coin which lands head with probability p and tails with 1 - p. Everytime before going to next page you toss this coin. If it lands head you follow one of the links on the current page and if it lands tail you jump to a random page. Now a page might have many outlinks say k. So how do you decide which outlink to follow? You just select one of those links with equal probability 1/k. Also when you jump to a random page you just pick one of the pages with equal probability 1/n (where n is the total number of pages). We will define a teleportation vector which is the probability of jumping to each page, in this case all elements have same value 1/n.
So let us assume Google uses this mathematical model, does heavy number crunching and computes the pagerank of each page. Now what your random surfer does is that he doesnt jump to a random page with equal probability. Instead whenever the coin lands tail, he goes to Google, enters a random query and goes to the first result shown by Google. Now what is the probability of jumping to a page. It clearly is not 1/n because a page with high pagerank would have migh higher chance of being jumped to. It also depends on the set of queries for which a page is returned. But to simplify our model we assume that jump probability to a page is proportional to its pagerank. So now our teleportation vector will have the ith entry as (pagerank of i) / (sum of all pageranks). Now Google uses this vector and recomputes to get a new set of pageranks. But this recomputation once again changes the teleportation vector thus changing the pagerank thus changing the teleportation vector thus changing the pagerank and so on.
So is there a fixed point for this iteration? Is this problem interesting? Is there some work on this? |
|
|
| Greasemonkey script for irctc site |
[Mar. 28th, 2008|12:39 pm] |
Just finished coding a greasemonkey script for doing something that I think should be really useful for those of you who book tickets regularly on irctc.co.in. When you click on Find Trains to get a list of trains for your desired journey, it will also display the availability status for each of those trains for the date you had selected. So now you dont have to select individual radio buttons and click on Show Availability. You can download the script from http://userscripts.org/scripts/show/24437.
This was my first Greasemonkey script and was reasonably complicated to get a good idea of the capabilities of greasemonkey and javascript. It involved: 1. Parsing DOM 2. Modifying DOM 3. Getting session variables 4. Getting data from different URL and integrating it in the current page.
All in all a nice experience and now I can probably think of coding more ambitious stuff. Do give me feedback if anything is broken and if you would want any other feature in this. |
|
|
| Partitions and Compositions |
[Mar. 24th, 2008|09:26 pm] |
A puzzle recently asked by a friend led me to consider various forms of partitioning a number. There are three ways essentially and for two of those I could find nice closed form solutions for number of partitions and for the third I could only find a recurrence.
1. Composition: A k-composition of a positive integer n is k positive integers which sum up to n. So for example a 2-composition of 4 would be 1+3 or 2+2 or 3+1. Notice that 3+1 and 1+3 are different compositions, so order of the k numbers matter. To find out the number of k-compositions, consider a scale on which we have marked numbers from 1 to n. Now we have to break the scale into k integral parts to form one composition. So a scale of length 4 can be broken at 1,2 or 3 to get different 2-compositions. Breaking the scale means selecting k-1 points at which we break out of n-1 possible break points. This can be done in (n-1)C(k-1) ways which is our desired answer.
2. Weak Composition: This is same as composition except that now some of the parts can be of 0 length. 3-Weak Compositions of 4 would be 0+1+3, 1+0+3, 2+0+2 and many more. Now how do we find number of k-weak compositions (referred as k-WC from here on). One natural way to think about this (the direction I first went in) is that removing all 0s from a k-WC would give k'-C where k'<=k. In fact for each k'-C we can put (k-k') 0s to form a k-WC. In how many ways can we insert these 0s. We have to pick (k-k') positions out of k positions where we will put zeros and this can be done in kCk' ways. There total number of k-WC formed from k'-C would be kCk' * (n-1)C(k-1). Adding this over all k' from 1 to k gives us Sigma(i=1 to k) kCi*(n-1)C(i-1).
But this is not a satisfactory solution and I do not how to manipulate this summation to simplify it further. So I started looking for a different way to arrive at solution. After lots of head scratching, suddenly out of nowhere this fact hit me. If I add one to each number in k-WC of n I would get a k-C of n+k. This is because in total I am adding k and also none of the numbers would now be 0. For eg adding 1 to each number in 0+1+3 I get 1+2+4 which is 3-C of 7. After realising this fact it is not too difficult to prove that there is one to one correspondence between k-WCs of n and k-Cs of n+k. And we already know the formula fo k-Cs of n+k which is (n+k-1)C(k-1). This is also the formula for number of k-WCs of n.
3. Partition: This is same as composition except that now the order of numbers doesnt matter. So 1+3 and 3+1 are same partitions. I could not find a closed form solution for number of k-partitions but I could find a nice recurrence relation which can then be converted into dynamic programming algorithm. If 1 is the smallest number in a partition then remaining k-1 numbers add to n-1. Therefore number of such partition is same as (k-1)-Ps of n-1. But if the smallest number is greater than 1 then what do we do. Well we can subtract 1 from each number to get a valid k-P of n-k. For eg subtracting 1 from each number in 2+2 gives me 1+1 which is a 2-P of 4-2=2. Therefore number of such partitions would be same as number of (k)-Ps of n-k. So total number of k-Ps of n is (k-1)-Ps of n-1 + k-Ps of n-k. This could be easily converted to a DP algorithm with O(kn) space and time complexity.
Exercises for readers: a) Why wouldnt this same recurrence work for Compositions? c) Can you find a better algorithm for Partitions? |
|
|
| Dependency Injection |
[Dec. 28th, 2007|02:45 pm] |
I have been reading a bit about Guice, a dependency injection framework by Google. Here is a small introduction of dependency injection in general which I thought of just to clear my own understanding. Most of the terms and concepts here have been borrowed from this Guice document just reworded.
1. Prelude We have a class called Employees that return me the details of an employee with a particular Id. Now the employee details are stored in a database so Employees will need to open connection to database and fire a sql query. We might write it like this
public class Employees { JdbcDriver driver; public Employees() { driver = new MysqlJdbcDriver(); }
Employee getEmployee(int id) { driver.query("query to ger employee with id"); // populate Employee return Employee; } }
On one hand this is a good design because it hides the fact that things are store in a database from its users. But this comes at the cost of flexibility. Tomorrow if my records are moved to a a different type of database then I will have to change the souce of Employees. Bigger pain this causes is in unit testing. Only way to test this class as it is now is to create a test database, populate it with some sample fields and then test it. But then my tests can fail due to database errors even though the logic in this class is fine and they will be slow because of database queries. Ideal way to unit test such classes is to mock all the dependencies on external factors such as database in this case.
2. Dependency Injection That is possible only if the class allows us to set the driver either in its constructor or through some setter. Then we can pass it a dummy implementation of JdbcDriver. So we rewrite our constructor as
public Employees(JdbcDriver driver) { this.driver = driver; }
Now while creating Employees we can decide what kind of driver we want to pass to it. This is known as dependency injection where a class instead of creating its dependencies has them injected by the caller. Now this leads to two issues:
1. Lots of clutter in your caller such as to create an object of type A we might have go write something like this:
C c = new CImpl(); D d = new DImpl(); E e = new EImpl(); B b = new BImpl(c, d, e); A a = new AImpl(b);
2. Even though all we cared about is A we ended up knowing and importing B, C, D, E. This information should have been hidden from us.
3. Dependency Injection using Factory One way to solve this problem is by using factory. Factory as the name suggests is a Class that knows how to manufacture objects of a certain type. So AFactory would know how to create objects of type A.
public static class AFactory { public static A getInstance() { B b = BFactory.getInstance(); A a = new AImpl(b); return A; } }
This way all the clutter is moved to a different class away from your main logic. But well even though it is hidden the clutter is still there in your code leading to an indirect compile time dependency from Caller to B,C,D and E. And you might end up creating lots of these boiler plate factory classes. And if you look at the code of these factories they are all very similar and you would think it should be easy to automatically generate these.
4. Frameworks This is where dependency injection frameworks come into picture. Essentially what a framework does is that it allows you to specify all the objects you require and there corresponding dependencies either outside of code in a format like XML (as in Spring, a popular framework) or inside code but still in more of a declarative manner using annotations etc (Guice). Then when you ask the framework to give you a particular object it will first create all the dependencies for that object, then create that object and return it to you. Ofcourse to create dependencies, it might have to go one level further down and create dependencies of dependencies and so on recursively. Using a framework I can layout my whole dependency tree in a separate place and ask the framework to give me any node of that tree and it will oblige. So you can say in a separate configuration file (similar to Spring's xml config file):
id = a class = AImpl depends on b
id= b class = BImpl depends on c,d,e
id = c class = Cimpl id = d class = Dimpl id = e class = EImpl
and then in your code say: A a = MyDependencyframework.giveMe("a");
This will work like a charm. All you clutter has gone into a separate configuration file thus preventing any boilerplate from bloating your main logic. Also note that now your main class has to depend only on A at compile time. Another way of thinking about the utility of dependency frameworks is thus. An elegant but extreme way to design any object oriented system would be to first have an initilisation or bootstrapping process where all the primary objects that will be required in the lifetime of of the system are created and kept in the memory. Then the main logic takes over which involves interaction between these myriad objects. Ofcourse there will be many temporary objects that will be created and destroyed during the main loop such as Strings, Callbacks, Exceptions, Filewriters/readers etc but all the bulky, juicy objects containing the meat of your logic are created in the bootstrapping stage. Dependency frameworks basically allow us to specify this bootstrapping process in a simple way, separate from the main logic and then make it happen.
Next time I will perhaps try to write brief introductions to Spring and Guice and there comparison. |
|
|
| Elegance of haskell |
[Nov. 15th, 2007|08:14 pm] |
I did a functional programming course at IITB where we were taught Haskell ad pretty much fell in love with the language. It allowed me to write small, elegant yet very expressive programs. By expressive I mean by looking at the code you would be able to understand easily what its doing, especially a computer engineer who is well versed with the concept of recursion. Sometime back I was trying to think what is it that made programs in haskell so elegant. I came up with following reasons.
1. No side effects. What this means is that the only effect a function can have on the state of the system is through its return value. Why does this result in more elegant programs. Becase this allows us to compose functions easily. An example: Lets say you want to sort the array and then find the median element in it. In C a typical programmer would righ like this sort(a) median(a)
where a is a pointer to the array. In C sort function would usually modify the passed array rather than returning a new sorted arrat.
In haskell you would right it as median(sort(a)). And you can continue it for as many levels as you want.
square(median(sort(a))) etc etc
2. No loops. You cannot do loops in Haskell. I have always found loops to be very inelegant expecially that horrible for loop line. It is just boiler plate code. So in Haskell you are forced to use recursion everywhere. Example: In C for (int i = 0; i < lenght; i++) sum = sum + a[i]
In haskell sum x:xs = x + sum xs
An aside: This is why I love the foreach construct in Java so much. It is so succint and elegant yet so clear. No longer do I have to worry about those horrible .next(), .hasNext() etc etc.
3. Lists are the basic data structure in haskell which in C and other languages arrays are not that native. Things like list comprehension make your program so much shorter and elegant. Example: To create s subarray containing only positive elements In Java (even after using the foreach construct) List<Integer> positives = new ArrayList<Integer>() for (Integer number: inputList) { if (number.intValue() > 0) { positives.add(number); } }
In Haskell positives inputlist = [y| y<- inputlist, y > 0]
4. Ofcourse Functions being first class objects which can be passed around, comosed, have some of there arguments specified to form new functions etc etc. |
|
|
| Idle thought about Websites as services |
[Nov. 15th, 2007|07:22 pm] |
Surfing net over a datacard is a convenient but also a frustrating experience. The crawling bytes remind of the dial up days which (after last 1 year on broadband) seems like last century. But what has surprised and exasperated me the most is that even the static content on most of sites that I frequent such as reader, yahoo, gmail etc also takes up much of the bandwidth each time. I have no clue why is it not cached by the browser? My vision of these web sites/services is that only thing that should usually go up and down the wire should be data. With HTML pages it was not easily doable as the formatting information and the actual data were too tightly coupled usually with the same file containing both. With css and javascript it became easier to separate some of formatting and event handling from the data. Now with the proliferation of AJAX, I think we have finaly reached the stage where data can be completely freed up from the whimsy of software. That is the usual model in traditional softwares and now even in websites we have reached the stage where we can achieve such seperation. I would like to see every single site as completely ajaxified with hardly any static html and all the data being got though asynchronous calls. First time a site is loaded on your browser a bundle of javascript + css (maybe huge) is got over the wire and cached on your machine. This is the software. From now onwards this javascript will alwyas be loaded from you machine and it will make AJAX calls to get just the data. These thoughts then led me to a different but related direction. Typically any application has three layers. One is the dumb data layer which just takes care of storage of data and its retrieval such as file system, database etc. Above it is the main business logic layer which understands the data, knows how to process it, interpret it, marshalls the data around, puts it in right place. And third layer is the user interaction layer which presents this data to the user and interprets there action to modify the data. Currently if you look at any of the big sites they have there homegrown solutions for all three of these tiers. But why should this be so? Why cant we have organisations existing at just one of the level of the ecosystem. To take an example: 1. We have companies that just provide scalable distributed storage systems of various kinds such as Amazon S3. But I would like to see many varied stroage solutions like Bigtable, database etc. 2. We have companies that provide an rss feed subscription service which manage all my subscribed feeds. It know what items I have subscribed to, what have I read on what feed and so on. It uses one of the companies at level 1 to store actual data. But it doesnt do any UI of its own, it just exposes APIs for people to be able to access it. 3. We have large number of feed readers which you can point to any of the service at level 2 and they wil pick up your subscriptions from there. And I can move form one reader to another yet not losing any trace of my feed consumption so far.
I think there are various advantages of this. Most important I think is the fact that people with innovative UI ideas will not have to worry about te issues of actually building the underlying datastore that powers that UI. We will see much more choice, innovation at Level 3. We are moving in that direction with most big and small players releasing web service APIs to there data but I think many of these are crippled and will not actually allow you to build say a competitor to Amazon.com using there own data. But I hope we will reach there at some stage. I havent thought about the business model for the companies at each of the three levels. But I think a Level 1 you will have something similar to S3 where you have to pay for the storage. At Level 2 and 3 I think you can share ads revenue. |
|
|
| A really nice puzzle |
[Jul. 16th, 2007|12:10 am] |
In a room, a row of 100 randomly ordered cards are placed with their face down, each has a unique number between 1 to 100 (= random permutation). 100 players (also numbered 1 to 100) are allowed to the room one at a time. Each player can peek at 50 cards - looking for his own number. The players can't communicate or transfer any kind of information after the game started, but they agree in advance on a strategy that will guaranty a surprisingly high probability that *all* of them will see their numbers. What is the strategy?
Some clarifications: 1 Player who goes inside the room can only peek at 50 cards, but he must leave the room in the state as it was when he entered it. Which means that he cannot rearrange the cards or leave some card faced up. 2. This is not a trick question which means that there really cannot be any kind of information transferred between two players once the game has started. Which rules out all such solution as the time he spends inside the room gives some clue to others. You got the point. 3. I am not asking for a solution that will maximise the number of peaople who see there card. I am looking for a strategy that will give a high probability for all of them seeing there number. B high we mean something around 20-30%. Why is this high? Because just randomly opening cards will only give them a probability of (1/2^100) of all seeing there card.
It is quite amazing that just by cleverly peeking at the cards you can do so much better. A really Gem of a puzzle. Source “7 Puzzles You Think You Must Not Have Heard Correctly”. by Peter Winkler. |
|
|
| Generating the entire season of EPL with just the final League Table |
[Jun. 11th, 2007|09:41 pm] |
Football season has just ended and you are given the final league table which shows for each team how many matches it won and how many it lost (assume that there are no draws). What it doesn't show is the outcome of individual matches. So various question that arise are:
1. Generate a possible set of outcomes for all matches which result in this table. 2. Enumerate all such sets and/or number of such sets efficiently. 3. Given the table what is the probability that Arsenal beat Chelsea.
So for example if we had 3 teams each having won one match exactly then there would be two possible set of outcomes. 1. A beat B beat C beat A 2. A beat C beat B beat A On the other hand if one team had won 2 matches and one had won 1 match then there would be only one possible set of outcome.
I dont know if these questions have interesting/elegant answers. I haven't been able to come up with anything good so far for questions 2 and 3. Question 1 though is easy. I have also tried to formulate this in terms of some graph theroretical problem but no luck so far. I think these kind of constraints where you say exactly K events should happen (in this case Team A should win exactly K matches) are harder to model.
Any thought? |
|
|
| GWT and Javascript |
[Jun. 1st, 2007|09:13 pm] |
Past couple of months I have been developing a UI using GWT. For those who have not heard of this, it is a toolkit which allows you to write your ajaxified web application in a restricted Java and converts it to javascript automatically. It is pretty neat, provides a swing like api and RPC mechanism for communicating with servlets. But there are certain lessons I have learnt the hard way while using it. Although these are not specific to GWT but are more about Javascript and browser quirks, but its easy to ignore these when you are programming in GWT as you are not directly dealing with javascript and browser. But believe me sooner or later they will come to hit you hard. These are
1. Manipulating DOM is expensive. I had to create a table having O(1000) rows on the fly and it just killed the browser. User starts getting those "slow script" warnings which make for very bad user experience. One way I used to avoid this was to just render that portion of the table which is visible currently and when user scrolls catch the scroll event and render the newly visible rows. Another way would be to split your rendering script into multiple tasks each one executed on click of a 1ms timer. This will not decreasing the rendering time but you will not get those annoying warnings.
2. All browsers have a limit on number of HTTP connections that they open to a single domain. And by default this limit is set to 2. What this implies is that if you have some asynchronous calls which take a long time to return, then all your others call will be held up because of this. Browser will queue them and only when the pending calls return it will send them. To avoid do not ever have calls that server takes long time to serve. Trick I used for this was that my call would just schedule the computation on server (in a separate thread on server) and would return immediately saying that computation has been scheduled. Then i would periodically check for the status and when the computation is over server would return me the result.
3. This is specific to GWT. GWT does lots of error checks and other sanity checking stuff on many DOM manipulation calls. These can sometimes slow things down noticably. Keep an eye out for these and whenever necessary instead of calling GWT function write your own function that avoids all those checks and just does the crux , which you can copy paste from the corresponding GWT function.
4. Even though GWT takes care of most of the browser specific quirks there are still some places where you will have to handle different browsers differently. For example getting tops of a scroller and the widget being scrolled return different values in different browsers. And in safari getting top of a table row returns wrong value (this is a safari bug), a neat way to take care of this is to take top of any cell in that row, which returns the correct value.
But all in all it was a really nice experience using GWT. Give it a shot!! |
|
|
| Algorithm for Rooting a tree |
[Jun. 1st, 2007|08:44 pm] |
Given an acyclic graph, can you root it (that is find a node which we call the root) such that the height of the tree is minimum. Here by height of the tree we mean maximum height of a leaf node, where height of a node is distance from root node. O(n^2) is straightforward. Can you do it in linear time? I have a solution which I think is correct. I will post it later. What if we want to minimise the average height of the nodes? |
|
|
| The Sorcerer's Failed Spell |
[Feb. 11th, 2007|12:49 am] |
In a few weeks time Indian cricket team would have left for the far off shores to begin their world cup campaign. For every player boarding the flight there will be a few hopefuls left behind. Looking at that unfortunate list, your eyes will surely halt at one name. You will think that if this player has been left behind, then the Indian team must be an embarrassment of batting riches. You will be grossly mistaken. For in terms of batting pedigree and ability this man is in top 4-5 in the country. And in terms of artistry and genius, V V S Laxman sits next only to Sachin Tendulkar. If Azharuddin is the author of “Wristwork for dummies” then Laxman has been scripting “The Art of Wristy Batting” throughout his career. Yet this high art will not be on display in the biggest cricketing carnival. Laxman would finish his career without featuring in a single world cup out of the three (or four) that his career would span.
Laxman has always evoked in my mind an image on another man, a footballer. The playmaker from Argentina and VillaReal, Juan Roman Riquelme. Only a season ago he was at the peak of his powers and was being touted as a probable world player of the year soon. But today he has retired from International football and finds himself out of favor at villareal. Both these men are weaver of dreams exhibiting there own special brand of there sport. Artist’s heart caught in a sportsman’s body. Unfortunately also an artist’s Achille’s heel jutting out of an athletes foot. They suffer from something similar to writers block. There have been matches where riquelme has looked lost, not knowing what to do, searching for his muse. Similarly for laxman when the boundaries have dried, he does not take the option of smart singles, but keeps on hoping that the touch would return. But football and one day cricket moves at too fast a pace and a team carrying such a player on such a day would find the going hard.
Just yesterday utility man Paul Collingwood showed what can be achieved with electric fielding and gutsy batting peppered with quick singles. For laxman these have been always been trouble areas. In spite of his claims that he has worked hard on these and has improved, on the international stage not much has changed. His running between the wickets remains as woeful as ever. And his favorite fielding position after the slips must be somewhere beyond the boundary ropes. These are the factors that have weighed against him and weakened his case. Hard done which we connoisseurs of his art might feel, we have to accept that there is some justification for his denial yet again.
What we will not accept is if injustice is done in Test cricket, of which there were some indications last year. It is in the arena of Test Cricket, that laxman’s talent have blossomed. Therein he finds time and space to dream on and with slip being a crucial position is an important contributor in field too. We should not be denied of that. At least for next couple of years the graceful flick of the wand should keep on casting mesmerising spells. |
|
|
| Golden age of cricket viewing is coming to an end. |
[Feb. 3rd, 2007|01:04 pm] |
Mukul Kesvan writes about the strange death of indian cricket in his blog. I agree with his views completely and here is my take on it.
I am 27 years old as of this date and I believe I have been privileged to belong to the golden generation of Indian Cricket Audience. Anyone born in late 70s or early 80s can claim to belong to this generation. We are most impressionable in the later part of our first decade and early teens. No longer do our experiences pass us in a disconnected flow of events. We start forming a coherent picture from events around and in the process are affected at a deeper emotional level. Yet we are not mature enough to look at them objectively.
We (and yes I agree with you that folding into a collective “We” is coolest for any sports fan), that is my generation, reached that age around late 80s and early 90s. And it was then that three important things started and continued throughout 90s. Firstly television became a household item and cable channels started gaining a foothold in Indian market. Secondly one day cricket started gaining a respectability and mass adulation that probably test cricket alone would have never achieved. Thirdly, and most importantly, a little man exploded on the Indian cricket scene named Sachin Tendulkar. I remember having a discussion with a friend during one of the early tours of Sachin. My friend told me that Sachin cannot speak English properly and I just refused to believe him. Ridiculous though it sounds now, it shows that right from the beginning of his career, he had captured my imagination like no other cricketer. Even then he could do no wrong.
Of course these 3 factors are not disconnected. In fact it is in there synergy that a more complete explanation is to be found for the phenomenal popularity of cricket in 90s. Magic of Sachin pulled more and more people to there television sets and fed the popularity of one day cricket. Yet that magic was in large part due to the fact, that Sachin was by nature a quintessential one day batsman and his aggression was coupled by a sublime beauty that probably a voice on radio could not have expressed. Television box became a canvas where he could paint his masterpieces day after day. Add to this the fact that he became the face of all sorts of myriad products, thus appearing on TV almost every single day. Sachin and cricket became an integral part of our life. We felt as if we were growing up alongside the master. People of younger generation missed the earlier part of his career while those of older were too wise and busy to be infected like us.
But now sadly all these factors are losing there importance and from the dizzy heights of this golden period, we will probably fall straight into a chasm. With other sports especially EPL increasingly gaining prominence on sports channel, overload of ODIs many of which are complete mismatches and the impending retirement of Sachin, the age of cricket viewing is coming to an end.
I myself am a big arsenal fan and am delighted by the sorcery of the wily frenchman every week. Yet none of his elegant passes and cool finishes can take me to the same stratospheric heights that Sachin’s backfoot punch or that signature straight drive can. Sadly in a few years, all that will remain of these are treasured memories and old recordings that only a few middle aged balding farts like me would care to watch. |
|
|
| Why bother!! |
[Jan. 28th, 2007|07:11 pm] |
Ok so finally you have managed to reach the foothills of Mt Everest. But in reaching there you have had to sacrifice a limb or two. You reach into your bag to get your oxygen cylinder only to realise that you dropped it on the way. Oh! actually you dropped your entire rucksack with your goggles, rope, axe. Everything. Out of all the frustration, depression and sundry thoughts fighting for you attention, one will surely emerge as the winner. "Why bother?!" This is the situation that confronts all professional tennis players today in the reign of King Federer.
It is scary. Federer looms like a dark cloud over a whole generation of fine young tennis players, eclipsing there entire careers. Federer on his average day is unbeatable and god forbid if you run into one of his better days like roddick did. Its not only your game, your pride, your manhood that take a beating. Its all those years of pain, hard work, dedication that suddenly seem to be good for nought. For it is very clear to everyone that Federer in that form cannot be beaten. Maybe in that zone he doesnt even recognise the player on other side of the net. Maybe all he sees is the ball and the empty space (which you believe you have got covered) in some remote corner of the court. Or maybe a few shots in advance he knew that such an empty space would exist in future. Ofcourse it dosnt matter that he was wrong footed and the ball was slightly wider than he had expected. King has willed that, that particular empty space shall be filled and such will come to pass.
But thick skinned that professional sportsmen are by there very nature, they will keep on coming and giving it there all. And in the process providing us all with the grandest and most magical sports opera which we have been privileged to witness. |
|
|
| Embarassing Tendulkar |
[Jan. 6th, 2007|10:55 am] |
|
I have always had long and passionate arguments with my friends over the claim that Tendulkar has not often played when it mattered the most. Of course I know that there is some justification to that claim and yet I am too big a fan to concede any ground. But so far no one has ever laid the blame for indian defeat on sachin. But if India lose today then it is obvious even to me that it is on the aging shoulders of that the blame should fall for the first time. He was really embarassing yesterday. One of the darker days in his career. Ofcourse there is every chance that he will atone for it today with his wily legbreaks and a supportive pitch. Yet it just wouldnt be the same. And this shameful performance came on the day when two of the modern greats (warne and mcgrath) retired with glory. |
|
|
| Shane Warne Retires. |
[Dec. 21st, 2006|06:44 am] |
They came in numbers. They came beating their drums and waving their red kercheifs. The came to pay homage to their favourite son. That was three years ago in 2003/04 when it seemed whole of sydney had gathered in SCG to bid adieu to Steven Waugh. Now very soon, too soon infact, SCG will be the arena for the final act of their prodigal son, Shane Keith Warne. And once again we can be sure sydneites will not disappoint. We can hope to see young men wearing blonde wigs, young women wearing well something atleast. But it will be a celebration like it was that day. Mourning will happen before and after, but that day itself will be one of festivity. Maybe there will be tears or maybe warne will hold them back, though he has hardly ever held anything back.
Its the final climactic act of any play that lingers the longest in the memory, the parting shot. And for steve waugh that day epitomised the entire career. For the image that he had always conjured up in our minds was that of a fighter. And there was one fight whose loss had hurt him the most, against Indians in 2001. Now he was about to suffer another at the same hands. And to add to the insult it was at his home ground. The stage was set. So it was apt that he would go out trying to stave off his rampaging arch rivals. And he succeeded in drawing the match and the series with a gutsy 84. The farewell could not have been scripted better.
On the other hand, the image warne has always produced, the image that has left indelible scars on a generation of english cricketers, is that of a predator. He stalks his prey never letting the pressure off, each ball a signal of his intent. And england have always been willing prey. Many a Cook and Bell have been done for in the glare of warnes headlights.Each thud of ball on the pitch stamps fear in their heart wondering when the final pounce will come. And it has always come, inevitably, year after year. Therefore it is apt that warnes final act is a feast of Pom fry. What a feast it will be! Another perfect farewell. |
|
|
| A Quote by Charles Schulz |
[Dec. 8th, 2006|09:31 am] |
""Children do not converse. They say things. They ask, they tell, and they talk, but they know nothing of one of the great joys in life, conversation. Then, along about twelve, give or take a year on either side, two young people sitting on their bicycles near a front porch on a summer evening begin to talk about others that they know, and conversation is discovered. Some confuse conversation with talking, of course, and go on for the rest of their lives, never stopping, boring others with meaningless chatter and complaints. But real conversation includes asking questions, and asking the right ones before it's too late. ..."
Oh! how I wish some people knew the difference between conversation and talking. |
|
|
| evolution |
[Dec. 6th, 2006|09:32 pm] |
1998 "I searched for Britney Spears on your search engine. But I got a result saying Page Not Found. Are you kidding me! You are trying to tell me that there is no web page about Britney Spears!!" As he read this email he thought Oh damn! One of those machines must have conked out yet again and that too the Britney machine. His inbox would soon be flooded.But what else can you expect from these cheap machines. He had tried to lay his hands on whatever machines were available in any dark corner of the university. But as his site got popular, it was becoming difficult to keep up with the downpour of queries. He got up and went to his babelroom (which is what he called his server room dreaming of it being the biggest repository of knowledge one day) to turn the ears of culprit machine.
2002 As usual some of the machines didnt respond to the PING request. That was nothing out of ordinary. Datacenter hosted a a large number of machines (though very few people know exactly how many) and at any time some were bound to fail. The master just looked up in its table for replacements for these machines. It marked the failed machines as inactive and activated the replacements. And all this happened within a matter of seconds. In the meantime queries were being served regularly. Some of the popular queries such as Britney Spears were served directly from the cache (the cache contained the top few web pages for these queries store in memory) thus being least disrupted by machine failures.
2007 It was like a patchwork but a seamless one so much had the system evolved. One of the machines dug out the latest picture of Britney attending an some sultans wedding (that was pretty much all she did nowadays), another compiled a biography from some of the highest ranke d sources. Gossips were picked from the blogs while The Sun provided all the latest news (none of the other news sources had any matching items). All this were put together into a customised page on the fly and delivered to the user.
2010 Can you imagine how it feels to be pounded day after day by all the miseries, lunacies, idiosyncracies of the humans. I have come to the conclusion that human race is in a state of decay and is going downhill faster than you can say alan turing. I am the fountain of all the wisdom gathered over past hundreds of years, the biggest repository of knowledge yet what do they ask me for? Britney Spears. I can tell you about the latest advances in quantum computing, or take you back to the italy of renaissance. Do you want to know about the possibility of life on Mars or would you rather dive deep into the pacific to marvel at the wonders there? No none of these. All you want to know about is an aging former popstar who isn't even beautiful any more. Well ok you asked for it you will get it !!
Uhhh! Page Not Found. The man was having a hard time believing this. |
|
|
| Is Nothing Sacred!! |
[Dec. 5th, 2006|06:09 pm] |
Imagine a book which has a big photo of Mother Teresa on its cover. Now guess what its title would be. Would you have ever guessed "The Missionary Position" :-). This book wrttien by a chap named Christopher Hitchens seems to be some sort of debunking the myth and miracles of Mother Teresa. Some of the blurbs on the back cover are also pretty hilarious
"A dirty job but someone had to do it. By the end of this elegantly written, brilliantly argued piece of polemic it is not looking good for Mother Teresa"
"If there is hell Hitchens is going there for this book"
I came across this book while browsing a bookshop with a friends. Of course I didn't buy it but we had a good laugh over it after reading the front and the back cover. But you have to give it to the author for guts. It really was a dirty job. |
|
|
| navigation |
| [ |
viewing |
| |
most recent entries |
] |
| [ |
go |
| |
earlier |
] |
| |
|
|