Hacker News new | ask | show | jobs
by fuligo 4122 days ago
As programmers we're in a unqiue position to get a sense of this, actually. It's very very old spaghetti code. Some of it essential, there are even some cleverly re-used common routines, some of it is just ballast, some of it can't be taken out but isn't getting executed either, some of it now serves a different purpose, and none of it comes with annotations that allow us to easily find out which is which.
6 comments

This is exactly how I like to think of DNA: a twisted mass of legacy code. Rife with Heisenbugs, the slightest change can have profound side-effects in seemingly unrelated subsystems. Even sections that are literal "junk" must be retained since everything uses GOTOs with hard-coded line numbers.
Well, let's refine that analogy a bit. Legacy code being used by BILLIONS of users, where even a single critical error is viciously excised. Non working code = death. So while it isn't clean, it is functional and relatively bug free. I do stress the relatively part.
Evolution by natural selection is the original genetic algorithm.
In addition, sometimes it isn't even "data". The physical structure and chemistry of a particular sequence should not be ignored. A simple example is tRNA[1] that has both data and chemical roles where one side matches the data on the mRNA while the other side binds to an amino acid. Many other examples are known, from purely structural features to numerous types[2] of messaging methods and gene activation/suppression structures.

DNA is not merely "data"; to make everything even more complicated, some of it is probably both data and structure... maybe even both at the same time.

[1] http://en.wikipedia.org/wiki/Transfer_RNA#Structure

[2] http://en.wikipedia.org/wiki/Non-coding_RNA

A good but limited analogy. It's important to remember one critical detail: DNA is "executed" in a massively parallel and stochastic fashion. Everything happens at once, all the state is analog, and everything interacts liberally.

That being said I think the basic gist of your comment is correct. It's very old spaghetti code... just hyper dimensional massively parallel spaghetti code.

Does that make each of us - or rather, natural selection - one big unit test?
I agree and have often thought that code is an interesting analogy to study to get insight into biological life. Since the widespread adoption of the internet we have an ecosystem in which different species emerge (commercial and open source software) which try to solve problems and then react to stresses within the environment and try to evolve. Projects are abandoned. New functions are piled on to existing code bases. Code is commented out.

I'd love to start a project to study this.

Very cool analogy.

At least we're getting to the point where we can flip switches and monitor for changes. Debug print!

Why do you think it's an analogy?
Because our DNA isn't a literal computer program written by humans in the past 50 years.
That comparison was never drawn, though. It was just observed that DNA is old (true in fact) spaghetti code (true in fact) with clever code reuse (true in fact), dead weight (conjectured but plausible), stuff with no apparent purpose that nevertheless can't be removed without destroying functionality (true in fact), stuff that used to serve one purpose but currently serves a completely different purpose (true in fact)... all of these phenomena can be directly observed in a working cell. Granted, "spaghetti code" is a value judgment, but I challenge you to find anyone who thinks it doesn't apply to DNA.
I'm wouldn't bet much on the fact that nature allows for that much garbage.