

Ask HN:  Evolution writes very poor code.  So why is biology research rewarding? - amichail

Isn't it sort of like finding the task of understanding and debugging code written by very poor programmers to be rewarding?
======
10ren
_Evolution writes very poor code. So why is biology research rewarding?_

Because biologists aren't looking at the code, but the product.

For example, I really liked NN 4.7. It was responsive and consistent. But the
codebase was so poor, that they rewrote it - and nuked themselves. Joel on
Software wrote an essay about how as a codebase _evolves_ to cope with more
and more special cases, it gets more complex and ugly. But that's because it
_needs to be_ (according to Joel).

In other words, no one cares about your code. They care about what it _does_.
If it does something really cool and amazing, people will want to know how you
did it. What it "does" can go beyond performance and features - what code does
can include realizing a new user-interaction approach, or a new algorithm, or
a new way to model something. Imagine the jury-rigged prototype of the first
telephone, light-bulb, aeroplane - the slickness of the implementation just
doesn't matter. The invention matters.

If, one day, we work out how DNA codes for a brain, we may be able to code it
better. But what we lack is any idea of how to do it _at all_. Poor code that
works is infinitely better and more cool than no idea.

This is why biologists might be interested in the poor code: _How the hell did
he do that?_

~~~
amichail
I doubt biologists will find anything particularly insightful about how the
brain thinks in my lifetime.

In fact, it may be that it is impossible to determine how the brain thinks
from our physical reality.

~~~
10ren
You're saying that the brain's operation may be supernatural.

------
papaf
I don't think the code metaphore is a good one. Its more like reverse
engineering self duplicating and self healing nanotech hardware i.e. hardware
so complex it can't be artificially designed with current understanding.

The situation is made more complex by the fact that this hardware is
interacting with different types of other hardware such as viruses and
bacteria.

------
markerdmann
If you're looking at all of the code that evolution has ever written, then
yes, I suppose you could say that most of it is very poor. The fraction of
code that survives and propagates, however, is awe-inspiringly beautiful.

If you're looking for some insight into what makes it so beautiful, The
Selfish Gene is an excellent place to start.

~~~
amichail
What evidence do you have that the code that survives and propagates is
elegant (i.e., at the DNA sequence level)?

In genetic programming, the products of evolution on a computer are completely
incomprehensible.

What makes natural evolution any different?

~~~
markerdmann
If someone who is not a programmer looks at your code and pronounces it
utterly incomprehensible, does that make it inelegant?

What exactly would "evidence" of something as subjective as "elegance" look
like?

------
saurabh
I think evolution writes "good enough" code, if I can put it that way.

------
schorndorfer
Just a guess, bu biology research is probably rewarding to some at least in
part because there are so many important consequences to our lives for
understanding how it works. Curing disease seems pretty rewarding, doesn't it?

~~~
amichail
I wouldn't find it rewarding. As I said, it's like trying to understand and
debug code written by very poor programmers.

I would rather use genetic algorithms for my own purposes rather than trying
to understand the messy artifacts of nature.

But yes, the fear of death will give such research a lot of funding.

------
wglb
Wait--who says it is poor code, and by what criteria? And what we think of as
parsimonious as a quality is not a useful metric for DNA.

------
philh
I think it's probably more like trying to understand machine code written by
very short-sighted programmer, on an arcitecture that you're unfamiliar with,
for which no documentation exists, and which you don't have access to for
testing purposes.

I think that's an interesting problem, regardless of the quality of the code.

------
adamcrowe
"If you are a hammer, everything looks like a nail."

Bert Hubert - DNA seen through the eyes of a coder <http://ds9a.nl/amazing-
dna/index.html>

------
aswanson
Because we have diseases to cure, lives that we want to enhance and
curiosities to satisfy.

Insofar as the code metaphor goes, I don't think you can comment on the
quality unless you completely understand what it is doing and how robust it
is. For example, the code that architected your neocortex is significantly
smaller than the source for Open Office. I find that impressive.

Until you are capable of producing something better, you can't make those
statements.

------
jaskew
Evolution does not write code.

'Code' created by a long series of chaotic events manages to survive or not
survive.

The research is rewarding because it is challenging. Both the discover of the
raw data and the interpretation of said data is dumbfoundingly complex, to the
point where any tiny amount of comprehension is the result of more work than
you can possibly imagine.

In short, it's hard, and success is uncommon and amazing.

------
paulgb
Evolution may write poor code, but it can accomplish some really cool stuff
with it. The human brain, for example. If a programmer had managed to recreate
the human brain in code, even if he did it in spaghetti-coded COBOL, people
would want to have a look.

Also, evolution isn't _always_ elegant, but it often is. Think of the symmetry
and self-similarity found so often in nature.

~~~
amichail
The very poor code I'm referring to is in the genotype (i.e., the DNA
sequence). You can get an elegant phenotype (i.e., the resulting creature)
from a very messy genotype.

~~~
bored
If you see things that way, then yes, DNA code is not very elegant or
parsimonious. There are plenty of sequences that don't do anything (as far as
we know).

------
russell
Good grief! Take your favorite OSS project, or even Windows. What do you think
it would look like after 4 billion years of cut and paste.

~~~
amichail
Evolution is not directed by an intelligence. And moreover there is evidence
that useless code in an evolutionary process can sometimes give you better
results by protecting functional code against harmful mutations/crossovers.

------
Confusion
Evolution writes excellent code, because it is understood perfectly by its
intended audience.

