Sunday, September 27, 2009

Synthetic Biology





I read a terrific article written by Michael Specter, published in New Yorker Magazine, entitled "A Life Of Its Own." It asks the question "Where will synthetic biology lead us?"

I'm fascinated by the question. It marries science and ethics in equal measure. I can sympathize with the enthusiastic scientists who envision great benefits - everything from improved health to a way out of our deadly embrace of fossil fuels.

I can't claim to be that kind of scientist. Engineers concern themselves with applying the knowledge that the practitioners of fundamental sciences - physicists, chemists, and mathematicians - unearth for us. We fashion these intellectual raw materials into useful things, and even contribute back what we learn about the fundamentals during process development, but I've been reminded many times that a mechanical engineer is not a physicist. There was a time when I immersed myself into reading biographies of the great physicists of the 20th century. Feynman became a hero of mine after reading his autobiographical short stories in "Surely You're Joking, Mr. Feynman!" and James Gleick's wonderful biography "Genius". I devoured his famous red books, fancying myself a budding physicist.

Then I got my hands on Veltman's "Diagrammatica", and the dream died. It was beyond me. I had neither the physical intuition nor the mathematical chops to see my way through it.

I'm in a worse position with biology. The last biology course that I took came in high school. They taught us the rudiments of DNA, RNA, and the Krebs cycle, but it was well before the polymerase chain reaction came along. Chemistry is not my strong suit either, so the changes that are coming will leave me behind.

Neither of my parents went to college. I was alone when I went off to study mechanical engineering, because neither of them had experienced what I went through.

My youngest daughter is studying biology as an undergraduate now. In spite of all my education, I find myself in a position relative to my daughter similar to what my father had with me. I can relate my experiences as an undergraduate to hers, and tell her what graduate school was like for me. I know enough about fundamentals like thermodynamics, physics, etc. to keep the ball rolling when we talk. But she's already well beyond my capabilities in her chosen field. She's blazing that path alone. She's Lewis and Clark sending letters back to me, Thomas Jefferson, describing the wonders she's experiencing.

I found the New Yorker article particularly interesting, because a number of the phrases evoked things I'd read when the software industry was abandoning older procedural languages like FORTRAN and COBOL and embracing the newer idea of object oriented programming. The problem was complexity: it's impossible to manage all the details that go into developing software when the number of lines of code explode into the hundreds of thousands or millions. Problem solving in general, and computer science in particular, depends on being able to decompose large, intractable problems into smaller, more manageable pieces.

Object oriented programming helps us to manage complexity by mapping software components onto real-world objects and encapsulating the details inside. If done correctly, users of a component need only concern themselves with what they need to provide and what they get back; all the messiness of how it's done is hidden inside.

Brad Cox and others used to talk about "software integrated circuits": each component would have its own well-defined inputs and outputs, much like the pins on a hardware integrated circuit. There would be a marketplace of these software ICs, where you could search for a component that met your needs, plug it in, and off you'd go.

This phrase on page 5 of the article brought that vision back for me: "The BioBricks registry is a physical repository, but it is also an online catalogue. If you want to construct an organism, or engineer it in new ways, you can go to the site as you would one that sells lumber or industrial pipes."

It made me stop and think, because to a great degree the promise of software ICs has not been realized. Writing complex software systems is still a difficult, large scale problem. Object models claiming to model the industry I work in today have not lived up to their promise. The ideal presented by the hardware side of the problem has not translated over to software.

There's still something fundamentally different about software. It's not all science. The irony is that software was distinguished from hardware at the dawning of the computer age because it was believed to be more malleable stuff than the circuits it ran on. You could change it relatively quickly, far more easily than the machine that executed it.

But that's often precisely the problem. It's very easy to change, but the coupling and complexity make it difficult to predict what the effect of the change will be. Brittle software suffers from this problem. The effect of changes in one part of the code often ripple out, resulting in surprising, disappointing, sometimes catastrophic behavior.

Reading about the enthusiasm of biologists made me wonder about the brittleness, coupling, and unintended consequences that face them. Will they have better success than software engineers have to date? And if they do, what lessons can we learn to improve the lot of software development?



Sunday, September 20, 2009

Back From The Dead






"There are two kinds of hard drives: those that have failed, and those that will."

A week ago I fired up my home desktop machine, waited, and got nothing but a blank, black screen staring back at me. I didn't have another monitor on hand to test it, and no way to diagnose the problem. I assumed the worst: it was a failed hard drive. I unplugged all the peripherals, loaded the box into my car, and took it to a local computer shop to be triaged.

I had to wait a whole week just to hear what the problem was, because I had several machines in the queue ahead of me. I was able to sneak some time on my oldest daughter's Macbook during that dry season, but it was painful. All my development tools (e.g., IntelliJ, databases, Grails, etc.) were on my desktop.

I got my machine back yesterday. I started to think that it wasn't a hard drive problem, and fortunately I was correct. Diagnostics showed that memory and hard drive were both fine. My 5 year old monitor gave up the ghost. So I picked up my machine, turned in the dead monitor, and bought a 22" one for just $149. Not too bad.

I'm not that crazy about the place that repaired the machine. When I called to ask the prognosis, the kid told me that everything was fine, but my anti-virus software found "a bunch of viruses". He said he could run the cleanup for a mere $118. I politely declined, but I almost blew my stack: "Are you kidding me? What are you going to do, stand there and watch Kaspersky do the clean-up? How can you quote me that figure with a straight face?" If you look at what Kapersky is identifying, you see that it points out things like denial of service possibilities for the Java JDK that I'm using. That's not a "virus", and I wouldn't want the software to be removed.

The machine had dust in it when I picked it up. When I complained that the kid should have at least blown it out before servicing it, I was told that cleaning is another for-fee service. What a business.

So I brought the whole thing home, vacuumed it out, and set up the new monitor. I spent some time trying to finally sort out my backup and recovery problem. I've had scheduled Microsoft backups for a long time, but they aren't complete disk images. I bought a 250GB Passport external hard drive to replace the undersized 140GB one I had. Now I could copy my entire hard drive if I wanted. I found an inexpensive disk imaging suite called Acronis and set up a nightly backup. I had my entire hard drive on my Passport this morning, compressed into 15 neat 4GB files. I think I'll buy a license.

Just one last problem: How to you boot a PC without the hard drive when you don't have one of those ancient floppy drives? The answer is a USB key, of course. I started creating a bootable USB key, following the instructions from Greg Schultz at this link. I was almost done when I ran into another roadblock: I needed the Windows XP Professional installation CDs, but HP didn't give me any when I bought this machine five years ago. Where was I going to get a copy of Windows XP Professional, now that they don't sell or support it and we've moved through Vista to Windows 7? E-Bay, of course. I put in a bid last night and won at $70. It should arrive next week, and I'll be able to boot from a USB key next time I have a problem. I'll be able to diagnose any problems that I run into, and I'll be able to restore any failed hard drives from my backup. Brilliant!

I'm happy to spend some time thinking about this issue. I realize now how central the stuff I've got on my machine is to my life. I use a password generator to create passwords now. I can't possibly remember them, so I keep them in an encrypted vault called Keeper from Callpod. If I can't access it, I can't do on-line banking or pay my daughter's fee bill at university.

I have a drawer and albums filled with photos from our film camera days. If my hard drive crashes, I'll lose all those digital snaps I've got. Until I get into the habit of keeping them in the cloud, there's a significant memory loss if that disk drive head touches the spinning disk.

There's just one catch: How do you test this arrangement? I'd like to know that I can recover without any issue, but I don't know how to prove it. I don't want to wait until the next failure to find out if any of this is worthwhile.

We all need to think harder about our recovery plans.

My next thought will be about networked storage. I can buy a terabyte monstrosity to house all my whole family's data, but I'll want it attached to my network so everyone can see it. And I suppose I'll need to buy two, so I can backup the backup. And I should take the backup of the backup to my safety deposit box once a month so it'll be there in case my house burns down. Geez, where does it end? Someone with a more apocalyptic vision would be building a hardened data center to go along with the fully-stocked, armed to the teeth underground bunker in the back yard.

Here's another interesting question: When a new desktop would cost me a mere $500-600, why would I not just toss this relic and buy a new one? It's easy to calculate the cross-over point when this becomes a fool's errand. What did I buy yesterday? New monitor, a larger external hard drive, a USB key devoted to booting, backup and recovery software, and Windows XP Pro CDs. The total is a significant fraction of the cost of a new machine.

Am I an eejit to keep this machine going? I've written about Moore's Law in our lives. This is the third desktop machine I've bought for home use, and it's the first one that wasn't hopelessly outdated by the time it passed its fifth anniversary. It's a dual core machine with 4GB of RAM and a hard drive that's still only half full.

While I'm mulling over my economic trade-offs, I'm glad to have all my data and my familiar development environment back.