Facebook

Friday, February 13, 2009

Blog for Darwin — The notion of fitness

It's Darwin's 200th birthday, a good day to look back at the life and works of a man who changed the course of science and civilization, in many more ways than he expected, I would imagine. It's also a good time to reflect on how we understand evolution today, both in the scientific study of life (and other things that evolve, it's not just for life any more), and in our broader worldview, as metaphor and justification for everything from art to politics.

"Fitness" is one of those words that pops up in every discussion of evolution, but which turns out to have almost as many meanings as people using it. The varied meanings have led to confusion, uncertainty, and doubt in public discussions of evolution, and one deep misunderstanding led to the political movement for "eugenics", which cast a shadow over the public discourse on evolution for a generation or more. This same misunderstanding is at the heart of "Social Darwinism", a pernicious political philosophy that is still popular in some circles today.

Darwin saw fitness as the measure of how well an organism can survive to pass on its heritage (genetics and the biochemistry of reproduction was as yet unknown when Darwin wrote Origin of the Species). It consisted, he said, of 3 attributes:
  • Survival or mortality selection - Organisms that survive at least to the end of their reproductive phase are fitter than those who don't, because they're likely to have more offspring.

  • Mating success or sexual selection - Many species have some form of mate selection process which makes some organisms more likely to mate or likely to mate more often and thus produce more offspring.

  • Family size or fecundity selection - The more mature offspring (that is, those that live to reproduce themselves) produced by an organism, the fitter it is. This takes into account the two major reproduction strategies:

    • produce as many offspring as possible, putting as little resource into each as possible (squids, for instance, do this),

    • produce fewer offspring, putting significant resources into each, to increase each one's chances of making it to reproductive age (humans do this).
For many years, the popular notion of "fitness" was that there was an actual measure that could be attached to an organism, as if there were one number that summed up all the attributes of fitness. This was the idea that the Eugenics movement advocated: that it was easy to determine which individual humans were more fit, and which were less fit, and that to prevent those less fit from reproducing would improve the overall fitness of the human race.

Even many scientists who were not experts in the theory of evolution thought that fitness was measurable: computer simulations of evolution (see Tierra, for example) that used a simple measure of fitness that seemed successful in terms of demonstrating the evolution of new forms of life were offered as evidence for this position. Unfortunately, such programs are fundamentally limited in what can evolve within them (see below), and so the statistics of the changes in them don't match those we find in biological evolution.

Evolutionary theory has itself evolved in the last half century or so to include concepts from mathematics and physics like the thermodynamics of information, and algorithmic complexity theory. An algorithm is a precise set of instructions for carrying out some computation; all computer programs are implementations of one or more algorithms. But it turns out that fitness cannot be measured algorithmically; some aspect of an organism's fitness that isn't part of a given algorithm for measuring fitness may have a major effect on the organism's ability to survive or reproduce if the environment of the organism changes. And as new traits evolve, any one of them may have an effect on the organisms fitness that isn't measured by a given fitness algorithm.

To see why this is so, consider the K-T transition, the short period between the Cretaceous and Tertiary eras when the dinosaurs went extinct. The current (still somewhat controversial) consensus theory is that the long-term effects of the impact of an asteroid in Central America changed the Earth's climate so that the entire food chain many animals were dependent on was disrupted. What algorithmic measure of fitness for a given individual of one dinosaur species could take all such possible catastrophic changes into account? And what measure of fitness for the mammal species that survived would include all the characteristics that let them survive? Yes, it's always possible to create a fitness measure that includes any given set of characteristics, but it's not possible to create a fitness measure that includes all characteristics that might, under any circumstances, have an affect on selection of an organism. There's no way to predict what characteristics any organism may have in the future, let alone what characteristics will be selected for or against.

In that light, it seems that fitness depends on all the attributes of an organism in connection with all the aspects of its environment, where the environment includes all the physical aspects of the world that it interacts with, as well as the attributes and actions of all other organisms that it interacts with. And that those attributes and actions are the result of the process of evolution, which is not itself algorithmic or predictable in any useful way.

In a sense, fitness is a tautological concept: an organism is fit if it survives to have mature offspring; one organism is more fit than another if it produces more mature offspring than the other. There's no way to predict which organisms are fitter; it's possible to make reasonable bets based on the probability of survival and reproduction of an organism with a given genome in a given environment, but impossible to predict how that environment may change in detail at the level of each organism.

So if the Eugenics movement was wrong in trying to measure fitness and use the measure to evaluate people's worth in evolutionary terms, what strategy might work to maximize the potential fitness of the human race? Remember, we're talking about humans here, so this strategy can be consciously-planned. One strategy is to retain a level of diversity within a population of organisms so that there's a repository of attributes that might be useful in the event of changes in the population's environment. In other words, don't try to optimize the population by making them all perfectly-fitted for the current environment, but leave some room for fitness in changed circumstances. And, of course, don't try to measure fitness, because you really can't. This is clearly not a perfect strategy, but then nothing about evolution is perfect. Evolution is concerned with what works using what's available.

If you want to get deeper into the nature of fitness, and how it fits into the overall process of evolution, here is a brief, eclectic, and personal list of books and websites related to that subject. It's a list of writings I've found interesting, not necessarily all the influential writings, or even a good survey of the important positions on the subject. The authors of these books are not necessarily in agreement, in fact, there's some rather acrimonious debate among them.

The Extended Phenotype - Richard Dawkin's take on natural selection, fitness, and what it is that is actually selected.

The Spandrels of San Marco and the Panglossian Paradigm - Stephen Jay Gould and Richard C. Lewontin's famous critique of adaptationism. "Spandrel" has entered the technical vocabulary of evolutionary theory because of this paper.

Darwin's Dangerous Idea - Daniel Dennet's exposition of a sort of Darwinian fundamentalism. Fascinating, well-written, and not quite right (IMHO) on the question of whether evolution can be an algorithmic process.

Stephen Jay Gould's Reply to Dennet - It gets hot and heavy in here; neither Gould nor Dennet is shy about attacking other's positions and defending their own, no holds barred.

Saturday, January 24, 2009

More Dog Pictures

Here is a slideshow of some more recent, and better, too, pictures of Jemma and Spencer (click on a photo to see it full size). We've had them six months now, and they're working out very nicely. Not to say they don't have problems, but we expected more than we've had. And they are really cute ...

Thursday, January 22, 2009

Let's Object to Torture on "24"

HumanRightsFirst.org is collecting signatures on a petition to the producers of "24", the TV show that has shown 89 instances of torture committed by US government agents. The petition points out that torture is known to be an ineffective and often counter-productive way of collecting useful intelligence, and that showing its use by Americans has given Americans the idea that it is both useful and acceptable, and given many in other countries the idea the Americans are willing to commit acts explicitly against their own morality and laws. Please join me in signing this petition.

Monday, January 19, 2009

Back to Life in the New Year

OK, it has been awhile. The last few months have been full of twists and turns, and a lot of stuff to deal with, but we seem to be slowing down a little now, so I'm taking some time to bring this blog up to date. A quick list of some of the things we've been dealing with, and in the next (real soon now) post I'll put up some more pictures of the dogs.

  • On the dog front: Jemma had to have surgery for her ear infection; it was very successful, but in the process we discovered that she has (or at least temporarily had) some sort of auto-immune clotting problem; we've been treating that successfully, but part of the treatment is Prednisone, which makes her ravenous; we've had to be satisfied with holding her weight steady; getting her to lose some weight will have to wait.
  • I don't really need a new car now — oops, guess I do after all: I had been thinking about buying a new car; with the economy the way it is, I decided to put it off for at least 6 months. Then someone ran into the back of my car and totalled it. So now I have a "new" 2004 Volvo wagon, the first car I've bought in 12 years, and the first I've owned with all wheel drive. I got it just in time for the really nasty string of storms we have from just before Christmas to just after New Year's Day. Which would have been really terrific, I could have cruised the icy streets in safety (that car handles really well on ice and snow; I'm impressed) except ...
  • Cue the storm: the first Sunday morning of the storm, about 8, we were awakened by a loud noise from the other side of the house. A large tree in our side yard had come down and was resting on the driveway and the deck, and had just missed the back of the car. It turned out there was no damage to the house, but it took us 4 days and a lot of money to get the tree cut up and hauled off without it taking out the deck. The tree blocked the driveway for that time, so I couldn't get the car out.
  • Smooth operations: A couple of months ago I started planning to have surgery at the end of December; it was a relatively new operation that relieves chronic back pain resulting from compressed nerve roots, which I've had for the last 8 years or so. All was going well until my medical insurance refused to cover the operation. A lawyer and two appeals later, they're still not going to cover it. One possibility is for me to pay for it myself, since I can probably get it done for about one third of what the hospital will charge, but ...
  • I'm a statistic: in the beginning of November I was informed that my job was going to be eliminated as of the end of the year. The job market being what it is, I haven't found another job yet. The good news is that I have medical insurance through COBRA (paperwork still going through), the bad news is costs (almost literally) an arm and a leg.
So what does this all mean? I've decided to treat being laid off the way Travis McGee treated the time between cases: I'm taking my retirement in pieces. So we'll use unemployment to pay for medical insurance, and pay living expenses out of retirement savings (which weren't as badly hit by the stock market tanking as a lot of people; I was getting ready to retire soon anyway, and was in the process of moving out of the stock market and into bonds and other income assets). When I find a job, I'll unretire for awhile, until the economy improves enough to make retirement practical. In the meantime I have a lot of books I've been planning to read, a novel I've decided to write, and if I get bored I can always download courses from MIT and learn economics or astrophysics. So I'll have fun.

Saturday, August 9, 2008

New Additions to the Family

We've been threatening to get a dog again, and now we've adopted not one, but two dogs. We'd originally planned to get them last Monday, but couldn't get everything ready in time, and then we realized that on Tuesday, the roofers would show up and decided to wait. Good decision.

Tuesday reminded me of that scene in The 5,000 Fingers of Doctor T where they're touring the dungeons, and Terwilliger shows them the poor wretch who's been imprisoned in a giant bass drum while someone beats on it. The roofers wanted to get the entire job done in one day, so they threw a crew of 6 or 8 at it, and went at it like gangbusters (or maybe eardrum busters). The dogs would have gone nuts; we almost did even though we went out for a couple of hours.

So Wednesday we went to the shelter, and after wanting to take home just about every dog we saw (there were a lot of Border Collie and Australian Shepherd mixes; our last dog was a Border and we fell in love with the breed), we found a pair of older dogs who'd been kenneled together. When we took them out for a meet and greet, they were friendly with us, and got along well with each other, so we adopted them.

There was a strategy in this. We've always had large working breed dogs; the Border, at 45 pounds, was the smallest dog we'd ever had. But now we're neither of us up to giving a dog like that the exercise it needs, and there's nothing worse you can do for the physical and mental health of a dog than not get it enough exercise. This is also true of children; in fact, there are so many similarities that we got a lot of our child-rearing techniques from a book on dog-training written by a Hollywood dog wrangler. So we were looking for small dogs; these guys are both small and past the young adult stage, so their need for exercise is (at least theoretically, see below) lower now.

One of the dogs is a Lhasa Apso female named Jompa, about 9 yo, and the other's a Rat Terrier male, Spencer, who's 6 yo. They're settling in fairly well, though the terrier turns out to be a bolter who can get through our chain link fence in seconds. The good news is that it's not running away, just the urge to explore, because he will come back. The bad news is we live on a busy street, and he doesn't have good car sense, so he's now on a leash whenever we go out, and will be until he's obedience trained.


ETA: our bolter is starting to learn to come back when called. I lost him at the Arboretum that we've been taking our dogs to since we moved to Portland 30 years ago, while trying to hang onto both leashes and get a stool sample for the vet (I need to get a couple of extra arms). But I yelled for him, and he came back and let me grab his leash again.


Neither of these dogs was ever trained in any way as far as we can tell, though they're housebroken and they recognize their names. Worse, the terrier has scars where a harness was put on too tight and left on him all the time, and he flinches from loud voices and criticism. So we have some work to do to win the dogs over (though after only twofour days they're both willing to cuddle and be petted by us, which is a very good sign).


We've taken them to the vet, and had some good news and some bad news. Jompa has an ear infection, a sore mouth where 2 teeth were extracted, and is a little overweight. On the other hand, she's healthy in other respects. Spencer has developed kennel cough since we brought him home from the shelter, and seems to have an allergy to grass. But we've got medicines to deal with most of this, and they are fairly good about taking them (Jompa doesn't like getting stuff squirted in her ear, but she doesn't get angry and snappish, and she doesn't hold a grudge afterward. All in all we're really pleased with the dogs, and we think they'll fit in very nicely.

Wednesday, July 30, 2008

Birthday Season!

It's the peak of the season now; Eva's birthday (7/29) has come and, until my birthday (7/31) we'll be the same age, then I pull ahead again. Jeremy's birthday (6/1), Eva's brother Steve's birthday (6/27), and his daughter Rachel's birthday (6/17)are all in June, Alex's birthday was a few days ago (7/19), and his wife Melissa bats cleanup on 8/4. Party ON, dudes!

Tuesday, July 8, 2008

Of Languages and Wheels

I want to take a brief detour in my journey in the land of software rants. This rant would have gone deeper into the notions of reflection and introspection and how they affect the ways in which systems can be extended, topics I raised last time in talking about the relations between data and metadata. I'll get to that, trust me, it's one of my favorite parts of computer science, but for now I want talk about the Tower of Babel and the Great Wheel of Reincarnation. These are old ideas in the computer world, but I'm beginning to think that a lot of practitioners haven't heard about them, or don't understand that they're getting caught by them.

The Tower of Babel arises wherever implementors have to use multiple programming languages and/or multiple programming paradigms in a single application. Now, that's not necessarily a bad thing; sometimes it takes more than the functionality you can find in just one tool to do the job. But to see how this can be a problem, look at the goulash that webapplications are often made of. For an example, I'm working on an application now, a manufacturing system that serves up assembly instructions, keeps track of the work flow at each station, and provides instructional content creation functions. It's not very complex now, though in later phases of development more functions will be added. In order to serve up dynamically created pages of content on a web page, in even this simple an application the following progranming languages were used:
  • Java was the programming language for the model objects that represent the basic functionality of the application: assembly procedures, the steps of a procedure, the parts and the tools used in the assembly. It's also used for the business logic managers that manipulate the model, and the http request actions that control the generation of the pages*.
  • An Object-Relation Mapping system called Hibernate is used to persist the model objects in the tables of a relational database; Hibernate is a Java class library that maps Java method calls to SQL Database queries. It is configured to define the persistent objects and the relational tables using a mixture of Java annotations on the model class source files and xml configuration files.
  • The mapping of input HTTP requests to page display and navigation are controlled by a combination of different annotations and yet more xml files, part of another framework called Webwork.
  • What is displayed on a page is programmed using Java Server Pages, a framework that allows to combine html, tag markup in several different tag dialects, fragments of Java code, and an expression evaluation language called OGNL.
  • After the page display HTML is generated it is modified by Freemarker expressions and Sitemesh decorators which each affect some set of pages with common transformations.
  • And some of the interaction on the pages is programmed in the html and tags of the JSP, while some is programmed to run on the client webbrowser using JavaScript and an interaction paradigm called AJAX.
  • The whole application is integrated using a Java framework called Spring that is responsible for creating and initializing the objects used by all the other pieces, which again requires annotations and xml files for configuration.
To implement this application requires half a dozen different technologies and languages; it was originally built by 2 people, and is currently maintained and enhanced by 1 person, who has to use all those tools and be constantly watching for the problems that arise because of incompatibilities among them (and, believe me, they arise).

I haven't even mentioned the apache webserver and tomcat application server that have to be configured for the application, and if I were to describe, even at the highest possible level, what each of these pieces I have mentioned does, I'd be writing a book, not a blog entry.

Just as in the story of the Tower of Babel, the challenge is for all the parts to be able to communicate well enough that the whole can function, and the problem for a software developer is the same as for the general contractor on the Tower: get everybody to work together so that each worker's output is what the next worker needs as input, even when none of them understand each other directly.

The Tower of Babel, despite ita name, is actually more horizontal than vertical, if you think of layers of software in the usual manner as divided from each other vertically. There are several layers in the system I described above, but the various languages and technologies aren't necessarily confined to single layers. The second problem I want to talk about is more a vertical one, involving multiple, often many, layers.

The Wheel of Reincarnation sounds like something from Buddhist theology, but in this case it refers to an insight by Ivan Sutherland into what designers often do wrong in trying to optimize layered systems.

For this rant, the key point of Sutherland's discovery is this:
The pit fall of reincarnation of function is still with us. Sometimes the layers are inhomogeneous which leads to conceptual costs, namely it is too hard to understand the layered systems. Sometimes the inhomogeneities linger in legacy architectures long after their original justifications are forgotten.
In other words, be careful how you layer things, because the layers may become permanently buried under yet more layers. And sometimes the functionality of a layer or layers has to be undone or redone by layers above, because it doesn't quite match the requirements of the upper layer.

In fact, the Wheel of Reincarnation is the explicit policy of some computer technology developers. Intel, for instance, calls it the "Silicon Treadmill": first you write software to perform a task on the current generation of processors, then you identify key parts of the code which can be optimized by putting specialized functionality (asy, by writing microcode) into the processor, then you design a special chip to implement the functionality completely in silicon. An example is the logical layer of the ethernet protocol. At first, it was implemented completely in software, then general purpose processors were modified with extra on-chip memory for buffers, and finally a specialized chip was designed to do the entire logic layer functionality.

Now take the Tower of Babel and build layers on the Wheel using it. Do that iteratively for a few turns of the Wheel, and try to figure out what you've got. Finding out will involve using techniques very like the ones that archaeologists use to investigate the various cultures that have used a midden over time: carefully peeling away a layer at a time and examining how all the parts you find fit together. But even if you figure out how it works, you can't change it and make it work differently, or fix a bug in it. And that's why knowing about the Tower and the Wheel might make a designer think twice about decisions that could cause someone great distress in years to come.


* If you're familiar with the Model-View-Controller architecture for interactive applications; the model objects are the Model aspect and the actions are the Controller aspect (along with some JavaScript on the pages). The View aspect is comprised of the Java Server Pages, containing JSP tags, Webwork tags, OGNL expressions, Freemarker markup, and Sitemesh decorators.

Wednesday, June 25, 2008

Viva La Resistance!

I just sent an email to Senator Ron Wyden, D. Oregon, thanking him for attempting to stop the FISA bill, whose corporate immunity provisions are almost surely going to allow Bush, Cheney, and the rest of the gang that's currently raping and pillaging our way of life in the name of their own power and profit, to get out of the White House with all the swag they can carry and no chance of any sort of accounting.

If your Senator was one of the 15 who voted against cloture, send him or her an email, or a phone call, and let them know you appreciate what they did. If your Senator was one of the 80 who voted for cloture, to stop Senator Dodd's filibuster, let them know how despicable an act it was.

Follow the link above to Firedoglake, where the vote, and its significance to rescuing democracy from kleptocracy in the US is discussed in detail.

Voting against Cloture and for the Constitution:

Biden (D-DE)
Boxer (D-CA)
Brown (D-OH)
Cantwell (D-WA)
Dodd (D-CT)
Durbin (D-IL)
Feingold (D-WI)
Harkin (D-IA)
Kerry (D-MA)
Lautenberg (D-NJ)
Leahy (D-VT)
Menendez (D-NJ)
Sanders (I-VT)
Schumer (D-NY)
Wyden (D-OR)


Not Voting:

Senator Kennedy had a good excuse, he's seriously ill, but the rest of them?

Byrd (D-WV)
Clinton (D-NY)
Kennedy (D-MA)
McCain (R-AZ)
Obama (D-IL)

Thursday, June 12, 2008

More Reflections On Software

A few days ago abi sutherland blogged about how artists and software designers are not in control of the outcome of their work, with particular application to devices and contrivances that are intended to be extended and customized by end users. That pushed some buttons in my head, and I posted a comment on the subject, which I've extracted below. I have some more to say on the subject, which I thought only fair to say on my own blog, so more posts will follow at less than the usual irregular intervals, I hope.


Oh-oh, you hit one of my current hot topics. I feel a rant bubbling up; I must take on my Aspect and wield my Attribute.

The system I'm working on now has some major design problems because some fundamental issues about valid character sets and the use and communication of metadata mixed with data weren't addressed at all. These things are central to building a system that's flexible, extensible, and allows mashups to be created without knowledge of the system internals (preferably without any sort of deep technical knowledge at all*).

I've been thinking about the sort of design criteria that are important in software that can meet these requirements. Here are my first thoughts; I'll continue on my own blog as they develop, but you got the juices flowing now, so I'll begin here if you don't mind.

1. Quoting is vital. It must be easy to encapsulate any string of valid data (e.g., text characters, images, the basic vocabulary of a web page) so that the system can treat it as an opaque object except where the data really is meaningful. It shouldn't be necessary for an admin or someone extending the system to deal with escaping characters significant to parts of the system, like '&' and ';' in HTML, or ''' or '"' in SQL literal strings, or (oh, help me Noshabkeming!) spaces in filenames. Always remember that a filename can come from most anywhere.

2. Metadata is data to any system that doesn't have to process it. Opaque objects have to remain opaque unless the software really needs access to the insides. Accidental access is a good creator of truly diabolic bugs. I created a test case yesterday with an object whose name contained an apostrophe. This caused the web application that read the name from the database to crash.

3. Objects shouldn't have to have knowledge of each others' lifecycles. If an object is created in one system and another system creates another object to collaborate with it, then either the first has to exist for as long as the second needs it (and that's often not easy or even possible to guarantee), or the second system has to make sure that it copies everything the second object needs from the first, without creating any issues of staleness of the copies during the life of the second object (and that's as close to an intractable problem in a distributed system as I know about). Anybody who's ever slaved over request-scoped webapp variables has been bitten by this one.

Akk! This is growing from a screed into a tome; not what I intended. I'll stop now and go get ready for work. Let me know what you think of this.

* Librarians are technically-oriented, but don't necessarily have specific knowledge about the administration of software, especially web-based systems. The manufacturing workers who administrate my system are not technically sophisticated at all; they're bright people, but don't have technical educations, so they're not familiar with some basic concepts that would make it easy for them to create a mental model of what they can do with the software. And I can't expect to train them in something that's irrelevant to their jobs.

Friday, March 28, 2008

Blog Against Torture - Not Just Today

No matter how busy I may be, I'm not too busy to say something against the use of torture on the day that Bear reminds me is Blog Against Torture Day. Nor will I forget the subject after the day ends.

An example of why torture is not only evil but also profoundly counter-productive. This is something I wrote, a draft of a newspaper ad, after hearing about the case of Abdallah Higazy. One important thing to remember is that, come to the end of the case, the FBI was more concerned that their mistakes would be covered up than that the job of securing the country would be performed effectively.


The US Government coerced a false confession from an innocent man by threatening to have his family turned over to be tortured by Egyptian security police. Is this what you want your government doing in your name?


Abdallah Higazy was interrogated by the FBI on the basis of information that the Justice Department later admitted was partly incorrect, partly the lies of an informant who has been charged with lying to the FBI. In order to get a confession, Higazy was told his family would be arrested and that the interrogator would “make sure that Egyptian security gives [his] family hell.” Higazy was later released because the original information that led to his arrest was false.

Ask yourself what you would do to protect your own family from a security service with a world-wide reputation for torture and other barbaric practices, a security service that trained many of Saddam Hussein’s torturers. Would you give a false confession, knowing it would probably destroy your own life, if you were told it would keep your family from harm? Abdallah Higazy did. So the FBI obtained a false confession, that they had to know was suspect because of the way it was obtained, and they wasted resources on this case at a time when all of our resources need to be focused on finding and eliminating the terrorists who have caused the US so much harm.

But even more, is threatening a father with the rape and torture of his daughter an act worthy of the United States of America? We believe it is not, that it is an act worthy of Saddam Hussein, the very dictator the US committed military forces to remove from Iraq. Furthermore, we believe it is an act so vile that we want to make clear to the world that we do not condone it and will not allow our names and our honor as citizens to be used to justify it.

We, the undersigned, believe that what the US government does reflects on the honor and integrity of US citizens. As citizens we object to our government committing illegal and immoral acts, and we want other citizens to be aware of what their government is doing so that they too can object. We urge you to take a stand on this issue, to tell your Congressional Representatives and Senators that this kind of behavior is not what America was founded for.