Friday, April 06, 2007

The story quoted most often, in a science/engineering class...

...just has to be 'The Blind Men and the Elephant'. The story, I must say, is of deep importance in understanding what the goals of science are. We are all but blind men, trying to understand what the elephant is. Each of us is at a different place/viewpoint, and hence, we all infer differently about it. But ultimately, we are just blind. It has to be made clear, though, that we aren't blind by choice, although some do choose to be, and I have no need to speak of them.



Ah, the arguments go on, and we still think the elephant is but a snake, a spear, a broom, a wall, a pillar, a winnow; and many of us would just have to stick to our opinion. Yet, it's fun being blind.

The other big-time story that is quoted just has to be Alice in Wonderland. Now, let me get to the point of why this is being written about. A few days back, we had our last lecture class of the course, 'Introduction to Turbulence'. The course was being taken by a new faculty, Dr. Prasad Patnaik. It used to be taken by Prof. N. R. Panchapakesan, a known god in the field. There was adequate mention of his work during the classes. Things went rather slow (probably, owing to the post-graduate audience), but there were many things in the course that I have enjoyed. The references in the course were just the thing in this semester's courses. We had ample links and book chapters to read, and not one source was boring. For what little we have learnt, there is still a long way to go - which is why I had to mention what he showed us in his last class.

There was the mention of the story of the Blind Men and the Elephant. What each of us has learnt from the course largely depends on where we are looking. How very true. Alice in Wonderland hadn't figured yet. And then it happened. The reference was to a dialogue with the Cheshire Cat. It was intended to tell us about what to do with what has been taught in the course. It goes like this:


“Would you tell me, please, which way I ought to go from here?”
“That depends a good deal on where you want to get to,” said the Cat.
“I don’t much care where–” said Alice.
“Then it doesn’t matter which way you go,” said the Cat.
“As long as I get somewhere,” Alice added as an explanation.
“Oh, you’re sure to do that,” said the Cat, “if you only walk long enough.”


The sheer brilliance of this statement just astounds me. I feel like reading the whole book all over again now. The beauty of Alice in Wonderland is in the fact that, as a kid, one would see the beautiful and fancy wonderland; and as an adult engineering/science/philosophy student, one sees the amazing references made to all kinds of scientific and philosophical concepts, controversies and things like that. So, as the Cheshire cat said, you're sure to get somewhere, if only you walk long enough.

A quick read through the Wikipedia page for the Cheshire cat, and I found this nice factoid. Cheshire cat is also a name used in C++ programming, for a data type that hides its implementation using a pointer. The amazing part is the example given, exactly in dedication to the Cheshire cat.

class Handle {
private:
struct CheshireCat; // Not defined here
CheshireCat *smile; // Handle

public:
Handle(); // Constructor
~Handle(); // Destructor
// Other operations...
};


and then, the implementation

#include
"handle.hpp"

struct Handle::CheshireCat {
... // The actual implementation can be anything
};

Handle::Handle() {
smile = new CheshireCat;
}

Handle::~Handle() {
delete smile;
}

Keep smiling, Cheshire cat!