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!

13 comments:

Mohan K.V said...

Very nice! The d-pointer link is extremely interesting, our beloved Qt uses it hajaar. Hmm, must read up on it!

Mahesh Mahadevan said...

Yes, the beauty of Open Source software - what better place to use such a brilliant concept!

do i really need a blog said...

by the way, the line most often quoted in an engineering class definitely is "there are no free lunches in life".

Mahesh Mahadevan said...

@Abhishek - to be really precise, I should say: TANSTAFL
"There ain't no such thing as free lunch".
Quite iconic indeed.

PS: Since your profile isn't public, I don't even know who you are! Please leave a link to your blog :)

Santhosh Suresh said...

Come to think of it, I did read Alice in Wonderland again. :D I must add that it was certainly different from how I had felt a few years back;

And as for the D-pointer, the mimicking nature of the cat is being rather well shown. However, there are many other kinds of pointers, which do the same thing in different implementations. Smart pointer is one of them. ;) Smart indeed.

Hari Vishnu said...

true about alice in wonderland..its a book thats been mentioned in many other philosophy/metaphysics/... etc books... and ofcourse we cant 4get morpheus in matrix..

definitely gotta read up that book once more..

the d-pointer funda was sexy too..

Anonymous said...

On the other hand, bodily physical fitness is priceless and can be achieved more proficiently and for much less
income than what you will pay for Bowflex Greatest two Household
Health and fitness center.

My site - SITEMAP

Anonymous said...

You may carry out far more than 140 health club high quality physical exercises.


Feel free to visit my homepage - additional reading

Anonymous said...

So does it definitely do because it claims?



Feel free to visit my website ... http://www.getfitnstrong.com/bowflex-dumbbells/3-reasons-bowflex-selecttech-552-dumbbells/

Anonymous said...

With its capabilities and structure, utilizing the device proficiently demands a little
little bit of familiarization on the controls.



Here is my web site - free weights for sale used

Anonymous said...

PowerBlock works by using a pin alignment process
to established selected bodyweight and several customers report
that it usually is tough to obtain the pins lined up with all the weights on the ground.


my web page please click the following internet site

Anonymous said...

Understand that motion will not be restricted in resistance training; your body need to be supplied entire independence in the course
of schooling.

Also visit my webpage - please click the next web page

Anonymous said...

I particularly do aerobic things to do three days a week, complete my twice-weekly strength exercise sessions in a very "circuit" trend which would
make them also aerobic, and stay lively on my off times.


My blog - click the up coming article