Grauw’s blog

Spaghetti-Western DNA

March 18th, 2008

» Raganwald: Spaghetti-Western Coding

I think I kind of understand DNA now. It’s like machine code that generates machine code which generates machine code. With tons of optimisations of the worst readable kind, self-modifying code all over the place. And written in brainfuck. I pity the biologists who have to make sense of that :).

But no wonder we’re so fragile! Seems like our genetic code, although incrementally built and tested over millions of years, is the worst spaghetti-code you can imagine. It works, but a little mutation or some unexpected input from a virus, and it falls apart.

Although if Reginald Braithwaite is to be believed, there is hope for structuring metaprogramming languages just like OOP structures imperative languages. Well, once we’ve figured out those structural primitives, maybe instead of patching up the existing code, we should start refactoring :). Sounds like that’s a good way to get our systems to work more reliable. Though it’ll take some time to get the same kind of test coverage.



Thanks by Reginald Braithwaite at 2008-03-18 20:18

Thanks for your thoughtful response. Refactoring matters!

test? by DomreiRoam at 2008-03-19 10:10

I would like to stress the importance of unit and integration tests?

You don’twant to end end in a bad horror movie? do you? :-(

jk ^^

DNA isn’t Programming, I think by Alpheus at 2012-02-07 20:11

I recently watched a talk by Sussman titled “We don’t know how to compute”. It’s interesting to think about all the “computation” that goes on via DNA, and how we don’t even comprehend all that it does...and to think that we could do that with our computers, if only we know how...

But the funny thing is, Life isn’t computing. Computers are linear machines, but we live in a non-linear universe--and as someone once said, to categorize mathematics as “linear” and “non-linear” is like categorizing fruit as “banana” and “non-banana”. We like linear systems, though, because they are neat and clean...non-linear systems are just messy.

I ran into this when I attempted to design a software radio many years ago, using an 8048 as the microprocessor--that is, the “brain” of a keyboard. Do you know how stupid that idea was? I didn’t know until I took a Digital Signals Processing class several years later, about 2000 or 2001. I’m not sure if computers today could do what I wanted to do--at a minimum, desktop computers would only have just barely been able to do it, had I devoted the entire machine’s resources to doing so.

But the funny thing is, you can do what I wanted to do with a handful of transistors wired up into a non-linear system, and keep the entire system in a package small enough to put in your pocket!

We should keep this in mind when looking at DNA, or the resulting organism, for that matter. They aren’t computers in any way we mean the term; rather, they are instructions for the creation of a dynamic, chaotic system--a system such that the non-linear components are often kept in check, merely by keeping everything in balance.

For the Record by Alpheus at 2012-02-07 20:16

For the record, I’m not entirely against thinking about these things, or even trying to dredge lessons from looking at these complex systems. Indeed, I’m fascinated by one attempt to use dynamic non-linear systems--analog robotics, aka “BEAM Robotics”--to design robots of all types. I strongly desire more time to experiment with such things!

My point is simply, that we need to keep in mind that the universe, even Life itself, is far more complicated than our computers, and the understandings we have so far. :-)

(There’s also a certain charm to simplicity...and the amazing, complicated things you can sometimes do with the simplest of ideas. That’s one reason I’m so attracted to Lisp right now!)

Re: DNA isn’t Programming, I think by Grauw at 2012-02-20 19:09

Hey Alpheus, thanks for sharing your thoughts! Just when I thought I had a handle on it, hehe :).