Tuesday, September 13, 2005

Learning should have deep roots

I am taking a class in advanced C++. To be frank, I learnt a lot of new things from the class. The learning is permanent when I get to learn how things work. There are times when the instructor expects us to remember things as rules without explaining the reason behind it. These are things, I feel we programmers forget easily. Having read Design and Evolution of C++, I know that Mr Stroustrup is a very sane person and would not do anything in the language that does not make sense.

Let me illustrate my point with a few examples

In C++ it is not possible to implement overloaded functions based on return type. This is certainly true, but why? There is an exception to this rule, overloading based on return types can be done using templates. This becomes extremely confusing unless you know the reason behind all these so called rules of the language. I found the answer to the above question in Annotated C++ Reference Manual. My experience makes me believe that a course in language design and compilers would be useful for all programmers working with a language. This would help in being able to reason with the rules.

In one of the train stations in Hong Kong, I saw an advertisement hoarding which stated

"Don't get her fish, it will last only a day, teach her how to fish and it will last a life time".

This was an advertisement about helping people with skill development instead of money. My request to all trainers and teachers out there would be

"Don't teach me the rules, teach me why the rules are designed to work that way, so that my learning is permanent".

Without permanent learning and the capability to deduce, comes the capability to confuse yourself and other people around you. We tend to veto everything stating rules as the reason, without understanding the reason for them in the first place. That is definitely a bad sign and if you find yourself there, its time for course correction.

3 comments:

Unknown said...

good point.

Gops said...

Again,
Thatz why I consider you as my role model for all tech stuff. You are one of the few people who would actually read the ARM to figure out why.

So, what do you think about our iostream discussion where the c'tor opens the file, now that you've done this course? ;)

Balbir said...

Thanks,

I would agree with you, but what I said about providing other helpers would make sense for programming conditions like embdedded systems. Lets meet and discuss all that.

Ranking and Unranking permutations

I've been a big fan of Skiena's Algorithm Design Manual , I recently found my first edition of the book (although I own the third ed...