Saturday, February 02, 2008

PZ Myers on Algorithmic Inelegance

Dr. PZ Myers of Pharyngula fame has on article in Seed Magazine talking about the algorithmic inelegance of genetic instructions. He compares genetic code to the design and development of computer programs. The basic idea here is that an intelligent designer can create a work of algorithmic excellence that couldn't have occured by random mutation such as what naturally occurs in evolution.

"The designers of software usually aspire to economy of code, clarity in its operation, and powerful algorithms that, with mathematical and logical beauty, do the work of generating a sophisticated result."

He does note that there are still the ubiquitous “Kludges” and hacks in the software we use.

"We tend to look down on the "kludge," the clumsy addition to fix a problem, or the brute force approach of working case by case to force a desired result (although, to be sure, I've seen enough code to know that the awkward hack is ubiquitous)."


Since PZ is a biologist, he has the opportunity to examine nature's code in detail. He goes on the talk about the "invisible hand of evolution: the evidence of random accidents."

However, what we more often see is the action of the invisible hand of evolution: the evidence of random accidents that have been incorporated into the code, of elaborations built of bricolage, a collage of bits and pieces assembled into a larger structure. Life is a collection of kludges taped together by chance and filtered by selection for functionality; it all works magnificently well, but if you look under the hood you are simultaneously appalled by the sheer inelegance of the molecular gemisch and impressed with the accumulation of complexity.


It would be inappropriate for me to critique PZ's essay from a Biologist standpoint. My only exposure to biology is reading PZ’s blog and high school biology class.

I am a programmer and have been working in the IT industry since 1996. I can tell you from first hand experience that once a code-base reaches a certain size and level of complexity, logical elegance in design becomes less and less of a concern. The emphasis becomes, "Just make it work."

At the start of the project the design team works out a beautiful object-oriented model of all of the components and various interactions. This is done to help manage the complexity and make the system easier to maintain down the road.

Once the main design phase is over, the grunt work of actually implementing the system may or may not follow the exact specifications laid out by the designer(s). Sometimes features are added in the middle of a project and the only way they make it in is to come of up with a kludge or quick hack.

After the software goes into production, the customer often comes back asking for additional changes to meet their specific needs. This often results in even more kludges and hacks. What starts out as logical beauty begins to show a few warts and wrinkles as time goes on. The visible hands of coders can result in an evolution of sorts of the software system.

You can also write a program that randomly mutates itself. Since the program is in essence data, that data can be over-written. In this way, a computer program can mutate into something that looks different from the original. Virus programmers sometimes write this functionality into their creations to get past the detection software. That functionally still requires a designer.

My point is that just because something looks like it was a patched together collection of hacks, doesn't mean it started out that way. Is evolution by design or by random accident? I'm not making any assertions either way. I know that a program that is the result of random self-mutation seldom does anything useful or elegant. The fact that it can change itself is a product of design

No comments:

Post a Comment