Archive for June, 2007

A Simple Matter of Software

Wednesday, June 20th, 2007

This is one of the best blogs devoted to software engineering. My favorite posts from this blog are

Don’t just test, change how you code

Lessons from Iwo Jima

I really like how Kerry explains best practices for all facets of software engineering. From actual programming to team morale everything is covered with great insights.

A simple rule

Wednesday, June 13th, 2007

Log errors. If you call an API and it returns an error code. Log the error code.

Ideally at the verbose level also log the parameters to the API but in any case log the error. This means for every API that you call you must first check for an error. I wasted half a day of my life troubleshooting code that failed to follow this simple rule.

The new Updated windows Live Writer

Tuesday, June 12th, 2007

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.