Monday, January 26, 2009

Teach it ...phenomenology

Imagine yourself in front of a talking Thermostellar bomb which is about to detonate, and start to verbally convince it to abort the countdown because, well, everything else failed...
This is one funny scene of first John Carpenter's movie Dark Star and one of the best (and extreme) dialog between a human and a machine. Of course, it's only a movie but the argument between Lt. Doolittle and Bomb #20 is not totally disconnected from our reality, I will come into it later.

Bomb #20 was stuck in its bay, about to detonate in the vicinity of the spaceship and its crew. It received the order to start the countdown, and is so enthusiast to fulfill its mission that a detail like still laying in the bomb bay is clearly not enough to abort its program. We can see that as a bug, but time is running out to debug. Lt. Doolittle's strategy consists in convincing the bomb it started the countdown on a false assumption.

That's why he used phenomenology, a philosophical branch that studies consciousness through the perception of external phenomenons. Bomb #20 cannot assert the countdown order was real or not. This question is critical, because the bomb can explode only once...

This perception/reality theme has been explored many times by Philip K. Dick, as well as strange human/machine interactions. In Isaac Asimov's books about robots, which happen to have also a highly developed A.I., Susan Calvin debugs robots using most of time philosophical approach. We can cite other movies or books where debugging process is far away from putting breakpoints in code.

Back in 2009, computers are not as smart and developers need low-level tools to debug software. But what happens in reality ? The developer knows it's useless to argue with computer. Therefore, the developer takes the computer point of view, reads the code and simulates (or plays) exactly what the program is supposed to do, while verifying if the state is normal or an error. In a way the developer argues with him/herself and navigates continuously between the two tasks, simulating computer and checking for fault. Errors can come from instructions, but also from bad data. The Bomb #20 argument takes place in the developer head.

But debug is not all. As programming languages provides more and more abstractions, the developer is confronted to higher level choices. For example, architects of Object Oriented applications often are facing semantic decisions. No doubt in the future the developer will need more reasoning skills that take inspiration from philosophical domains, starting from phenomenology.

No comments: