Monday, April 24, 2006

The Journey of Man

If you haven't seen it, try to check out the PBS documentary 'The Jounrney of Man'.

I watched it with some friends on Saturday night and it was the first movie in a long time that caused so much discussion.

Here's the summary: by analysing the Y chromosome of people from around the world researchers were able to build a tree / map of how people migrated over time. Breifly:

  • Until 50,000 years ago, everyone was chilling in Africa
  • Drought caused by the looming ice-age drove one group of people to follow a coastal route through India and to Autstralia.
  • About 40,000 years ago, there was a big branching out of people from central asia - two groups moved east to China, one group moved down to India. Another group headed far north-east.
  • From the north-east, one group returned west to beome europeans and the rest trudged on eastwards in the arctic circle.
  • About 10,000 years ago around 20 people survived the crossing across Beringia (the land mass that was exposed when the Bering Strait water levels were low). Within 800 years they multiplied and inhabited the whole American continent.

That means that, only about 2000 generations ago, our ancestors were all buddies, chilling in Africa.

The documentary is a little slow but seeing portraits of people around the world makes the similarities so apparent - it's definitely worth watching.

Thursday, April 06, 2006

exceptions

A coworker lent me an amazing book: Framework Design Guidelines. Yes, yes, it's an MSFT book and talks about the .NET platform and is thus, by definition, evil. But it's still a phenomenal book and full of bits of wisdom.

Each time I've picked it up, I've wish I could condense it into a cheat sheet and paste it to my monitor while coding. The following excerpt is not exactly groundbreaking, but something I wish I could remember when I design APIs:
It's OK for exceptions to have a property returning some kind of error code, but I would be very careful about this. Each exception can carry two main pieces of information: the exception message explaining to the developer what went wrong and how to fix it and the exception type that should be used by handlers to decide what programmatic action to take. If you think you need to have a property on your exception that would return additional error code, ask yourself who this code is for. Is it for the developer or for the exception handler? If for the developer, add additional information to the message. If for the handlers, add a new exception type. (pp. 184/185)

(I'm sure I'm guilty of adding a stupid error code to an exception)