It’s an old staple of science fiction. Software comes to life and wipes out humanity. One of the most vivid examples of this plot device is in the movie Terminator. In it, a defense program named Skynet becomes self-aware and then it creates robots that are hell-bent on destroying us. Terminator is a great popcorn flick, but it couldn’t ever happen, right? Well, maybe it’s happening already.
Science fiction writers usually hypothesize a takeover based upon intelligence. Machines become smarter than us, so they win. But, what about the opposite tack?
Think about your code. If you’re lucky, you’re working in Java. I know that’s an odd thing to say today. Everyone is down on Java in some way or another, but if
you’re working in Java you’re lucky because your code is relatively new. Java is a fairly young in language
terms. There are teams out there that
are using ancient mainframe languages, in-house proprietary languages, and even
languages so obsolete that they have to buy compilers on eBay. Code in those languages may be tough to work
with and tough to understand, but the code did at least get one thing right. It survived. How did it survive? It survived
by being valuable and difficult to replace. That sounds a lot like natural selection doesn’t it. The code beat out all of the other code on
the fitness landscape.
Once you adopt this way of looking at code, business looks
different. Some companies, instead of
replacing an integral application, put it on life support. They try to keep it and everything it needs
running smoothly and often they are surprised by just how much it needs. If an application is designed to use specific
hardware, the hardware has to stay, along with the OS, the file formats,
particular database technology, the tool chain.. the list goes on. Over time, the company isn’t paying the price of an application; it’s paying the price of a complete eco-system. And, let’s not forget the human element. How many people want to work on 40 year old
technology? Costs grow and grow.
No, I think that code is alive. Some code lives long after the company that
made it. It survives acquisition after
acquisition and sale after sale, and it silently shapes the entire markets. Have you ever thought of some killer feature
that a company could use in their systems that would make them millions? Chances are, they’ve thought of it too, but
the architecture of their code doesn’t allow it.
It all comes back to one thing: code survives by providing value and by being difficult to replace.
The primordial soup is chunky with SQL, ant scripts, and old servlet carcasses. Time goes on, and complexity builds.
Sort of makes you want to refactor, doesn't it? :-)
I know there is code that I wrote ~ 20 years ago that is still being used. It was written in Fortran 77 for a Perkin-Elmer (no kidding). I am also pretty sure code I wrote ~12 years ago using Ada83 is still being used on various systems from communication, trainers, and a debugger for an embedded Ada compiler.
It Lives!
When I was in college, a friend and I thought that we should design & implement a LISP program that would function like DNA and let it loose in a system to see if it would 'grow & evolve'.
Posted by: David Tannen | March 08, 2007 at 01:54 PM
I ran into some code today that was definitely alive, and fighting back any attempt to understand it.
Posted by: Stan | March 08, 2007 at 06:22 PM
Actually, rather than natural selection, that description of old but still running code sounds more like hot-house flowers. They only survive because the environment they thrive in is being maintained.
My impression of natural selection is that the most adaptable come out on top. In the case of old software the orgs that depend on the software are unwilling to adapt, and as long as they can maintain these software hot-houses they can avoid change.
Posted by: Chris | April 11, 2012 at 07:50 AM