From the last couple of years, I have been more active here, and more active in general.
Life is indeed beautiful, and gets more and more beautiful everyday..
Sunday, June 05, 2011
Friday, February 20, 2009
School to career
Pixar University's Randy Nelson explains what schools must do to prepare students for jobs in new media.
If you’re interested in learning more about one of the world’s truly innovative companies, watch this video (it’s only 10 min).
If you’re interested in learning more about one of the world’s truly innovative companies, watch this video (it’s only 10 min).
Monday, June 30, 2008
The Erlang Exchange
Thanks to Dennis Byrne, I got the opportunity to attend and present at The Erlang Exchange in London, on the 26th and 27th June.
I thoroughly enjoyed those two days at the conference - lots of interesting sessions, lots of erlang gurus and a lot of technology enthusiasts.
I got to speak to a so many new people in those couple of days and had lots of interesting conversations.
Here is my account of the event as I saw it.
I thoroughly enjoyed those two days at the conference - lots of interesting sessions, lots of erlang gurus and a lot of technology enthusiasts.
I got to speak to a so many new people in those couple of days and had lots of interesting conversations.
Here is my account of the event as I saw it.
Friday, June 27, 2008
Separation of concerns
{ :tech_stuff => Concrete Abstractions, :others => Chain of Thoughts}
I don't want to mix the two people in me... So let there be two blogs, one for each of myself.
I don't want to mix the two people in me... So let there be two blogs, one for each of myself.
Thursday, October 18, 2007
My fav road
Nanda road is my favourite one - one of the few roads where its a pleasure to walk or drive. Good to know that there's an effort to do something about it here.
Wednesday, December 13, 2006
Snow at Work
Probably the snow had taken off for the weekend. We knew that it was round the corner because of the clouds and the wind.
And promptly enough, on monday morning, just when we were having breakfast at the Hotel, it was back to work. It snowed and snowed, and continued to snow for hours together till afternoon. And what was left back was a whole new white picture of the place.
The old taxi driver says, "The sun'll come out soon and clean all this away". High hopes. But that that was just the beginning. For it again snowed after a couple of days, only heavier this time, accumulating more work for the sun. And also for a lot of people - people who clean the snow off the roads, the traffic police who'll have to be on the lookout for accidents, and so on.
It was just beautiful! The way the snow settles down on the ..on practically everything, is a sight to see.
With Christmas in the vicinity, all the trees and buildings are wonderfully decorated, and along with the snow adding to it, its all the more impressive. The festive mood strongly strikes one who walks through the streets.
By saturday, the snow again took a break and the sun started. It took more than two days to clear all the backlog and now the streets are back to their original colours.
But I don't think its for long, though. The snow is just lurking behind somewhere and will soon be back I'm sure.
P.S.: Click on the image for actual size
And promptly enough, on monday morning, just when we were having breakfast at the Hotel, it was back to work. It snowed and snowed, and continued to snow for hours together till afternoon. And what was left back was a whole new white picture of the place.
It was just beautiful! The way the snow settles down on the ..on practically everything, is a sight to see.
By saturday, the snow again took a break and the sun started. It took more than two days to clear all the backlog and now the streets are back to their original colours.
But I don't think its for long, though. The snow is just lurking behind somewhere and will soon be back I'm sure.
P.S.: Click on the image for actual size
Monday, October 30, 2006
Uniquely Singapore
My Diwali this time was spent in a unique way - in Singapore!!
Being my first visit outside India, it was a great experience.
To begin with, here are a few facts and comparisons (source):
Singapore, though has a very short history (of about 600 years), established its identity in the guild of nations of the world.
It is a very small country compared to India, being 699 sq.KMs(190th largest country) and having about 4 million people.
India is the 7th largest and has 3,287,590sq.KMs and more than a billion people (!!) (source)
But in terms of the GDP per capita, India(122nd place) is way behind Singapore(22nd place) (source)
Tourism is one of the largest industries of Singapore, with about 9 million tourists in 2005.
Singapore has a rich mixture of different cultures as it is mainly formed out of immigrants from Malay, Chinese, Indian, British among other places. From what I observed, the identity of singapore as a country has evolved as an amalgam of the different immigrants who have settled there.
The importance given to small details which may seem insignificant to us Indians, hit me right on the face. Be it the roads, or the cleanliness, or the infrastructure effort that has gone into the architecture and planning, especially with respect to the tourists, it is commendable.
The blend of art and technology is visible everywhere. Its indeed very difficult to get lost out there, with all the indicators and helpful people. The creativity with which the places are built makes it a pleasure for tourists to spend time.
Well, they do have their own set of problems, which I wont go into now, but on the whole, it is a beautiful country.My visit made me learn a lot about India too, along with, needless to say, Singapore.

I am not trying to compare two nations and rate them or anything of that sort. The few days that I have seen in singapore is very trivial to make any such comparison. And also, as obvious from the facts, the scale at which these countries operate is totally different.
It was definitely a good decision to visit Singapore. Thanks to my sister who pushed for it the most, we decided to go in the last moment. I'll upload a few snaps when I get some time.
Majulah Singapura!! (Malay:"Onward, Singapore")
Being my first visit outside India, it was a great experience.
To begin with, here are a few facts and comparisons (source):
Singapore, though has a very short history (of about 600 years), established its identity in the guild of nations of the world.
It is a very small country compared to India, being 699 sq.KMs(190th largest country) and having about 4 million people.
India is the 7th largest and has 3,287,590sq.KMs and more than a billion people (!!) (source)
But in terms of the GDP per capita, India(122nd place) is way behind Singapore(22nd place) (source)
Tourism is one of the largest industries of Singapore, with about 9 million tourists in 2005.
Singapore has a rich mixture of different cultures as it is mainly formed out of immigrants from Malay, Chinese, Indian, British among other places. From what I observed, the identity of singapore as a country has evolved as an amalgam of the different immigrants who have settled there.
The importance given to small details which may seem insignificant to us Indians, hit me right on the face. Be it the roads, or the cleanliness, or the infrastructure effort that has gone into the architecture and planning, especially with respect to the tourists, it is commendable.
The blend of art and technology is visible everywhere. Its indeed very difficult to get lost out there, with all the indicators and helpful people. The creativity with which the places are built makes it a pleasure for tourists to spend time.
Well, they do have their own set of problems, which I wont go into now, but on the whole, it is a beautiful country.My visit made me learn a lot about India too, along with, needless to say, Singapore.

I am not trying to compare two nations and rate them or anything of that sort. The few days that I have seen in singapore is very trivial to make any such comparison. And also, as obvious from the facts, the scale at which these countries operate is totally different.
It was definitely a good decision to visit Singapore. Thanks to my sister who pushed for it the most, we decided to go in the last moment. I'll upload a few snaps when I get some time.
Majulah Singapura!! (Malay:"Onward, Singapore")
Friday, August 04, 2006
Hair Raising!!!
No! I'm not talking about my visit to Wonder-la. Yes, no doubt that was hair raising.
But I'm talking about literal hair raising - yes "hair raising".
Well, there's nothing serious about it. I had grown my hair quite long till last week (It was almost starting to touch my shoulder). Everyone around me was quite surprised and i saw different kinds of expressions. Some were of the opinion that it was horrible and i should get it cut as soon as possible, but there was a minority of them who showed quite positive reactions to it :-). Some asked me if I had taken a vow or an oath that till I do something I wouldn't get it cut and some others teased me saying that my girlfriend had probably ditched me and i had lost interest in life. I was being compared to all sorts of people ranging from musicians to saints to film actors to mythological characters and what not! There were very very few people who were totally indifferent to this and went on as normal.
Nevertheless, i continued growing my hair till I felt like doing it. Honestly, there was no other reason at all. And there need not be.
After about 6 months, one fine day I just went and got my haircut done and was back to my normal looks.
Now again all the reactions(fun ;-)) started. People who had liked my long hair started scolding me as to why I did this and lost my individuality! And others phewed sighs of relief and said that they could atleast see me now.
Again mixed reactions!
Anyway, my experiment ended here and I am "back to normal?"! Hahaha!
But I'm talking about literal hair raising - yes "hair raising".
Well, there's nothing serious about it. I had grown my hair quite long till last week (It was almost starting to touch my shoulder). Everyone around me was quite surprised and i saw different kinds of expressions. Some were of the opinion that it was horrible and i should get it cut as soon as possible, but there was a minority of them who showed quite positive reactions to it :-). Some asked me if I had taken a vow or an oath that till I do something I wouldn't get it cut and some others teased me saying that my girlfriend had probably ditched me and i had lost interest in life. I was being compared to all sorts of people ranging from musicians to saints to film actors to mythological characters and what not! There were very very few people who were totally indifferent to this and went on as normal.
Nevertheless, i continued growing my hair till I felt like doing it. Honestly, there was no other reason at all. And there need not be.
After about 6 months, one fine day I just went and got my haircut done and was back to my normal looks.
Now again all the reactions(fun ;-)) started. People who had liked my long hair started scolding me as to why I did this and lost my individuality! And others phewed sighs of relief and said that they could atleast see me now.
Again mixed reactions!
Anyway, my experiment ended here and I am "back to normal?"! Hahaha!
Saturday, July 15, 2006
Universe.random();
How to destinguish a "true" random number from something else is often difficult to decide, since the concept of randomness is itself somewhat difficult to define. What is universally agreed is that any "random number generator" based solely on deterministic computation cannot be regarded as a "true" random number generator, since its output is inherently predictable. John von Neumann once famously said "Anyone who uses arithmetic methods to produce random numbers is in a state of sin", thus neatly summarizing the situation.
- Wikipedia (Random number Generator)
For eg., if you use a single random number generation algorithm and initialize it with the same seed twice, it generates the same sequence of random(??) numbers.
Yes, there are random number generators which use chaotic sources to generate "high quality" random numbers. But in the end, all they seem to use is the inherent randomness in the universe to generate random numbers.
This is in fact pointing to something quite fundamental.
Is there anything thats actually random in this universe?
Look at this now:
What exactly is chaos? The name "chaos theory" comes from the fact that the systems that the theory describes are apparently disordered, but chaos theory is really about finding the underlying order in apparently random data (see here).
To look at an example,
The flapping of a single butterfly's wing today produces a tiny change in the state of the atmosphere. Over a period of time, what the atmosphere actually does diverges from what it would have done. So, in a month's time, a tornado that would have devastated the Indonesian coast doesn't happen. Or maybe one that wasn't going to happen, does. (Ian Stewart, Does God Play Dice? The Mathematics of Chaos, pg. 141)
David Deutsch, in The Fabric of reality, goes on to conclude that given enough computational resources, it is possible to build a virtual reality generator whose repertoire includes every physically possible environment (The Turing principle).That is what makes reality comprehensible. Which kind of says that the universe in itself is completely deterministic.
- Wikipedia (Random number Generator)
For eg., if you use a single random number generation algorithm and initialize it with the same seed twice, it generates the same sequence of random(??) numbers.
Yes, there are random number generators which use chaotic sources to generate "high quality" random numbers. But in the end, all they seem to use is the inherent randomness in the universe to generate random numbers.
This is in fact pointing to something quite fundamental.
Is there anything thats actually random in this universe?
Look at this now:
What exactly is chaos? The name "chaos theory" comes from the fact that the systems that the theory describes are apparently disordered, but chaos theory is really about finding the underlying order in apparently random data (see here).
To look at an example,
The flapping of a single butterfly's wing today produces a tiny change in the state of the atmosphere. Over a period of time, what the atmosphere actually does diverges from what it would have done. So, in a month's time, a tornado that would have devastated the Indonesian coast doesn't happen. Or maybe one that wasn't going to happen, does. (Ian Stewart, Does God Play Dice? The Mathematics of Chaos, pg. 141)
David Deutsch, in The Fabric of reality, goes on to conclude that given enough computational resources, it is possible to build a virtual reality generator whose repertoire includes every physically possible environment (The Turing principle).That is what makes reality comprehensible. Which kind of says that the universe in itself is completely deterministic.
Friday, June 23, 2006
The "Right" choice!
... or should I have said "Sahi"!!
Recently I had to give a demonstration to the customer about our approach to functional testing in my project. So I gave a demo of how Sahi works and how intuitive and powerful it is - and needless to say, they were impressed. Not with my presentation skills obviously,(I know that i suck at those things) but with the way Sahi works. Whether they will use it or not, I dont know, but one thing is for sure - I was even more convinced about this after the demo.
See for yourself if you don't believe me. There are lots of Web automation and testing tools out there and I'm not trying to compare. But the choice of a tool should not come in the way of development or maintaining the application. It should have minimum interference with the application but still achieve the purpose. And you should be able to extend the tool to your needs. And I think Sahi goes a long way in achieving all this. It just works like a charm. Well, I won't talk about what all it can do... just visit this and have a look.
Good job Narayan!
Recently I had to give a demonstration to the customer about our approach to functional testing in my project. So I gave a demo of how Sahi works and how intuitive and powerful it is - and needless to say, they were impressed. Not with my presentation skills obviously,(I know that i suck at those things) but with the way Sahi works. Whether they will use it or not, I dont know, but one thing is for sure - I was even more convinced about this after the demo.
See for yourself if you don't believe me. There are lots of Web automation and testing tools out there and I'm not trying to compare. But the choice of a tool should not come in the way of development or maintaining the application. It should have minimum interference with the application but still achieve the purpose. And you should be able to extend the tool to your needs. And I think Sahi goes a long way in achieving all this. It just works like a charm. Well, I won't talk about what all it can do... just visit this and have a look.
Good job Narayan!
Friday, May 19, 2006
Of principles and prophets...
There is a lot of heated debate and protests going on against the storyline that indicated that Jesus Christ had married Mary Magdalene and that their union resulted in a bloodline that continues till date. (here and here)
Such protests are not new. They keep happening every now and then, for books/movies and every kind of media. What is the root cause of such fanaticism in people?
Such protests are not new. They keep happening every now and then, for books/movies and every kind of media. What is the root cause of such fanaticism in people?
"...So in every religion you find there are the three stages: philosophy,mythology, and ceremonial. There is one advantage which can be pleaded for the Vedanta, that in India, fortunately, these three stages have been sharply defined. In other religions the principles are so interwoven with the mythology that it is very hard to distinguish one from the other. The mythology stands supreme, swallowing up the principles; and in course of centuries the principles are lost sight of. The explanation, the illustration of the principle, swallows up the principle, and the people see only the explanation, the prophet, the preacher, while the principles have gone out of existence almost - so much so that even today, if a man dares to preach the principles of Christianity apart from Christ, they will try to attack him and think he is wrong and dealing blows at Christianity. In the same way, if a man wants to preach the principles of Mohammedanism, Mohammedans will think the same; because concrete ideas, the lives of great men and prophets, have entirely overshadowed the principles.Quoted from: Complete Works of Swami Vivekananda Volume 6 (The Methods and Purpose of Religion)
In Vedanta the chief advantage is that it was not the work of one single man; and therefore, naturally, unlike Buddhism, or Christianity, or Mohammedanism, the prophet or teacher did not entirely swallow up or overshadow the principles. The principles live, and the prophets, as it were, form a secondary group, unknown to Vedanta. The Upanishads speak of no particular prophet, but they speak of various prophets and prophetesses. The old Hebrews had something of that idea; yet we find Moses occupying most of the space of the Hebrew literature. Of course I do not mean that it is bad that these prophets should take religious hold of a nation; but it certainly is very injurious if the whole field of principles is lost sight of. We can very much agree as to principles, but not very much as to persons. The persons appeal to our emotions; and the principles, to something higher, to our calm judgement. Principles must conquer in the long run, for that is the manhood of man. Emotions many times drag us down to the level of animals. Emotions have more connection with the senses than with the faculty of reason; and, therefore, when principles are entirely lost sight of and emotions prevail, religions degenerate into fanaticism and sectarianism. They are no better than party politics and such things. The most horribly ignorant notions will be taken up, and for these ideas thousands will be ready to cut the throats of their brethren. This is the reason that, though these great personalities and prophets are tremendous motive powers for good, at the same time their lives are altogether dangerous when they lead to the disregard of the principles they represent. That has always led to fanaticism, and has deluged the world in blood...."
Saturday, April 29, 2006
Time to Synchronize...
I came across a weird situation a couple of months ago when I was setting up CruiseControl with Subversion.
There is a Subversion server on which our source code resided and I was setting up Cruise on another machine which was supposed to be our CI build machine.
Steps I followed:
But I found that later whenever some code gets checked in, cruise somehow was not picking up any modifications at all. After struggling a lot with the configurations and searching on the web I shot a mail to one of the people behind CC and quite soon, I had the answer.
There was a simple mistake that was causing Cruise to behave randomly. The problem was that the system time on the Repository server and the time on the cruise control box was not synchronized. There was some 5-6 hour difference between the two. CruiseControl checks for modifications that have happened after a given time. So if the time is not synchronized, obviously it wouldn't find modifications!
This is very important whenever CruiseControl and the Source repository are on different machines:
Make sure that the time/date on the cruise box is synchronized with the time/date on the repository box.
Btw, This may be helpful.
There is a Subversion server on which our source code resided and I was setting up Cruise on another machine which was supposed to be our CI build machine.
Steps I followed:
- Download and install CruiseControl
- Do an initial checkout from the repository into the Cruise projects directory
- Change the sample config.xml to set the build interval, repository location, publishing results etc etc.
- To verify, force a build. (or checkin to the repository and see that it kicks off a build)
But I found that later whenever some code gets checked in, cruise somehow was not picking up any modifications at all. After struggling a lot with the configurations and searching on the web I shot a mail to one of the people behind CC and quite soon, I had the answer.
There was a simple mistake that was causing Cruise to behave randomly. The problem was that the system time on the Repository server and the time on the cruise control box was not synchronized. There was some 5-6 hour difference between the two. CruiseControl checks for modifications that have happened after a given time. So if the time is not synchronized, obviously it wouldn't find modifications!
This is very important whenever CruiseControl and the Source repository are on different machines:
Make sure that the time/date on the cruise box is synchronized with the time/date on the repository box.
Btw, This may be helpful.
Saturday, March 25, 2006
Questions!!
Last weekend I had been to Karwar with a few friends. We had a nice time there with lots of watersports like coracling, canoeing, rafting, kayaking, wind-surfing etc in the beaches of Karwar. In the evening, we went on a trek over a hill and landed in another beach, pitched our tents there and spent our night. It was just awesome.

I couldn't sleep that night. I was just watching the stars and the waves and the forest. There were hills on three sides and the endless ocean on the other. It was a silent night with only the sound of waves. Lots and lots of questions in my mind. Questions about the why and how of the universe; questions which would have probably crossed the mind of most of us, but still remained as questions. Questions about the approach of science to explain the universe and the approach of spirituality for the same.
Why do such questions come to our mind? Why does man want to explain the universe?
Why can't we get the answers?
- answers anyone?

I couldn't sleep that night. I was just watching the stars and the waves and the forest. There were hills on three sides and the endless ocean on the other. It was a silent night with only the sound of waves. Lots and lots of questions in my mind. Questions about the why and how of the universe; questions which would have probably crossed the mind of most of us, but still remained as questions. Questions about the approach of science to explain the universe and the approach of spirituality for the same.
Why do such questions come to our mind? Why does man want to explain the universe?
Why can't we get the answers?
- answers anyone?
Tuesday, January 10, 2006
The Downside(?) of Simple Design
I was chatting with this friend of mine and he was telling me about his project. He was saying that the software that they (his team) are working on has evolved to a stage where adding new functionality to their application has become very simple. Probably it might at the most, just involve implementing an interface with a few simple methods.
The design is so simple that on a day-to-day basis, they wouldn't need to use any brains at all for working on that software. That set me thinking...
Is it really possible that you can arrive at a stage where the design is so much maintainable, flexible, and whatever?
Maybe.
But is it the time to stop thinking about the design of the software?The design is so simple that on a day-to-day basis, they wouldn't need to use any brains at all for working on that software. That set me thinking...
Is it really possible that you can arrive at a stage where the design is so much maintainable, flexible, and whatever?
Maybe.
No.
I think That is the time to sit back and look at the design from one level higher. That might be the time to try to bring in some domain language. That might be the time to figure out a way to automate the day-to-day tasks. That might be the time to bring in a new paradigm to the software. Maybe AI, maybe functional programming. I don't know the possibilities.
Bottomline: It is the time to take "The Next Step".
Wednesday, October 19, 2005
Del.icio.us code
I came across this snippets site and I think its a damn good idea. You can store some interesting code snippets which you might have come across on the internet and it is available always. Very similar to del.icio.us but this is for code snippets.
I have come across a lot of times when I say or hear other people say something like: "Oh! I had done this before somehow...but i seem to have forgotten it!" or "I had seen the soution to that when i was searching for something else but I dont know where on the web I found that code".
Hmm...Why dont I come up with ideas like this which are very simple but are so useful?
I have come across a lot of times when I say or hear other people say something like: "Oh! I had done this before somehow...but i seem to have forgotten it!" or "I had seen the soution to that when i was searching for something else but I dont know where on the web I found that code".
Hmm...Why dont I come up with ideas like this which are very simple but are so useful?
Wednesday, October 12, 2005
The Cat ate my source code
This post is related to my previous post
This one is from 'The Pragmatic Programmer - From Journeyman to Master' :
Dare you open the box?
This one is from 'The Pragmatic Programmer - From Journeyman to Master' :
Time for a little quantum mechanics with Schrödinger's cat.
Suppose you have a cat in a closed box, along with a radioactive particle. The particle has exactly a 50% chance of fissioning into two. If it does, the cat will be killed. If it doesn't, the cat will be okay. So, is the cat dead or alive? According to Schrödinger, the correct answer is both. Every time a sub-nuclear reaction takes place that has two possible outcomes, the universe is cloned. In one, the event occurred, in the other it didn't. The cat's alive in one universe, dead in another.
Only when you open the box do you know which universe you are in.
No wonder coding for the future is difficult.
But think of code evolution along the same lines as a box full of Schrödinger's cats: every decision results in a different version of the future. How many possible futures can your code support? Which ones are more likely? How hard will it be to support them when the time comes?
Suppose you have a cat in a closed box, along with a radioactive particle. The particle has exactly a 50% chance of fissioning into two. If it does, the cat will be killed. If it doesn't, the cat will be okay. So, is the cat dead or alive? According to Schrödinger, the correct answer is both. Every time a sub-nuclear reaction takes place that has two possible outcomes, the universe is cloned. In one, the event occurred, in the other it didn't. The cat's alive in one universe, dead in another.
Only when you open the box do you know which universe you are in.
No wonder coding for the future is difficult.
But think of code evolution along the same lines as a box full of Schrödinger's cats: every decision results in a different version of the future. How many possible futures can your code support? Which ones are more likely? How hard will it be to support them when the time comes?
Dare you open the box?
Sunday, October 09, 2005
'Cat'chy Reality
Let me try to put it in as few words as possible:
The Cat paradox
Imagine a box that contains a radioactive source, a detector that records the presence of radioactive particles, a glass bottle containing a poison such as cyanide, and a live Cat. The detector is switched on for just long enough so that there is 50-50 chance that one of the atoms in the radioactive material will decay. If the detector does record such an event, then the glass bottle is crushed and the cat dies; if not, the cat lives.
We have no way of knowing the outcome of this experiment until we open the box to look inside.
The whole experiment is governed by the rule that the superposition of both the outcomes of this is real until we look at the experiment, and that only at that instant of observation does the decision happen and one of the outcomes is seen.
The Many worlds Interpretation
This theory says that both the outcomes of the experiment are equally real. The surprise is that according to this theory there is not one real cat but two. There is a live cat, and there is a dead cat; but they are located in different worlds.
Faced with the decision, the whole world - the universe - split into two versions of itself, identical in all respects except that in one version the atom decayed and the cat died, while in the other the atom did not decay and the cat lived.
It sounds like science fiction but it goes far deeper that any science fiction. It is a truth stranger than any fiction.
Sunday, August 28, 2005
Capitalized!
I had not blogged for quite sometime now. The reason is that I am now in Delhi (Gurgaon) for a week now and I was busy setting up stuff. We are put up in a hotel in gurgaon. We are here doing 'consulting' (whatever that means) for a client of ours.
This is my team standing in front of our office excepting one who is taking the snap. Will put up nicer snaps when I get the time to shoot. This project seems to be challenging in terms of client facing, communicating, convincing, etc. Lets see how it goes. But one sad thing is that I had to cancel my trip to Leh because of this project. But as long as there is something new to learn,I am for it.
This is my team standing in front of our office excepting one who is taking the snap. Will put up nicer snaps when I get the time to shoot. This project seems to be challenging in terms of client facing, communicating, convincing, etc. Lets see how it goes. But one sad thing is that I had to cancel my trip to Leh because of this project. But as long as there is something new to learn,I am for it.
Sunday, August 07, 2005
Face the Music
Most of the people around me listen to music while working. I see them with ear-phones/ headphones, nodding their heads, enjoying their music, and their work. Even I have tried that lots of times, and miserably failed. I have found that if I am in the midst of something serious and interesting, which requires a lot of my concentration, I just can't listen to music. If I am listening to it, I lose the hang of whatever I am doing and my mind gets involved in the music.
The music just takes over the whole of my mind and I sort of lose my context completely.
I don't know. It might be that I am poor at concentration, or it may be that I am more interested in music, or it might also depend on what kind of music I listen to.
But, whatever it is, this is how I am...
Tuesday, August 02, 2005
What is meant by Data?
I saw a very interesting piece of code in the SICP. It took quite sometime for me to understand it completely. In fact, the meaning flashed to me today during my morning jog!
In a programmer's perspective, what exactly is data?
This is a very subtle concept. Very difficult to explain.
Example: consider the notion of a 'pair' in lisp. A 'pair' is a way of glueing two pieces of data. This is how I will probably explain it:In a programmer's perspective, what exactly is data?
This is a very subtle concept. Very difficult to explain.
Data is something that is constructed and behaves in a particular way. i.e, What data is, is determined by how it behaves.
How do you say this programmatically? - Data is that which is defined by constructors and procedures, together with specified conditions that these procedures must fulfill in order to be a valid representation.
How do you say this programmatically? - Data is that which is defined by constructors and procedures, together with specified conditions that these procedures must fulfill in order to be a valid representation.
(define z (cons x y))
(car z) => x
(cdr z) => y
We never actually said what a pair was, only that there are procedures cons, car, and cdr for operating on pairs. But the only thing we need to know about these three operations is that if we glue two objects together using cons we can retrieve the objects using car and cdr.
The interesting thing is that any triple of procedures that satisfies the above condition can be used as the basis for implementing pairs. This is one such triple:
The interesting thing is that any triple of procedures that satisfies the above condition can be used as the basis for implementing pairs. This is one such triple:
(define (cons x y)
(lambda (m) (m x y)))
(define (car z)
(z (lambda (p q) p)))
(define (cdr z)
(z (lambda (p q) q)))
This point is illustrated strikingly by the fact that we could implement cons, car, and cdr without using any data structures at all but only using procedures. This blurs the distinction between 'procedure' and 'data'. Procedure <---> data. Data <---> procedure. Hmm...I need to think.
Subscribe to:
Posts (Atom)