Monday, June 25, 2007

Jonathan Strange and Mr. Norrell (quotes)

I recently had the oppurtunity to read the novel "Jonathan Strange and Mr. Norrell" by Susanna Clarke. The favorable reviews and the fact that this won the Mythopoeic Fantasy Award (for Adult Literature) apart, I decided to read it because I just cannot keep off fantasy books - talk of sorcery, magic, swords and dragons, and I am in. Another old habit that would die hard, if at all.

Susanna Clarke chooses a style of writing thats in line with the backdrop of the book : the novel is set in the England of 1800, and is about the attempts of two magicians to restore English magic to its former glory. Small surprise then that "old" period English is used- with words like Shewed (showed), Stopt (stopped), Scissars (scissors), Expence (expense), Headach (headache) making a liberal presence.

Much of the novel carries itself at a leisurely pace, punctuated with a fair share of thrilling moments. The author has a gift of prose that stands to her advantage in a novel like this, serving to create a much needed atmosphere of casual magic. And, of course, there are places where Clarke’s prose additionally decorates the story, bringing to life the parts that are meant to stand out.

Some of my most memorable lines from the novel are:

Childermass was one of those uncomfortable class of men whose birth is lowly and who are destined all their lives to serve their betters, but whose clever brains and quick abilities make them wish for recognition and rewards far beyond their reach. Sometimes, by some strange combination of happy circumstances, these men find their own path to greatness, but more often the thought of what might have been turns them sour; they become unwilling servants and perform their tasks no better - or worse – than their less able fellows. They become insolent, lose their places and end badly.

After two hours it stopped raining and in the same moment the spell broke, which Peroquet and the Admiral and Captain Jumeau knew by a curious twist of their senses, as if they had tasted a string quartet, or been, for a moment, deafened by the sight of colour blue.

She was always very ready to smile and, since a smile is the most becoming ornament that any lady can wear, she had been known on occasion to outshine women who were acknowledged beauties in three counties.

Under other circumstances she would have been puzzled to know what to say to a man of the world like Jonathan Strange, but happily his father had just died and that provided a subject.

“Can a magician kill a man by magic?” Lord Wellington asked Strange. Strange frowned. He seemed to dislike the question. “I suppose a magician might,” he admitted, “but a gentleman never could.”

“All of Man’s works, all his cities, all his empires, all his monuments will one day crumble to dust. Even the houses of my own dear readers must – though it be for just one day, one hour – be ruined and become houses where the stones are mortared with moonlight, windowed with starlight and furnished with the dusty wind. It is said in that day, in that hour, our houses will become possessions of the Raven King…”

“… I am rather of the opinion that in England a gentleman’s dreams are his own private concern. I fancy there is a law to that effect and, if there is not, why, Parliament should certainly be made to pass one immediately! It ill becomes another man to invite himself into them.”

“… Soldiers, I am sorry to say, steal everything.” He thought for a moment and then added, “Or at least ours do.”

“… The French mayn’t pass here. Why, sir! A beetle mayn’t pass unless that beetle has a paper with Lord Wellington’s writing on it!...”

But from the first moment of his entering the house Strange found himself subject to that peculiarly uncomfortable Natural Law which states that whenever a person arrives at a place where he is not known, then wherever he stands he is sure to be in the way.

“My admiration does not lessen my hatred one whit!”

“Well, I suppose one ought not to employ a magician and then complain that he does not behave like other people,” said Wellington.

“Dear God!!” cried Fitzroy Somerset, “What language is that?”
“I believe it is one of the dialects of Hell,” said Strange.
“Is it indeed?” said Somerset. “Well, that is remarkable.”
“They have learnt it very quickly,” said Lord Wellington, “They have been dead only three days.” He approved of people doing things promptly and in a businesslike fashion.

All magicians lie and this one more than most, Vinculus had said.

“Means?” said Stephen. “That is an odd word to use. Yet it is true – skin can mean a great deal. Mine means that any man can strike me in a public place and never fear the consequences. It means that my friends do not always like to be seen with me in the street. It means that no matter how many books I read, or languages I master, I will never be anything but a curiosity – like a talking pig or a mathematical horse.”

“It is these black clothes,” said Strange. “I am like a leftover piece of funeral, condemned to walk about the Town, frightening people into thinking of their own mortality.”

Most of us are naturally inclined to struggle against the restrictions our friends and family impose upon us, but if we are so unfortunate as to lose a loved one, what a difference then! Then the restriction becomes a sacred trust.

“We will know them as we know other men,” he declared, “by the fruits they bear.”

The sunlight was cold and clear as the note struck by a knife on a fine wine-glass.

Though all the houses of Venice are strange and old, those of the Ghetto seemed particularly so – as if queerness and ancientness were two of the commodities this mercantile people dealt in and they had constructed their houses out of them. Though all streets of Venice are melancholy, these streets had a melancholy that was quite distinct – as if Jewish sadness and Gentile sadness were made up according to different recipes.

“…With the ashes that were her screams and the pearls that were her bones and the counterpane that was her gown and the magical essence of her kiss, I was able to divine your name - …”

These are the customary three elements of a traditional English summoning spell. The envoy finds the person summoned, the path brings him to the summoner and the handsel (or gift) binds him to come. (I like this one because this represents sound communication principles :) - AG)

The ashes, the pearls, the counterpane and the kiss.

Of these, the last one – “Ashes, Pearls, the Counterpane and the Kiss”- appeals to me the most. This is the title of a chapter in the book. In which, the Elf-king of the Kingdom Of Lost Hope proudly regales Stephen (a character whom the Elf King admires a lot) with an account of his investigations carried out to find out Stephens' original name . The King is a misanthrope, and Stephen discovers much to his horror, but sadly not to his surprise, that the kings' quest, funded with his hatred for mankind, has woven a wake of innocent deaths.

A cursory glance at the words, hint at a romantic allusion ( or at any rate a positive/beautiful feeling), but a moment's thought sets them into their proper context and brings to mind the deaths so casually scribed by their speaker. Apparently for his love (of Stephen): a cause much ill justified for the price it has entailed. In effect, to me,they are almost like a painfully beautiful picture on a wall that hides an ugly gash underneath. Or like a simulacrum of the many contrasts of life itself.

Thursday, June 7, 2007

Thoughts during coffee

I am thinking these thoughts as I have my coffee in the office canteen on an evening. Incomplete thoughts that stay but a moment (and give me enough reason to post) :

(1) The news declares that inflation is down at 5.06%. I start thinking of things that have usually been known (or are expected) to show an upward trend. Inflation? No. Population... hmm..probably in India. Entropy/chaos - yes. Entropy seems such an intangible concept. I wonder whether it can be correlated to a "materialistic" quantity. Say, if I land upon earth 500 years hence, would I be able to remark that the entropy of the universe has increased by
k.(p)^α , where p = population of the SomeCountry ??

We know that entropy increases. Does the rate of its increase increase? How about the rate of rate of rate its increase? Does the universe have a limit to the number of times you can say "rate of " before the final "rate" becomes a constant?

Interesting question thats pops up in my mind - suppose I had 'x' number of men and 'x' number of women to start with. And I mandate that every couple has one child. I also assume that the society is monoandrous and monogamous. So the next generation has x/2 people, the next has x/4 ... and the population dies out eventually? Why would some governments want that - ha!

(2) The last few days have been easy for me (at office)

(3) The furniture, the lighting around, the various counters in the canteen are not unlike other canteens/joints that I see these days. Things have become so impersonally utilatirian that it is difficult to note the "personality" of something expressed in its existence. Like the Irani coffeehouses in Mumbai. One CCD (cafe Coffee Day) outlet is same as others. Good or bad?

(4) The canteen used to have an interesting arrangement of water coolers previously. By a wall, they had a table on which fresh glasses were placed. A water cooler sat to its right. Another water cooler sat to the right of the first one. And finally, we had another table with fresh glasses placed on it. The arrangement may be pictured as below:

1st table with glasses -- water cooler -- water cooler -- 2nd table with glasses

I had often wondered whther I could roughly estimate the no. of left handed people in the office by counting the glasses used from the first table. But, then there would be so much 'noise' in the (hypothetical) experiment:
(a) Used glasses are replaced with fresh ones periodically
(b) During peak hours people choose to drink from a particular cooler based on the queue in
front of it.
(c) I dont know whether everyone comes to the canteen for food

(5) Mamihlapinatapai- beautiful Yaghan word, meaning

"a look shared by two people with each wishing that the other will initiate something that both desire but which neither one wants to start "

I wonder how they missed out on it in English - a commonplace phenomenon (and a practical example of deadlocks).
Interesting the Yaghan language is considered to be a 'language isolate' i.e. a language which hasn't been proved to have descended from any other.

(6) Amruth and I were chatting the other day. I told him that 'Mamihlapinatapai', 'chathuringmes', 'Jabberwocky' were 3 unusual words that I had come across in the most unexpected of sources.

(7) Read the following lines:

You are the fairest of your sex,
Let me be your hero;
I love you as much as 1 over x,
As x tends to zero.

The last word postively takes the cake...

End of coffee.

Monday, March 5, 2007

Orkut friends list – a few thoughts

The orkut phenomenon has really caught on with the number of its users reaching a whopping 45 million. The other day, Tanmay said its an innovation in communication (or did he say a new communication technology?) – that might be stretching it a bit too far, but then again, for an application with 45 million users I couldn’t dare to disagree (at least not there and then- but I might return with an interesting argument later :-) , the clichéd argumentative Indian that I am...).

Orkut represents an interesting aspect of the general “ambivertedness” of the human nature. Standing right in the middle of our desire of privacy in communication (which e-mail services provide us with – if I mail a person A, nobody else needs to know about that) and our desire for recognition. Orkut is an in-between since (a) you usually do not expect a complete stranger to scrap you (for the ladies- I used the word usually) – so there IS some amount of privacy (b) if an acquaintance happens to drop by, you want a uber-chic profile – the desire for recognition. Also you don’t mind a friend reading the scraps written to you by another friend.

The friends-list is a source for some interesting ideas. But to talk about things in a precise way lets talk about graphs first. (You can skip this paragraph if you know what they are). All we need to know for now is that a graph is a diagram like this:

Dots and lines. Graphs are of profound importance in mathematics since a lot of situations can be modeled as graphs (let the dots be cities, the lines be roads – so the above diagram can be believed to represent cities and the interconnecting roads etc.), and any theorem that’s true for the graphs can be carried to the original situations to gain deeper insight. We will call the dots and lines, nodes and edges respectively. Also, we say a graph is connected if you can find a path of lines/edges between any two nodes. The above graph is connected. The following one isn’t:

since there is no path between b and a.

Back to orkut now. The friends list can be modeled as a graph with nodes being people and the edges (though they do not exist materially) as “friendships”. We will call this graph the “friend-graph”.

Thoughts on the friend-graph:

[1] Orkut claims that you are connected to 45 million people (you see this message when you log in). Connected means if you pick up any 2 people amongst the users, you will always be able to find a chain of friends between them (or, a path in the friend-graph), right? Now 45 million is a big number and I was not too sure that all the users are connected. So I created a second profile only to have orkut claim that I was connected to 45 million people through 0 friends. Clearly not true – I was expecting to be told that I was connected to zero people. Or rather, let me put it in this way: orkuts’ definition of connectedness is not the same as ours. What Orkut means is you are potentially connected to 45 million users.

[2]Someone mentioned that friends list is a tree. Its not. A tree is a special kind of graph that looks like this:

It’s precisely defined as a graph that doesn’t have circuits (circuit is a path that leads to the starting point). Orkut has circuits. Noticed that “common friends” list when you visit a profile (say a friend named x)- which is supposed to show the friends that are common to the profile and you? Let’s assume a common friend is y. Visualize the orkut friend-graph now – there is an edge between you and x. And there is path with the edges: you->y, y -> x (since y is friend of x too). So we have the circuit: you->x->y->you. Thus the orkut friends list is definitely not a tree.

[3] The friend graph is also a dynamic graph i.e. one in which the number of nodes change (new users, deleted profiles) and the number of edges change (new friends)

[4] When a new user registers, the count of the total number of users does not go up immediately. Orkut changes the count periodically, not immediately.

[5] It would be interesting to know how many people you are really connected to, through chains of friends i.e. the number of nodes in he connected component of the graph you are a part of. But orkut doesn’t disclose this data :(

[6] I think it would be quite interesting to find out what is the minimum number of those crucial profiles in your connected component, which if deleted, breaks the component into two disconnected parts (and do what?)

[7] Anyone for finding out the degrees of separation? The famous Milgram experiment claimed that any 2 people in the US are separated by six acquaintances in general. That was in 1967. I would love to know what the average dergree of separation on Orkut is.

[Gaurav said he wanted something more from the article. Hence this message to the non-geeks : ignore this paragraph and the following one.

Parankush and I were actually planning to find out the degrees of separation on Orkut. The quick and dirty implementation plan was to use a screen-scraping package like PERL Mechanize, scrape all the friend-graph related data onto the local disk, and then do whatever we wish to do with the data ( like boast about it, run algos to find out the minimal cut-sets, the average degree of separation etc etc). Some interesting challenges were (a) we would need a way to merge findings from my program and his (since we were planning to run the codes over our machines, separately, and we didn’t want redundant work. (b) savepoints: to protect ourselves against power failures, and proxy server downtimes we needed a way to commit a savepoint periodically (or, detect when the laptop switches to the battery backup, so that a save point is registered automatically then) (c) how do we pack such a volume of data on our hard drives . The biggest problem however was time : we had absolutely no idea how long we would have to run our codes (days? Weeks?) to scrape all the data using our not-so-reliable net connections and other interrupting factors. Larger the amount of time required to run the algos, more a dynamic graph changes – a fact which prompted Parankush to ask me the Tao of all questions: “Why are we doing this?” As a reply to which we retired to our monotonous lives.]

Tuesday, February 27, 2007

Lines from The Rubaiyat

Some of my favouite lines. From the Rubaiyat:

We are no other than a moving row
Of Magic Shadow-shapes that come and go
Round with the Sun-illumined Lantern held
In Midnight by the Master of the Show;

But helpless Pieces of the Game He plays
Upon this Chequer-board of Nights and Days;
Hither and thither moves, and checks, and slays,
And one by one back in the Closet lays.

--- Omar Khayyam, The Rubaiyat

Return of the Commandline

Here is a search phrase Google accepts:

intext:(google+recruitment+india) intext:(bangalore) filetype:html

This translates to the following more readable form:
“Find pages containing the words Google, recruitment, India in their texts. From amongst these, find the ones that contain the word Bangalore. Finally, from amongst these, get me the pages of type html.”

Though complicated, the above phrase achieves quite a lot in a few words, much like the command line statements UNIX users are accustomed to. In the years before the Graphical User Interfaces (GUI) flooded the software market, this was all we had – plain command lines. With the likes of Google and quite a few other applications encouraging them again (another notable example is it suddenly seems the command line is slated for a comeback.

GUIs, undoubtedly, have been the dominant form of interface for quite a while. Their greatest advantage is their ease of use over command lines. They are not only easy to learn, but if you have worked on one GUI, you would probably figure out the nuts and bolts of another quite easily. On the other hand, to use command lines efficiently you would require prior knowledge of (probably complicated and cryptic) commands (we are talking a serious learning curve here), with a relatively weaker guarantee that two command line interfaces are going to be similar. Yet, the enormous power of manipulation they offer, make them a formidable contemporary of the GUI and a favorite of developers/administrators (and something that Google hackers swear by).

Fundamentally, what GUIs do is tell users what commands to the system are relevant in the current context of work (apart from graphically displaying the context). For example, if you are on your windows desktop, and right click the mouse, the GUI lists the commands that are relevant here (e.g.”Refresh”, “Arrange Icons”, ”New” etc.). When you are reading a MS-Word document, the GUI now presents the user a host of options to choose from (File related options:”Open”, “Save As” etc. Help related options: “Check For Updates” etc.). And when you right click your mouse over an open ms-word document, the GUI does not list the “Arrange Icons” command this time; It believes that the command is irrelevant in the particular context. Thus a GUI:

(1) is all about clearly defining a context, with a set of user friendly commands (and the user does not need

to know the
exact syntax of these commands beforehand)
(2)allows the user to execute a command without actually having him type it in – the command is already out
there, on the screen – an effortless mouse click is all that’s needed to execute it. So, life’s good.

It is interesting to think about whether a command line interface also defines a context. Its very hard to see how, when all you can see is a prompt. What I am driving at is that GUI was probably the first widely popular paradigm that introduced (or at least popularized) the idea of clearly defining contexts. Of course, we take it for granted now. A command line interface is not bound to a context, and thus, in this sense is freer. It has a no-nonsense attitude that basically says you get what you type (and if you mess up, you got what you deserved!).

There are some drawbacks to GUIs though. Scalability is a big one: a GUI is good when we have a small number of commands that you can allow the user to choose from. Bigger the number, more cumbersome the GUI becomes, till a point when you realize that probably a command line substitute might be neater. The nature of this challenge can be guessed when one thinks of implementing the Google search phrase above with a GUI (and, this isn’t just about one search phrase, but the family of such phrases that is accepted by Google).

To take another example lets look at the following situation and decide whether it would be wiser to opt for a GUI as against a commandline: I subscribe to a particular newsletter (via mail). Since I haven’t checked my mails for the past few days, and I plan to store the contents of the newsletters I have received in the period, on my local disk, I would have to mechanically sift through these mails (after I have searched them and got them listed), open each of them and copy the contents onto a local file. And to crown it all, if I am using a trickle-down dial-up connection, this job can be quite exacting in terms of time, money and patience. I don't need much convincing here to realise that this is where I would be right at home with a good command line interface that I can put inside a 'code' or 'pipe' or manipulate somehow (or, if this is something that I do regularly, I might even consider writing a screen-scraping script for it – anything to not depend on the GUI. Of course, we might have a GUI to do this for us, but then that would be a different GUI, with a specialized functions, which only stands on the side of my argument).

Apart from the problem of scalability, the commands displayed by a GUI cannot be used as elements to build “bigger” commands or commands with more functionality (okay, there are macros, but they are more like sequentially defining actions –more on that in a while). That’s to say, the commands cannot be combined together, which restricts a user to the set of commands already provided. Contrast this with the freedom a UNIX shell (the command line interface) provides. Ideas like piping (streaming the output of one command to the input of another – much like the two “intext” criteria that we have used in the sample search phrase above, where the output pages of the first “intext” criterion is considered as input to the second) and command substitution (plugging the command output into another context) remarkably expand the scope of functionalities of existing commands . And what’s more is users can have these commands sequentially executed by listing them in a script – without any intervention needed (returning to macros again, they come close to this behavior, but there’s a lot they cannot do. For example, they usually work within an application, can’t be made to handle errors easily, etc.). Then there's the question of exercising your creativity too - piping/command substitution let you 'create' your versions of a solution to a problem, in a trouble-free way - which, I feel, adds to the excitement of using them.

Summing it up, the GUI as an innovative interface medium has certainly more than fared well. But the GUI revolution has been here for some time and now that we have toyed with it enough to discover its not-so convenient aspects, its probably time we analyzed the command line (again) for its strengths and look for a more promising interface (which proabbly would be the right combination of the two?).


(a)There are a few other factors GUIs and command lines maybe compared with respect to. Some are:

(1) Resource intensiveness: A command line is not as resource intensive (in terms of memory) as

a GUI.
(2) Better Control of OS: Someone who has worked with both the Linux command line and its GUI

will tell you
that command line provides better control of the OS.
(3) Multitasking: Both command lines and GUIs can multitask. But GUIs enable surprisingly easy

monitoring of the tasks (Your web browser is downloading a file, while you are happily typing
away into your blog listening
to your favorite band playing – and the great part is you can see all of this happening.)

My thoughts in the post are primarily motivated by the usability of an interface.

(b) For those interested,
here’s another article on command line vs. GUIs. This article mentions a project called Enso at, that aims at integrating a command line to your GUI. That is really putting it very vaguely and to do full justice to the wonderful project you must watch their demo video on the home page. Enso is trying to blur the lines between contexts in a GUI – rather, it tries to define a super-context, that’s a bit of both command line and GUI.

(c) A small aside: are tools making us dumber? An interesting post
(d) I recently came across this - a desktop UI system called Oberon - quite interesting to look at since it seems to have taken an evolution path different from most contemporary systems.