C++ function resolution

May 24th, 2007

I earn my living writing C++ code these days. Everyday I learn something new and interesting about this language. Many languages have a simple core, if you understand a few basic principles you can understand how most of the language works. C++ has a lot of esoteric features and no guiding principles that to borrow a term from human computer interaction allow the programmer to develop expectations. I think the reasons for this are historical.
Reading Lippman’s Inside the C++ Object model and Stroustrup’s Design and Evolution of the C++ Programming language I am amazed by how much attention was paid to match C in performance

f()
{
   a.f()      // resolved at compile time (not polymorphic)
   p->f()     // resolved at runtime
}

The static resolution is a feature. The C++ compiler writers were trying to avoid the single instruction cost of vptr dereferencing. For a programmer this means that just marking a function as virtual does not mean that the most overriden version will be invoked. To ensure that every invocation must also be polymorphic. Also there is a principle at work here. You do not have to pay for what you do not use.

Asempra Product Review

May 21st, 2007

I work at Asempra as a software developer. A few days ago I saw that someone came to this blog searching for “asempra product review”. This blogpost is just to point such people to asempra.com.

That being said I am surprised that this blog ranks high enough to be shown in the result sets for such a query.

My parents went to Leh Ladakh

February 17th, 2007

and all i got was this article ;-)

Leh_Ladakh Article 1

Leh_ladakh Article 2

More Self Esteem

February 14th, 2007

From Overconfidence —> Incompetence Humility —> Success

You don’t want to be demoralizing, needlessly tearing at the fabric of your self-esteem, but at every turn, you do want to be saying: “Well, that’s not quite good enough — I can do better.” In fact, it seems to me that you want to attach self-esteem to the process of becoming better, instead of letting it become attached to any static result. That way, you can be critical of a performance and not become demoralized about what it says about you as a person. The self-criticism actually becomes a self-esteem booster because you feel good about doing the hard work to constantly improve.

The South

January 31st, 2007

It’s a place where some hicks still proudly fly a flag from a war they lost in order to keep their slaves.

Wil Shipley

Nationalism

January 27th, 2007

I think nationalism is a disease and it’s a disease that has really hurt the world.

Nicholas Negroponte

New post at Valleygeek

January 22nd, 2007

go check

The action is somewhere else

January 17th, 2007

Posting here is going to be even more infrequent. Check valleygeek.org to see what I am upto.

Scenario, simple and Fast

January 10th, 2007

 

In Steve Job’s keynote yesterday there was a mention of Jim Allchin’s desire to buy a Mac. Today the context in which Allchin made that statement has been revealed. In his email Allchin keeps reiterating “scenario, simple, fast’. Any software developer should take these words to heart. The order of these three words is also significant. The most important thing for any software is it’s usage scenario.Usage scenario help in making the right tradeoffs while designing software. But for the few lucky people who write device drivers and are constrained by the operating system interface on one end and the device interface on the other, all other software developer need to pay a lot of attention to the design of the interface that their software presents. As far as the user is concerned the interface is the software. She does not care how extensible, modular the software is. Nor is she bothered if it uses the latest technology or is Web 2.0 compliant ;-) . All the users want is to achieve their goals with the minimum effort.

More definitions

January 10th, 2007

from the Union Square Ventures blog on Founders and Management. What is a business?

it’s a collection of people who have been organized in attempt to profit from offering a product or service to the marketplace.