Tuesday, November 3, 2009
Design Patterns From Evolution
Possibly the most useful lesson to be taken from evolution is natural selection itself: inheritance, variation, competition for scarce resources.
In terms of software development, this is a design pattern not used often enough. After all, software already has plenty of variation. There are scarce physical resources (e.g. cpu, memory, bandwidth), and strong selection pressures (e.g. human beings only have so much time, attention, and patience). Putting inheritance of some kind to work ought not be that heavy of a lift.
At some level, these forces are already at play. Software does inherit memes, and companies come and go. But I haven't seen a compelling implementation of natural selection within a system or tool I've used. Leaving aside the obvious design pattern of evolution itself, however, I think programmers would do well to use other design patterns more frequently. Some examples I can think of:
Spandrels
In biology, a spandrel is a trait that is a by-product of some other adaptation, and has not necessarily been selected for. Spandrels are inherited, but don't provide an evolutionary advantage. The hitch is, they don't provide a disadvantage either. So they get passed along, and some time down the road, they might prove useful after all.
Software developers should pay attention. When features can be added in such a way that they don't cost much attention from the user or cpu, bandwidth, and memory from the machine, they should be considered. I think the Semantic Web could easily develop as a spandrel- RDFa gets added into web pages and ignored until there is an ecology in which they can flourish. There are probably a thousand other possibilities for this.
The difficulty of course is that attention from programmers is one of the scarcest resources of all, so this kind of spandrel can only work if it arrives as a kind of Trojan on some other adaptation that is selected for (e.g. if Blogger.com starts sticking RDFa in blogs, and people keep using Blogger.com, RDFa becomes a spandrel).
Ontogeny
Organisms don't stay the same. Sometimes, as in the case of a tadpole/frog or a caterpillar/butterfly, they're really very different at different developmental stages. In software development, I feel like we get hung up in thinking software should work the same all the time. And there are advantages to that behavior (for example, then people can learn how to use it). But, it's profoundly limiting.
Games are one place where ontogenetic design patterns get used. Players can "unlock" new features and play the game in a profoundly different way as it progresses. Other kinds of software should learn from games. I think if people felt like they had to "earn" the advanced features they'd appreciate them more. Plus, by the time they'd gotten to using them, they'd have a use for them (hopefully).
Speciation
Speciation is one of the most widely understood evolutionary design patterns- in fact, Chuck Darwin wrote a great book about it a hundred and fifty or so years back. For the sake of biology, two organisms are from a distinct species if they are biologically incapable of producing a reproductive offspring. For example, a donkey and a horse might get it on, but the result will be a mule, and the mule can't make more baby mules.
But that's really a side issue. Software developers need to be ready to take advantage of speciation: when a system becomes useful for two distinct purposes, speciation should be strongly considered: allowing the software to become two different pieces of software, each developed for a different purpose.
Convergence
The flipside of speciation is convergence. Bats and birds. They can't breed, but from the standpoint of an ecology, they occupy a very similar space- compete for the same resources. Evolution would totally be awesomer if convergence resulted in bat/bird hybrids. But it doesn't.
It doesn't really work in software either. But going back to the bat and bird example, bats sort of took over the night by being able to get around in the dark, and birds sort of took over during the day by being able to get around when it's light. But they're functionally very similar. As such, when it's clear that an ecological software niche is emerging, programmers need to accept they can still be bats to the birds (Omniweb, for example, was kind of a crappy browser, but it was the only one that ran on NeXT- no innovation there, except they could see at night). It's not a bad way to go.
Any other thoughts from the biologists and programmers among us?
In terms of software development, this is a design pattern not used often enough. After all, software already has plenty of variation. There are scarce physical resources (e.g. cpu, memory, bandwidth), and strong selection pressures (e.g. human beings only have so much time, attention, and patience). Putting inheritance of some kind to work ought not be that heavy of a lift.
At some level, these forces are already at play. Software does inherit memes, and companies come and go. But I haven't seen a compelling implementation of natural selection within a system or tool I've used. Leaving aside the obvious design pattern of evolution itself, however, I think programmers would do well to use other design patterns more frequently. Some examples I can think of:
Spandrels
In biology, a spandrel is a trait that is a by-product of some other adaptation, and has not necessarily been selected for. Spandrels are inherited, but don't provide an evolutionary advantage. The hitch is, they don't provide a disadvantage either. So they get passed along, and some time down the road, they might prove useful after all.
Software developers should pay attention. When features can be added in such a way that they don't cost much attention from the user or cpu, bandwidth, and memory from the machine, they should be considered. I think the Semantic Web could easily develop as a spandrel- RDFa gets added into web pages and ignored until there is an ecology in which they can flourish. There are probably a thousand other possibilities for this.
The difficulty of course is that attention from programmers is one of the scarcest resources of all, so this kind of spandrel can only work if it arrives as a kind of Trojan on some other adaptation that is selected for (e.g. if Blogger.com starts sticking RDFa in blogs, and people keep using Blogger.com, RDFa becomes a spandrel).
Ontogeny
Organisms don't stay the same. Sometimes, as in the case of a tadpole/frog or a caterpillar/butterfly, they're really very different at different developmental stages. In software development, I feel like we get hung up in thinking software should work the same all the time. And there are advantages to that behavior (for example, then people can learn how to use it). But, it's profoundly limiting.
Games are one place where ontogenetic design patterns get used. Players can "unlock" new features and play the game in a profoundly different way as it progresses. Other kinds of software should learn from games. I think if people felt like they had to "earn" the advanced features they'd appreciate them more. Plus, by the time they'd gotten to using them, they'd have a use for them (hopefully).
Speciation
Speciation is one of the most widely understood evolutionary design patterns- in fact, Chuck Darwin wrote a great book about it a hundred and fifty or so years back. For the sake of biology, two organisms are from a distinct species if they are biologically incapable of producing a reproductive offspring. For example, a donkey and a horse might get it on, but the result will be a mule, and the mule can't make more baby mules.
But that's really a side issue. Software developers need to be ready to take advantage of speciation: when a system becomes useful for two distinct purposes, speciation should be strongly considered: allowing the software to become two different pieces of software, each developed for a different purpose.
Convergence
The flipside of speciation is convergence. Bats and birds. They can't breed, but from the standpoint of an ecology, they occupy a very similar space- compete for the same resources. Evolution would totally be awesomer if convergence resulted in bat/bird hybrids. But it doesn't.
It doesn't really work in software either. But going back to the bat and bird example, bats sort of took over the night by being able to get around in the dark, and birds sort of took over during the day by being able to get around when it's light. But they're functionally very similar. As such, when it's clear that an ecological software niche is emerging, programmers need to accept they can still be bats to the birds (Omniweb, for example, was kind of a crappy browser, but it was the only one that ran on NeXT- no innovation there, except they could see at night). It's not a bad way to go.
Any other thoughts from the biologists and programmers among us?
Comments:
<< Home
I really dug this post David. There is something really compelling about thinking about software systems in terms of evolutionary biology. Maybe it's partly that the unavoidable redundancy, messiness and competition of software becomes a real asset to embrace ... not something to be exteriminated and eradicated with a silver bullet. I guess I'm a scruffy too eh?
You probably know about it already but Werner Vogels has talked and possibly written about the use of biological principles in software engineering. The thing that comes to mind is how they have multiple teams working on the same technical problems to essentially as you say, create new species: some which survive, and some which don't.
I hadn't seen the specific evolutionary patterns detailed this way before. I would be really interested to hear if you run across other writing on the topic. I remember being surprised when first reading Christopher Alexander's Timeless Way of Building that the architectures he described that had the timeless quality seemed so organic and messy. It's something I've come to appreciate more and more the older I get :-)
You probably know about it already but Werner Vogels has talked and possibly written about the use of biological principles in software engineering. The thing that comes to mind is how they have multiple teams working on the same technical problems to essentially as you say, create new species: some which survive, and some which don't.
I hadn't seen the specific evolutionary patterns detailed this way before. I would be really interested to hear if you run across other writing on the topic. I remember being surprised when first reading Christopher Alexander's Timeless Way of Building that the architectures he described that had the timeless quality seemed so organic and messy. It's something I've come to appreciate more and more the older I get :-)
I had no idea Werner Vogels had talked about it. I had read some stuff by Richard Gabriel that riffed on it, but the Vogels thing was new to me. Thanks :)
David: first dumb comment would be, has anyone studied what's been written in Linux to see if the characteristics of the software sections (let's not use the term "bits") that have been used repeatedly have similar characteristics? Is the Linux 'biosphere' being overrun by 'critters' with certain characteristics, and others being extinguished/going extinct?
Post a Comment
Subscribe to Post Comments [Atom]
<< Home
Subscribe to Posts [Atom]