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?

"...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.

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...."
Quoted from: Complete Works of Swami Vivekananda Volume 6 (The Methods and Purpose of Religion)

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:
  • 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)
I did all this, and it worked perfectly fine and the build was successful.

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?

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?
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?

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' :

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?

Dare you open the box?

Sunday, October 09, 2005

'Cat'chy Reality

I recently finished reading this book. It is an awesome read if you are interested in what reality is and where modern physics is pointing to. It looks like the distinction between scientists and spiritualists is blurring away. The way you look at the world starts slowly changing. Especially the many worlds interpretation is a very interesting one. After reading it I have started thinking in that way unconciously.
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.

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.
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.

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:

(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:

(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.