The new Updated windows Live Writer

Time to experiment again. This post was created with the latest version of Windows Live Writer. Here is an attempt at embedding code

#include <stdio.h>;

/* the n-th fibonacci number.
 */
unsigned int fib(unsigned int n) {
  unsigned int a = 1, b = 1;
  unsigned int tmp;
  while (--n >= 0) {
    tmp = a;
    a += b;
    b = tmp;
  }
  return a;
}

main() {
  printf("%u", fib(10));
}

Since I had some problems entering code with the wysiwg editing capabilities of Wordpress I want to see if Live Writer does this better.

C++ function resolution

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

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.

More Self Esteem

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

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

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

Nicholas Negroponte

Scenario, simple and Fast

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.