Tuesday, June 28, 2005

What do I look for in a fresher (Techie again!)

Lots of enthusiasm! loads of them.

Really high energy levels.

Unbounded approach: Need to clear up this a bit. A fresher has the openness to ask a question to anyone.

Freshness: They bring a very fresh perspective to the aging team!!! Yes, this is very essential.

Willingness to learn: Seek out opportunities to build knowledge about everything around!

My juniors at college were just awesome to be with. Many of them are very good friends of mine. Any team game, they were winners always! I used to ask them questions (what else but Techie :-) ) and they used to come up with answers with loads of enthusiasm. Some of my best times were with them!

Another group of students from RVCE had so much of enthusiasm in them that you couldn't just stop noticing their energy levels. They were a great lot to be with. Needless to say, some of them are very good friends of mine!

To my juniors and the RV guys: Thank You for making me learn a lot of things!

-ramanarpanamastu

Monday, June 27, 2005

acm.uva.es

This is one of my favourite links! i've solved 11 problems, but sadly, have not submitted any solution from a long time!

Many submissions went for the Cat in the Hat problem. It always left me wondering: how can so many cats fit into a single hat? i was ecstatic once i became the tailor who made hats!!! :-)

i will talk more about these later, but, you've got to solve one problem to relate to what i feel.

Bhatta was the one who introduced me to this link and it is a hard link created :-)

Wednesday, June 22, 2005

delegate :)

That's what everyone would like to do, right?
i will write mostly techie stuff here...see the name??? :-)

Here is a bit from the C# world. delegate is a keyword and more...

What does a dictionary say a delegate is?
We probably just want to see what the verb form means: to give power to someone to do something. Moving a little ahead: someone gives power to someone else! So, there are 2 sides to the delegate!

Bingo! we just hit the basic thing for a delegate now!!! 2 sides...so, in OO terms, we need 2 objects.

Just as an aside, i once had this situation wherein i wanted a static delegate and i even tried put to in such neat looking code that would never compile :) ...i realized the mistake!!! at times, i go off in such a patch applying mode that i just want to get things done :) i believe it is good to spot mistakes you made and correct them! Back here then.

delegates are perfectly OO is what MS says, and so they are once you realize this much. so, when you subscribe to a delegate, what you are doing is sending your identity to the delegate provider, who in turn can use your identity to delegate things when needed (it is like being pro-active to get more work from someone who is looking out for people to get their job done :-) ).

During program exection, your object's instance is stored with the provider and that instance is used to invoke a method inside your object (Now you ask: How else can you invoke an object's method? Now...that triggers a Q: can my method be a specified as a private accessor?)

Aren't delegates simple enough now? Delegation is always simple...once you know who is going to do your job ;-)

Adding some more because my friend Karthik wanted a little more clarity! We both agree that pasting a piece of code will not suite, so here is an example:
Say, there is a date provider who has a delegate that my application (in this case, a license validator) subscribes to. Suddenly, there is a date change, so, the provider fires off the delegate and it lands up right in my app. This is when (and where) I can do the kind of validations for this date change. In essence, date provider delegated this change to me!

-ramanarpanamastu

Your quote goes here!

Imagine my state of mind when i understood what B. Stroustrup meant with this quote at the beginning of his chapter on templates in the TCPL. I could not believe it!!! Those 4 words just meant what the whole chapter was to unveil. If you understand these 4 words, you understand templates!!! :) I have this habit of going off to my friends and talking about this. I am sure they
are smiling when they read this!

Just think of the amount of thinking that has gone into making this book. Awesome.

For those who do not understand what i write, here goes:
Templates (in C++) are a way to generate your own types at run-time.

In the non-Templates world:
Say, if you wrote a stack class and bound it to int type. Now, suddenly you realize that you need the same for string type, what you do is to use the same code for int stack, and just change the type to string.

Welcome to the Templates world:
To prevent code replication (by you!), you just write a template and pass your type parameter to it and voila, you have a new type ready in a jiffy. so...

Your type goes here!!!
-templates.

-ramanarpanamastu