Archive for November, 2008

Statements about genetics I just don’t understand, part 2

November 29, 2008

(Part 1)

We can work against our genes (e.g., by using contraception)

It’s like saying “We can violate the law of gravity, e.g., when we put an apple on a table, it doesn’t fall down.”

The weird part is that Dawkins “himself” states this, after explaining that child-bearing is not always evolutionarily optimal. This statement is part of the “free will” problem: on one hand, we think one should act according to some rules called “ethics”, on the other hand, the world is more or less deterministic, and everyone always acts according to the laws of physics, so “should” is meaningless.

“It hasn’t evolved yet” is an invalid argument

This one is really quite reasonable: Sometimes, when a researcher is confronted with a phenomenon that he can’t explain in evolutionary terms, he says “the evolutionarily better behavior/form/whatever hasn’t evolved yet.” Clearly, this is not an explanation, as it can explain anything.

On the other hand, in some cases the conditions have changed only recently, and a species hasn’t adjusted itself yet. I think in this case the author carries the burden of proof that the change is recent.


Statements about genetics I just don’t understand, part 1

November 28, 2008

I just can’t understand how anybody can believe in one of the following statements (unless they believe in genetics rather than accept it as a scientific theory).

Natural selection doesn’t apply to humans

This is some sort of snobbish belief in the modern human’s being the last of creation. There is no reason to think we are special in this regard. It is true that (in developed countries) natural selection doesn’t push us toward physical strength and against diseases, as it used to, but still people with certain traits have a higher chance to survive than others, and some people are more sexually attractive than others.

The interesting thing, though, is that the changing of the qualities favored by the evolution of modern man is much faster than evolution itself. For example, immunity to pneumonia has stopped being important only about three generations ago. So evolution keeps changing directions all the time. However, this has started only quite recently, so it’s hard to say whether and when this will end.

Variant: Natural selection has been replaced by meme selection

Memes are important, no objection to that, and evolve much faster than genes. But that doesn’t mean genes have lost their significance. Memes are on a higher level than genes, just as biology is on a higher level than physics. But nobody says that, since animals are governed by biology and genetics, they don’t obey the laws of physics!

There is no kin selection (rejecting the gene-centric view)

For example, why do worker bees attend to their sisters rather than having children of their own? According to the idea of kin selection, because they have common genes with their sisters. Zahavi, however, rejects kin selection. Although he agrees that animals “should” rear their young, he doesn’t extend this to siblings. I suppose this opinion must be based on a very specific formulation of the idea of evolution and natural selection, that doesn’t contain the word “gene”.

(Part 2)

Serializing non-default-constructible objects with boost

November 18, 2008

Boost serialization is not trivial for an object that has no default constructor. Consider this:

class Foo
	int v1;
	int v2;

	Foo(int v1_) { v1 = v1_; }

	template <typename Archive>
	void serialize(Archive& ar, unsigned int version)
		ar & v1;
		ar & v2;

binary_iarchive ar;
Foo foo(0);
ar >> foo;

We only suffer a minor inelegance because of redundantly initializing foo. But what if we need to deserialize a pointer?
Hint: it won’t compile

Maintaining version numbers

November 14, 2008

In our company, we have the following policy about version numbers:

  • Each release has an ID in the form major.minor.release.revision
  • major, minor and release are numbers, arbitrarily invented for marketing purposes. They are product-specific.
  • revision is the SubVersion revision number the release is built from, returned by SubWCRev.
  • Each executable or DLL in the same release of a product has the same 4 numbers in it, visible in its Properties dialog in Explorer in the “Version” tab. This tab takes the numbers out of a resource.

I set out to fulfill the requirements as non-redundantly as possible. (more…)

Using Excel for analysis

November 10, 2008

Excel is a great analysis tool. A lot of people know that creating an Excel-readable report from your program is simple: just write your data into a text file, separating the columns by spaces or tabs. Here are some less-known features:


Family trees and Unicode

November 4, 2008

This is about an experience with internationalization and Unicode I’ve had recently.

My uncle has our family tree in an old version of Family Tree Maker (FTM). I figured family trees should be on the Net, like Google Documents, because they are common to so many people. A quick search revealed the existence of at least three family tree hosting sites. However, our tree is in Russian, in an 8-bit character encoding, so I had to take care of i18n.

Of the three sites, two used the Latin-1 character set, and so wouldn’t show Russian at all. (more…)