Saturday, February 07, 2009

Aliens Write Software Too

Or do they. Threw this little gem out at dinner the other day. Came from sitting at the laptop and wondering about spaceships. The little green guys that motivated Independence Day and Area 51, do they have guys sitting at laptops too? Being a software person, I figured the answer must be yes. But number one youngest daughter (at the dinner table) had a different take. "What if they don't." green guysHow do you answer that? Might start with, "what is software?". As a working definition, let's say software is anything that lets you take hardware, a concrete thing that you can touch and feel, and then cause it to change its behavior or function. In a very limited sense, a switch might be considered a piece of software since it can cause a lightbulb (thing which you can touch and feel) to change its behavior (lights up and if you feel it and touch it you probably get burned). Course a switch is a pretty simple piece of software, but the lowly switch does cover a bunch of attributes associated with software: configuration, ability to change state, memory are a few. More complicated software would have a bunch of switches and more complicated functions...but you get the idea.

Ok, so do aliens have software? Or not. Let's get on with it. Consider the spaceship (that's the Millenium Falcon being refueled down below). Pretty complicated piece of thing. Lots of moving parts. Can stretch or exceed normal physical limits. Can keep the driver alive in the "vastness of space". Means supplying whatever the driver breathes and eats and handling whatever comes later.spaceship Means the ability to go pretty fast, unless aliens live another spaceshipreally long. Means the ability to counteract gravity...which is not such a problem when you're in space since even low-power ion propulsion can work. But it gets pretty important pretty darned fast when you're falling through the atmosphere. So a spaceship can do an awful lot of things and probably do them pretty well. And? Well, pretty complicated things usually have a lot of parts. For the whole spaceship to work, all those parts gotta work, too. Which introduces the idea of yield.

What's yield? Suppose the spaceship needs 100 thrusters to get off the ground. You can make 100 relatively simple thrusters and hook them up to the spaceship or you can make a single really complicated thruster that does the work of all 100 simple thrusters. But the really complicated thruster will have a whole lot more pieces to it then the 100 simple ones. So the really complicated one takes a whole lot longer to build, and if it does break, you really are hosed. Think single engine airplane and the engine quits. Remember that guy who just landed the airplane in the Hudson? His plane had two engines and they both, simultaneously, choked on a bunch of birds. rocket thrustersIf you'd said, just before takeoff, "Chester, you are about to fly in to a flock of birds. Would you rather be flying a twin engine A320 or a four engine 747. Whaddya think?" Go ahead, take a guess at the answer. So, even the alien, might prefer a 100 thrusters to a really complicated single thruster solution. Imagine we're now at the Thruster Assembly Plant - out there in alien-land. The assembly plant is churning away. Workers hunched over the assembly line. All those thrusters coming down the conveyor belt. And you've got the alien chief tester all the way down at the end of the belt. The chief tester is responsible for making sure that each thruster actually works. Unfortunately, it turns out that they don't all work. Turns out that about 95 out of every 100 are OK; 5 don't quite make spec.

Those 95 out of every 100 work, right out of the factory, but what happens in space? Well, hopefully the aliens did some end of life testing...means running a bunch of thrusters till they poop out and seeing how long that takes. If you're gonna put your best spaceship pilot in this thing and go across the "vastness of space", you probably want some expectation that your pilot will come back....or at least keep communicating until we've all lost interest. So, lets assume that trip across "vastness of space" from alien home-central to earth is a week. The end of life testing reveals that if you put 100 thrusters on the spaceship, you run them all for a week, they still all work. But if you run them for two weeks (don't forget the trip home), a couple of them break. So what to do? OK, if the spaceship needs a 100 thrusters to move around, let's put in a couple of spares and when a working thruster breaks, we can switch in the spare.

A switch. Isn't that how all this got started? Yep, for most conceivable complicated things you want to do, you do need some means of affecting or changing the thing's behavior. At the very least, you need a switch. But it could get even worse. Suppose in doing the end of life testing, the aliens found out that if, rather than run each thruster until it stops working, you give each one a break every once in while. Turns out thrusters really like those breaks. Turns out that thrusters run that way, with breaks, stay alive twice as long! Wow. Back to the spaceship. So, let's say the green guys put in 10 spare thrusters. Rather than letting them sleep until something breaks, the alien chief tester suggests a new strategy. Rotate through all 110 thrusters. Every once in a while, the chief tester guy says, give 10 thrusters a break, keep at least 100 of them running. What happens? End of life testing says they will all last quite a bit longer....and you still get some spares. Those aliens are pretty smart.

So what needs to happen to implement that strategy? You probably need 110 switches to turn each thruster on and off. You probably need to remember which thrusters last ran so you get an idea which ones need to get a break. If a thruster goes south, you probably want to remember about the broken one so you never try to use it again. All that stuff to remember, and it has to be ready to change on moment's notice...like when the spaceship hits a flock of birds. Oh yeah, no birds in space, all right, maybe when the spaceship is landing. Back to our definition of software, "anything that lets you take hardware, a concrete thing that you can touch and feel, and then cause it to change its behavior or function", looks like we can make a pretty good argument that a safe (good against breakage), efficient (good use of spares) spaceship probably has something like software....and that's just to move around. Also has to navigate and keep the pilot alive and all that stuff...but that might be chapter 2.
existentialism

So maybe there are little green guys sitting at laptops messing with software. Kinda weird. Is the existence of software one of those absolutes? People gotta breathe and eat.
To exert a little control over the breathing and eating they build stuff. And when the stuff gets a little more complicated they gotta write software. Might software be an expression of existentialism, our -and the green guys- autonomy over the physical world? The developer of software imposes a his/her/its own view of reality upon the physical attributes the software controls. According to Sartre, "Evil is the product of the ability of humans to make abstract that which is concrete." What is software other than an expression of the ability of humans to make concrete that which is abstract?

No comments:

Post a Comment